Skip to content

Conversation

@abhilash1910
Copy link
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 link
Contributor

copy-pr-bot bot commented Oct 31, 2025

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
Contributor Author

pre-commit.ci autofix

@leofang
Copy link
Member

leofang commented Oct 31, 2025

/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
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
Collaborator

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

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