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 50ddaf7fc91ab2014bd66280070a614466e01deb 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 85f255b into release/2.7 Sep 2, 2025
1 of 4 checks passed
@pruthvistony pruthvistony deleted the autogenerated/release/2.7_cherry-pick_pr-2543 branch September 2, 2025 17:18
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.

4 participants