[Codegen][NVPTX] Skip runtime execution in Vulkan codegen tests#19717
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a helper function _skip_runtime_check_for_nvptx in tests/python/codegen/test_target_codegen_vulkan.py to skip runtime execution checks when the target is 'nvptx', as it does not produce a directly launchable runtime module. This helper is integrated into several test cases. There are no review comments to evaluate, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
we should instead change the test_target_codegen_vulkan so it is only parameterized on vulkan target |
…only Several tests in test_target_codegen_vulkan.py took generic (target, dev) fixtures and were auto-parametrized over all enabled targets, so they also ran on llvm/cuda/nvptx. These targets are out of scope for this file and produce spurious failures, e.g. nvptx fails at runtime with cuModuleGetFunction CUDA_ERROR_NOT_FOUND because its codegen output is not a directly launchable module. Restrict these tests to the vulkan target using the same parametrize_targets pattern already used elsewhere in the file, and drop the now-dead CPU/OpenCL branches.
bf083ac to
ccfbd0d
Compare
|
note for future, need to change to markskipif not has_vulkan |
…he#19717) The generic-target tests in test_target_codegen_vulkan.py are auto-parametrized over all enabled targets, which may include nvptx. For nvptx, TVM produces PTX codegen output but not a directly launchable runtime module, so executing the compiled function fails with errors such as cuModuleGetFunction CUDA_ERROR_NOT_FOUND. Add a small helper that skips runtime execution for nvptx after a successful compile, so codegen is still exercised while the invalid runtime launch is avoided. Vulkan-only tests are unchanged. (cherry picked from commit 1e096d6)
…he#19717) The generic-target tests in test_target_codegen_vulkan.py are auto-parametrized over all enabled targets, which may include nvptx. For nvptx, TVM produces PTX codegen output but not a directly launchable runtime module, so executing the compiled function fails with errors such as cuModuleGetFunction CUDA_ERROR_NOT_FOUND. Add a small helper that skips runtime execution for nvptx after a successful compile, so codegen is still exercised while the invalid runtime launch is avoided. Vulkan-only tests are unchanged. (cherry picked from commit 1e096d6)
The generic-target tests in test_target_codegen_vulkan.py are auto-parametrized over all enabled targets, which may include nvptx. For nvptx, TVM produces PTX codegen output but not a directly launchable runtime module, so executing the compiled function fails with errors such as cuModuleGetFunction CUDA_ERROR_NOT_FOUND.
Add a small helper that skips runtime execution for nvptx after a successful compile, so codegen is still exercised while the invalid runtime launch is avoided. Vulkan-only tests are unchanged.