A CUDA cuMemAlloc returns an error when trying to allocate 0 bytes.
We should wrap the CUDA driver call so that trying to allocate 0 bytes returns a null pointer. Before implementing that it should be checked if providing cuMemFree with a null pointer is valid.
The recommended workaround for now is allocating 1 byte instead 0 bytes.
A CUDA cuMemAlloc returns an error when trying to allocate 0 bytes.
We should wrap the CUDA driver call so that trying to allocate 0 bytes returns a null pointer. Before implementing that it should be checked if providing cuMemFree with a null pointer is valid.
The recommended workaround for now is allocating 1 byte instead 0 bytes.