Skip to content

Clearer error messages (cuda.core) #458

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 48 commits into from
Mar 6, 2025
Merged

Conversation

rwgk
Copy link
Collaborator

@rwgk rwgk commented Feb 21, 2025

This is the main PR to address issue #198

Cleanup of error messages is considered complete.

Test coverage is expanded, but still not complete. Many changes were exercised only interactively, by temporarily changing if cond to if not cond and visually inspecting the raised exceptions.

For completeness: These will be handled in separate PRs: 5dc2331, d3df80d

Copy link
Contributor

copy-pr-bot bot commented Feb 21, 2025

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

Contributors can view more details about this message here.

@rwgk

This comment was marked as outdated.

@rwgk

This comment was marked as outdated.

@leofang leofang added enhancement Any code-related improvements cuda.core Everything related to the cuda.core module labels Feb 21, 2025
@leofang leofang added this to the cuda.core beta 3 milestone Feb 21, 2025
@leofang leofang added the P1 Medium priority - Should do label Feb 21, 2025
@rwgk
Copy link
Collaborator Author

rwgk commented Feb 21, 2025

/ok to test

This comment has been minimized.

@rwgk
Copy link
Collaborator Author

rwgk commented Feb 22, 2025

/ok to test

@rwgk
Copy link
Collaborator Author

rwgk commented Feb 25, 2025

/ok to test

@rwgk
Copy link
Collaborator Author

rwgk commented Feb 25, 2025

/ok to test

@rwgk
Copy link
Collaborator Author

rwgk commented Mar 3, 2025

@leofang I pushed up what I have at the moment, mostly for backup, please don't look yet. (I need to do something else for a couple hours.)

I still have 10 ACTNBL to go.

@rwgk
Copy link
Collaborator Author

rwgk commented Mar 4, 2025

Tracking progress: I've now resolved all ACTNBL.

Many changes are only tested interactively, e.g. by temporarily changing if cond to if not cond and then visually inspecting the raised exceptions.

Half of the changes in the last commit (29c9fb8) are not exercised at all. I'll try to add a few minimal tests, so that there is at least a happy path.

@rwgk
Copy link
Collaborator Author

rwgk commented Mar 5, 2025

@leofang I backed out the fancy driver and runtime errors (to be merged via another PR).

The only thing I still want to do in this PR is to create the _utils subdirectory, as you suggested a few days ago. All other changes are ready for review.

@rwgk
Copy link
Collaborator Author

rwgk commented Mar 5, 2025

/ok to test

@rwgk rwgk changed the title [WIP] Clearer error messages Mar 5, 2025
@rwgk rwgk marked this pull request as ready for review March 5, 2025 17:37
Copy link
Contributor

copy-pr-bot bot commented Mar 5, 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.

@rwgk
Copy link
Collaborator Author

rwgk commented Mar 5, 2025

/ok to test

Copy link
Member

Choose a reason for hiding this comment

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

We don't have to do this now, but since this is an internal module, we can just import everything in this module to under this namespace.

Copy link
Member

Choose a reason for hiding this comment

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

mainly because the import is getting pretty long now (and the experimental module makes it worse :P )

Copy link
Member

@leofang leofang left a comment

Choose a reason for hiding this comment

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

Very nice and through work! Thanks Ralf!

@leofang leofang linked an issue Mar 6, 2025 that may be closed by this pull request
@rwgk rwgk merged commit 81c6f77 into NVIDIA:main Mar 6, 2025
73 checks passed
@rwgk rwgk deleted the clearer_error_messages branch March 6, 2025 03:59
Copy link

github-actions bot commented Mar 6, 2025

Doc Preview CI
Preview removed because the pull request was closed or merged.
@leofang leofang mentioned this pull request Mar 6, 2025
rwgk added a commit to rwgk/cuda-python that referenced this pull request Mar 8, 2025
…ATIONS originally created under PR NVIDIA#458

This code was removed from PR NVIDIA#458 with this commit:

NVIDIA@d3df80d
rwgk added a commit that referenced this pull request Mar 26, 2025
* Bring back DRIVER_CU_RESULT_EXPLANATIONS, RUNTIME_CUDA_ERROR_T_EXPLANATIONS originally created under PR #458

This code was removed from PR #458 with this commit:

d3df80d

* Add instructions for regenerating the dictionaries.

* Use DRIVER_CU_RESULT_EXPLANATIONS, RUNTIME_CUDA_ERROR_EXPLANATIONS in cuda_utils.handle_return()

* Add test_driver_cu_result_explanations_health(), test_runtime_cuda_error_explanations_health()

* Add test_check_driver_error(), test_check_runtime_error()

* Copy https://github.com/rwgk/stuff/blob/6fc0881d2d9a37a0c6a5352ab5908b90ab0bd41e/cuda-python/reformat_cuda_enums_from_web_as_py.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda.core Everything related to the cuda.core module enhancement Any code-related improvements P1 Medium priority - Should do
2 participants