Skip to content

Fix test_cache_int32_overflow test failure on ROCm#149

Open
avbokovoy wants to merge 1 commit intoabokovoi/upstreamfrom
abokovoi/fix-cache-overflow-test
Open

Fix test_cache_int32_overflow test failure on ROCm#149
avbokovoy wants to merge 1 commit intoabokovoi/upstreamfrom
abokovoi/fix-cache-overflow-test

Conversation

@avbokovoy
Copy link

This PR introduces the fix for test_cache_int32_overflow test on ROCm. Currently, the test fails with the following error:

RuntimeError: Total number of threads 16384000000 is greater than the HIP limit of 2^32

The changes are:

  1. Add an ability for lxu_cache_flush_cuda kernel to handle arbitrary sized grids with runtime max_grid_size scheduling
  2. Fixed potential integer overflows
  3. Added TORCH_CHECK to avoid potential division by zero

@avbokovoy avbokovoy self-assigned this Mar 25, 2026
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.

1 participant