Skip to content

[NVVM] Guardrail test_program for version mismatches between driver and PTX compiled binary - #1204

Merged
leofang merged 3 commits into
NVIDIA:mainfrom
abhilash1910:test_program_fix
Oct 31, 2025
Merged

[NVVM] Guardrail test_program for version mismatches between driver and PTX compiled binary#1204
leofang merged 3 commits into
NVIDIA:mainfrom
abhilash1910:test_program_fix

Conversation

@abhilash1910

Copy link
Copy Markdown
Contributor

Description

Internal NVBug: 5623403
Currently test_program.py does not have an exception case to handle mismatch in PTX compiled binary supported version and driver version, in order to prevent running of compiled PTX code on older drivers .

@rwgk @leofang please help to review, thanks.

@copy-pr-bot

copy-pr-bot Bot commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@abhilash1910

Copy link
Copy Markdown
Contributor Author

pre-commit.ci autofix

@leofang

leofang commented Oct 31, 2025

Copy link
Copy Markdown
Member

/ok to test dd78838

@leofang leofang added bug Something isn't working P1 Medium priority - Should do test Improvements or additions to tests cuda.core Everything related to the cuda.core module labels Oct 31, 2025
@leofang leofang added this to the cuda.core beta 9 milestone Oct 31, 2025
except CUDAError as e:
if re.search(r"CUDA_UNSUPPORTED_PTX_VERSION", str(e)):
pytest.xfail("PTX version not supported by current CUDA Driver")
raise

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Q: Shouldn't this be

Suggested change
raise
else:
raise

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.

The else isn't needed: pytest.xfail exits the test right at the call site.

But the else doesn't do harm either.

I tend to fully rely on the pytest behavior, i.e. not add redundant flow control, for more compact code.

@github-actions

This comment has been minimized.

@leofang
leofang enabled auto-merge (squash) October 31, 2025 16:37
@leofang
leofang merged commit 54c52b6 into NVIDIA:main Oct 31, 2025
68 checks passed
@github-actions

Copy link
Copy Markdown
Doc Preview CI
Preview removed because the pull request was closed or merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cuda.core Everything related to the cuda.core module P1 Medium priority - Should do test Improvements or additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants