cuda-api-wrappers icon indicating copy to clipboard operation
cuda-api-wrappers copied to clipboard

One status_t to rule them all

Open eyalroz opened this issue 3 years ago • 0 comments

The driver-wrappers branch has a problem: Using the Runtime API cudaError_t as cuda::status_t requires casts from CUresult - and vice versa, as they are both enums. We can't write a freestanding operator() to convert one to the other. And if we don't want those casts all over - we need to replicate a bunch of functions, to accept both (and even that doesn't fully cover it).

So, it seems the only solution is to have a new class, different than both of them, but constructible from and convertible to any of them.

... and the benefit is that we might even be able to expand it to covert NVRTC errors, with a little care. But let's start with the driver and the runtime.

eyalroz avatar Nov 16 '21 23:11 eyalroz