Skip to content

[Codegen][NVPTX] Skip runtime execution in Vulkan codegen tests#19717

Merged
tqchen merged 1 commit into
apache:mainfrom
tlopex:fix-nvptx-vulkan-codegen-runtime-checks
Jun 10, 2026
Merged

[Codegen][NVPTX] Skip runtime execution in Vulkan codegen tests#19717
tqchen merged 1 commit into
apache:mainfrom
tlopex:fix-nvptx-vulkan-codegen-runtime-checks

Conversation

@tlopex

@tlopex tlopex commented Jun 10, 2026

Copy link
Copy Markdown
Member

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@tqchen

tqchen commented Jun 10, 2026

Copy link
Copy Markdown
Member

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.
@tlopex tlopex force-pushed the fix-nvptx-vulkan-codegen-runtime-checks branch from bf083ac to ccfbd0d Compare June 10, 2026 16:43
@tqchen tqchen merged commit 1e096d6 into apache:main Jun 10, 2026
9 checks passed
@tqchen

tqchen commented Jun 10, 2026

Copy link
Copy Markdown
Member

note for future, need to change to markskipif not has_vulkan

MasterJH5574 pushed a commit to MasterJH5574/tvm that referenced this pull request Jun 15, 2026
…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)
MasterJH5574 pushed a commit to MasterJH5574/tvm that referenced this pull request Jun 15, 2026
…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)
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.

2 participants