Skip to content

Add proper dtype checks for histc_out. - #5554

Open
AKloniecki wants to merge 3 commits into
intel:mainfrom
AKloniecki:histc_out_dtype_check
Open

AKloniecki wants to merge 3 commits into
intel:mainfrom
AKloniecki:histc_out_dtype_check

Conversation

@AKloniecki

@AKloniecki AKloniecki commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

histc_out contract expects proper validation of out tensor dtype.
Currently there are histc_out tests upstream in pytorch/test/test_reductions.py which are xfailed due to lack of proper dtype handling on our side.
PR removing xfails upstream: pytorch/pytorch#199126

This PR, correcting histc_out behaviour, causes upstream xfails to be reported as unexpected success, which is why #5570 has been oppened and should be closed when both this and then upstream PRs are merged.

Fixes: pytorch/pytorch#196008
Fixes: #5237
Relates-to: pytorch/pytorch#196100

@BBBela BBBela left a comment

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.

Could you please add any description to this PR to have some context?
Does this change fix some failing test case or is it enhancement? If there is a failing test case that is fixed by this PR, then it would be good to somehow connect them, if not, then maybe a regression test should be added?

@github-actions github-actions Bot added disable_e2e Disable all e2e test jobs for the PR disable_distributed Disable distributed UT test jobs for the PR labels Sep 30, 2026
@AKloniecki
AKloniecki requested a review from BBBela September 30, 2026 09:02

@BBBela BBBela left a comment

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.

Sorry, but for me the PR description is too minimalistic.
There is no information what test is failing, what is the plan. I think it should be in the description that this PR would make this test end with Unexpected Success, so there should be an issue with skipped label that will be resolved once the upstream PR removing expectedFailureXPU is merged.

@AKloniecki
AKloniecki requested a review from BBBela September 30, 2026 10:16
BBBela
BBBela previously approved these changes Sep 30, 2026

@BBBela BBBela left a comment

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.

Looks good to me, thanks!

Although there is a problem caused by torch-xpu-ops and PyTorch dependencies. Merging this PR will make the mentioned test to fail (unexpected success) until the upstream one (pytorch/pytorch#199126) is merged. In torch-xpu-ops it is not a problem as there is already issue with skipped label, so it will not throw in CI. The problem would appear when this PR is merged and torch-xpu-ops commit pin is updated in PyTorch before pytorch/pytorch#199126 is merged.

I suppose, once this PR is merged into torch-xpu-ops we should try to merge pytorch/pytorch#199126 along with updating the torch-xpu-ops commit pin to avoid CI failures in PyTorch XPU CI.

@guangyey, @CuiYifeng - what do you think - can we do it that way? So once this PR is merged, we bump the torch-xpu-ops commit pin along with removing expectedFailureXPU in this PR: pytorch/pytorch#199126?

@dvrogozh dvrogozh left a comment

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.

@AKloniecki , that's important to check what work was done already in the upstream and if anyone has attempted to fix what you are about to do for the XPU. Running git blame for the upstream ./aten/src/ATen/native/cuda/SummaryOps.cu you will see that this was done for CPU and CUDA in the following PR:

Which is linked to the issue:

Reviewing above link, there is the following XPU side issue and PR opened by @N0AHZACH:

#5380 has a preference as it was opened earlier. Plus it has changes to the tests which are missing in your PR. @AKloniecki , please, help to review #5380 and provide your comments.

@dvrogozh

Copy link
Copy Markdown
Contributor

I suppose, once this PR is merged into torch-xpu-ops we should try to merge pytorch/pytorch#199126 along with updating the torch-xpu-ops commit pin to avoid CI failures in PyTorch XPU CI.

My expectation is that PR to update torch-xpu-ops will take care of the above, i.e. either 199126 itself should contain commit pin update or other PR updating the pin should contain a fix from 199126.

@BBBela
BBBela dismissed their stale review October 1, 2026 06:17

As @dvrogozh mentioned - it looks like there is earlier PR (#5380) addressing the same problem, that has precedence as it was created earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disable_distributed Disable distributed UT test jobs for the PR disable_e2e Disable all e2e test jobs for the PR

Projects

None yet

4 participants