UCBerkeleySETI / rawspec

6 stars 7 forks source link

CUDA 11.6+ no longer include samples: helper_cuda.h not found #63

Closed radonnachie closed 2 years ago

radonnachie commented 2 years ago

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 now Common, I've found that copying the latter to the former appeases compilation.

lacker commented 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.

radonnachie commented 2 years ago

rawspec_gpu.cu#9

radonnachie commented 2 years ago

without that header file: _cudaGetErrorEnum is missing. Seems to be the only use case?

radonnachie commented 2 years ago

That's a decent portion of the code in helper_cuda.h

radonnachie commented 2 years ago

Copyright seems fairly open, I rate just cutting what we need would be better...

lacker commented 2 years ago

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?

radonnachie commented 2 years ago

I like the architecture agnosticism the header provided

david-macmahon commented 2 years ago

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.

radonnachie commented 2 years ago

I can look in to that. Sounds preferable to mindlessly copying cuda_helper.

radonnachie commented 2 years ago

https://github.com/UCBerkeleySETI/rawspec/pull/64/commits/c95993c0a843832f042296463ab743e80a9484fc