Open mw66 opened 2 years ago
btw, it's defined in another included file:
/usr/include/driver_types.h
typedef __device_builtin__ enum cudaError cudaError_t;
Found work-around: let dstep
work on the cpp
preprocessed output .i
file:
$ gcc -E /usr/include/cuda_runtime_api.h > cuda_runtime_api.i
$ dstep ./cuda_runtime_api.i -o cuda_runtime_api.d
Maybe you can add this tip to the README to help other users?
Please include the input and the expected output.
Shall this generated cuda_runtime_api.d be self-contained? or I need to find the .h which defined cudaError_t, and include those files in the D/step build?
Most generated D files will not be self contained if the header file is not. So yes, you need to find where the symbols are defined and generate D files for those as well and manually import the D files.
At one point I would like to make DStep operate on a whole directory of header files. Then it can hopefully import the D files automatically.
Please include the input and the expected output.
$ dpkg -S /usr/include/cuda_runtime_api.h nvidia-cuda-dev:amd64: /usr/include/cuda_runtime_api.h
$ wc /usr/include/cuda_runtime_api.h 12077 67841 509599 /usr/include/cuda_runtime_api.h
$ dpkg -l nvidia-cuda-dev Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-=====================-===============-============-================================= ii nvidia-cuda-dev:amd64 11.2.2-1ubuntu1 amd64 NVIDIA CUDA development files
It needs lots of related headers to be compiled, so that's why in the end, I choose to run dstep on the cpp
output
Shall this generated
cuda_runtime_api.d
be self-contained? or I need to find the .h which defined cudaError_t, and include those files in the D/step build?