Skip to content

Add missing NVRTC error handling in test_nvjitlink.py:get_dummy_ltoir() #689

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 1 commit into from
Jun 7, 2025

Conversation

rwgk
Copy link
Collaborator

@rwgk rwgk commented Jun 6, 2025

Description

Discovered while working on upgrades.

Without this change, get_dummy_ltoir returned an empty bytes object (b'') instead of raising an exception.

Using the opportunity to improve the error message:

-            raise RuntimeError(f"Nvrtc Error: {err}")
+            raise RuntimeError(repr(err))

Before:

RuntimeError: Nvrtc Error: 7

After:

RuntimeError: <nvrtcResult.NVRTC_ERROR_BUILTIN_OPERATION_FAILURE: 7>

@rwgk rwgk self-assigned this Jun 6, 2025
Copy link
Contributor

copy-pr-bot bot commented Jun 6, 2025

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-project-automation github-project-automation bot moved this to Todo in CCCL Jun 6, 2025
@rwgk
Copy link
Collaborator Author

rwgk commented Jun 6, 2025

/ok to test

This comment has been minimized.

@rwgk rwgk requested a review from leofang June 6, 2025 22:57
@github-project-automation github-project-automation bot moved this from Todo to In Review in CCCL Jun 7, 2025
@leofang leofang merged commit 5b76f65 into NVIDIA:main Jun 7, 2025
53 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Jun 7, 2025
@leofang leofang added P1 Medium priority - Should do test Improvements or additions to tests cuda.bindings Everything related to the cuda.bindings module labels Jun 7, 2025
@leofang leofang added this to the cuda-python 12-next, 11-next milestone Jun 7, 2025
Copy link

github-actions bot commented Jun 7, 2025

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

@rwgk rwgk deleted the test_nvjitlink_nvrtc_error_handling branch June 7, 2025 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda.bindings Everything related to the cuda.bindings module P1 Medium priority - Should do test Improvements or additions to tests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants