Skip to content

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

Merged
leofang merged 1 commit into
NVIDIA:mainfrom
rwgk:test_nvjitlink_nvrtc_error_handling
Jun 7, 2025
Merged

Add missing NVRTC error handling in test_nvjitlink.py:get_dummy_ltoir()#689
leofang merged 1 commit into
NVIDIA:mainfrom
rwgk:test_nvjitlink_nvrtc_error_handling

Conversation

@rwgk

@rwgk rwgk commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

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-pr-bot

copy-pr-bot Bot commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

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

rwgk commented Jun 6, 2025

Copy link
Copy Markdown
Contributor Author

/ok to test

@github-actions

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
@github-actions

github-actions Bot commented Jun 7, 2025

Copy link
Copy Markdown
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