Skip to content

cuda.bindings: Add test_nvrtcGetLoweredName_failure #499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 7, 2025
10 changes: 10 additions & 0 deletions cuda_bindings/tests/test_nvrtc.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,13 @@ def test_nvrtcGetSupportedArchs():
err, supportedArchs = nvrtc.nvrtcGetSupportedArchs()
ASSERT_DRV(err)
assert len(supportedArchs) != 0


@pytest.mark.skipif(nvrtcVersionLessThan(12, 1), reason="Preempt Segmentation Fault (see #499)")
def test_nvrtcGetLoweredName_failure():
err, name = nvrtc.nvrtcGetLoweredName(None, b"I'm an elevated name!")
assert err == nvrtc.nvrtcResult.NVRTC_ERROR_INVALID_PROGRAM
assert name is None
err, name = nvrtc.nvrtcGetLoweredName(0, b"I'm another elevated name!")
assert err == nvrtc.nvrtcResult.NVRTC_ERROR_INVALID_PROGRAM
assert name is None
Loading