-
Notifications
You must be signed in to change notification settings - Fork 195
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
CCCL C library should have its own error codes #3819
Comments
@leofang pointed me here (thanks!) when I mentioned my concerns regarding cuda.parallel error handling. I feel a little guilty because I introduced this: 199f2a5#diff-538dee7986a27b676e82be8b584faabbfbafee2c8c9ab9c4e429628297981b23R341-R343 - catch (...)
+ catch (const std::exception& exc)
{
+ fflush(stderr);
+ printf("\nEXCEPTION in cccl_device_reduce_build(): %s\n", exc.what());
+ fflush(stdout);
error = CUDA_ERROR_UNKNOWN;
} It was meant to be a stop-gap, so that I could at least see what the exceptions are (especially because I was new to the code base), but now (main @ 02d2396) that pattern is spreading as we're adding more algorithms:
While reviewing #3763 I saw that the approach is used there even more generally (no exception being caught there): + if (cccl_iterator_kind_t::iterator == d_out_keys.type || cccl_iterator_kind_t::iterator == d_out_items.type)
+ {
+ // See https://github.com/NVIDIA/cccl/issues/3722
+ fflush(stderr);
+ printf("\nERROR in cccl_device_merge_sort(): merge sort output cannot be an iterator\n");
+ fflush(stdout);
+ return CUDA_ERROR_UNKNOWN;
+ } Error handling via I think what we need is a |
... and not piggyback on the CUDA driver type
CUresult
.The text was updated successfully, but these errors were encountered: