Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/ATen/native/xpu/SummaryOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ Tensor& _histc_out_xpu(
const Scalar& min,
const Scalar& max,
Tensor& result) {
TORCH_CHECK(
self.dtype() == result.dtype(),
"torch.histogram: input tensor and hist tensor should",
" have the same dtype, but got input ",
self.dtype(),
" and hist ",
result.dtype());
auto ret = _histc_xpu(self, bins, min, max);
at::native::resize_output(result, ret.sizes());
result.copy_(ret);
Expand Down
1 change: 0 additions & 1 deletion test/xpu/skip_list_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@
# Exception: The supported dtypes for linalg.multi_dot on device type xpu are incorrect!
"test_dtypes_linalg_multi_dot_xpu",
# For CUDA it's skipped explicitly in common_methods_invocations.py in upstream. We can skip it here
"test_out_histc_xpu_float32",
"test_out_mean_xpu_float32",
# FakeTensor mismatch in outputs_alias_inputs for aten.view.default
# Known upstream issue: https://github.com/pytorch/pytorch/issues/159150
Expand Down
1 change: 0 additions & 1 deletion test/xpu/xpu_test_utils.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the line:

("histc", "test_out"),

should be removed in this PR also from _cuda_xfail_xpu_pass.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup will do.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BBBela , is this still needed to be done below?

Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@
("_batch_norm_with_update", "test_dispatch_symbolic_meta_outplace_all_strides"),
("_native_batch_norm_legit", "test_out"),
("native_batch_norm", "test_out"),
("histc", "test_out"),
("_refs.mul", "test_python_ref"),
("_refs.mul", "test_python_ref_torch_fallback"),
("nn.AvgPool2d", "test_memory_format"),
Expand Down