Skip to content

Commit

Permalink
Fix torch.full scalar type
Browse files Browse the repository at this point in the history
  • Loading branch information
JackCaoG committed May 1, 2024
1 parent 2907ab3 commit 8b1ca55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch_xla/csrc/aten_xla_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ at::Tensor XLANativeFunctions::full(at::IntArrayRef size,
}
return bridge::AtenFromXlaTensor(tensor_methods::full(
absl::Span<const int64_t>(size), fill_value,
GetXlaDeviceOrCurrent(device), at::dtype_or_default(dtype)));
GetXlaDeviceOrCurrent(device), dtype ? *dtype : fill_value.type()));
}

at::Tensor XLANativeFunctions::gather(const at::Tensor& self, int64_t dim,
Expand Down

0 comments on commit 8b1ca55

Please sign in to comment.