Repository navigation
test(cuda.core): drop numba from test_occupancy_max_potential_block_size_b2dsize - #3599
Conversation
…ize_b2dsize The test used numba only to compile the size_t (*)(int) block-size-to- dynamic-shared-memory callback, and skipped when numba was missing. No CI job that runs test_module.py installs numba, so it never ran. Build the callback with ctypes instead. The driver calls it synchronously on the calling thread while cuOccupancyMaxPotentialBlockSize runs. Record the block sizes the driver queries and assert that the callback was called, so the test fails if the callback is ignored. Closes NVIDIA#3566. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Summary
Change: Other · Severity of issue fixed: Low Merge Risk:
|
|
jpascucci-nv
left a comment
There was a problem hiding this comment.
sol 6.1 high finds no actionable findings, and it lgtm.
Closes #3566. Part of #2077.
Summary
test_occupancy_max_potential_block_size_b2dsizeused numba for one thing: compiling thesize_t (*)(int)block-size-to-dynamic-shared-memory callback (CUoccupancyB2DSize). The test skipped when numba was missing. None of the CI jobs that runcuda_core/tests/test_module.pyinstall numba, so it never ran.The callback is now a ctypes function:
cuOccupancyMaxPotentialBlockSizeruns. cuda.core keeps the GIL held for that call.numbaimport and the "not currently run in any CI job" marker are removed. Nothing else incuda_core/testsuses numba, and the test needs no new dependency.CUoccupancyB2DSizeonly to check its string form, without numba, so neither needs a matching change.Evidence
Locally, Linux, on an RTX 5070 (CC 12.0) and an RTX A400 (CC 8.6):
block_size_limitcases SKIPPED ("Test requires numba to be installed").test_module.pyalso pass; on the A400, 3 cluster tests skip because it doesn't support clusters.Confirming it runs in CI: in this PR's CI run, every cuda.core test job should report
test_occupancy_max_potential_block_size_b2dsize[...] PASSEDfor all 7 cases, wheremainreports them SKIPPED. For example:Merge Danger
Door: two-way. Test-only change.
Blast Radius: one test, which now runs on every cuda.core CI row. Windows hasn't been tested locally. The callback uses
CFUNCTYPE(cdecl), and the driver declares it__stdcall; both are the same calling convention on x64 Windows, which is what CI runs.Reviewers: please feel free to push commits directly to this PR to improve it.
🤖 Generated with Claude Code