Skip to content

Conversation

dhonnappa-amd
Copy link

Cherry-pick of #2543

Currently std::min -> ::min did not work as expected on ROCm when input
values >= 2147483648

Replace std::min to ternary statement
Also std::min can be replaced by explicit typing std::min<int64_t>

fixes on ROCm:

test_sort_and_select.py::TestSortAndSelectCUDA::test_sort_large_cuda_float16
error:
RuntimeError: Cannot sort dimension of length 8192

Combines upstream PRs:
- pytorch#161054 to fix std::min on ROCm
- pytorch#155546 fix python test
- pytorch#159939 change test dtype from
int8 to float16

Fixes: SWDEV-526432
@rocm-repo-management-api
Copy link

rocm-repo-management-api bot commented Aug 25, 2025

Jenkins build for d57ba11b49fdc0bbe54e7f081539beab86465cc4 commit finished as FAILURE
Links: Blue Ocean view / Build artifacts

@dnikolaev-amd dnikolaev-amd marked this pull request as ready for review August 25, 2025 21:15
@pruthvistony pruthvistony merged commit 9a46fc8 into release/2.8 Sep 2, 2025
1 of 3 checks passed
@pruthvistony pruthvistony deleted the autogenerated/release/2.8_cherry-pick_pr-2543 branch September 2, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants