Commit 50ddaf7
[rocm7.1_internal_testing] fix large tensor sort on ROCm (#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-5264321 parent 10cbfa3 commit 50ddaf7
File tree
2 files changed
+6
-4
lines changed- aten/src/ATen/native/cuda
- test
2 files changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
| |||
238 | 239 | | |
239 | 240 | | |
240 | 241 | | |
241 | | - | |
| 242 | + | |
| 243 | + | |
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
0 commit comments