Closed radonnachie closed 2 years ago
Do you know where does rawspec depend on the cuda samples in the first place? They aren't really intended to be part of the public API.
without that header file: _cudaGetErrorEnum
is missing. Seems to be the only use case?
That's a decent portion of the code in helper_cuda.h
Copyright seems fairly open, I rate just cutting what we need would be better...
It looks like _cudaGetErrorEnum
in that sample file is just ifdef'd to different things depending on build environment. Maybe we can just call the one we want directly?
I like the architecture agnosticism the header provided
Actually, a git blame
on that file shows that it was by me in the "Initial commit" 5 years(!) ago. I agree with Kevin that we should not depend on the samples code. It's actually kind of a funny function. It seems to be tailored more to various CUDA "packages" or APIs (e.g. CUBLAS, CUFFT, etc) than to generic error handing. We might actually want to use the __DRIVER_TYPES_H__
definition for generic CUDA calls and the _CUFFT_H_
version for CUFFT calls. This would then require making PRINT_ERRMSG
be two different macros, e.g. PRINT_CUDA_ERRMSG
and PRINT_CUFFT_ERRMSG
.
I can look in to that. Sounds preferable to mindlessly copying cuda_helper.
CUDA as of 11.6 no longer includes the samples (link). They're provided https://github.com/nvidia/cuda-samples but with a different structure: namely
common/inc
is nowCommon
, I've found that copying the latter to the former appeases compilation.