Skip to content

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 requested a review from magnatelee February 20, 2023 22:59
@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
shixun404 pushed a commit to shixun404/cupynumeric that referenced this pull request Sep 18, 2025
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