Skip to content
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

Remove exception throwing from RNG code #815

Merged
merged 5 commits into from
Mar 1, 2023

Conversation

manopapad
Copy link
Contributor

The use of exceptions (and particularly the lumping of all unexpected CUDA errors as CURAND_STATUS_INTERNAL_ERROR) is making it harder to pinpoint the sources of errors.

IMHO further refactoring is warranted for the RNG code. The current code is seemingly trying to use cuRAND statuses exclusively. Most uses of curandStatus_t are simply threading these statuses through the code. This is not necessary for our purely internal use of the cuRAND API. Instead the random module should follow the convention followed in other parts of the code, where "leaf" CUDA library calls are checked for errors directly at the call site (e.g. like CHECK_CUBLAS is used).

@manopapad manopapad added the category:improvement PR introduces an improvement and will be classified as such in release notes label Feb 20, 2023
@manopapad manopapad merged commit f646c27 into nv-legate:branch-23.03 Mar 1, 2023
@manopapad manopapad deleted the curand-errors branch July 19, 2023 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:improvement PR introduces an improvement and will be classified as such in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants