Hello,
I'm trying to run one of the oneAPI samples for Cuda code migration on the devcloud.
The code I'm running is https://github.com/oneapi-src/oneAPI-samples/tree/master/Tools/Migration/folder-options-dpct
When I run the command in the README.md, I get the following:
Case1:
dpct --in-root=foo --out-root=result/foo foo/main.cu foo/bar/util.cu --extra-arg="-Ifoo/bar/"
dpct exited with code: -5 (Error: Path for CUDA header files is invalid or not available. Use --cuda-include-path to specify the correct path to the header files)
When I add the path to include/cude, I get the following:
Case2:
dpct --cuda-include-path=<path to cuda>/include --in-root=foo --out-root=result/foo foo/main.cu foo/bar/util.cu --extra-arg="-Ifoo/bar/"
Processing: /home/u52/workstation/CudaToDPC++/oneAPI-samples/Tools/Migration/folder-options-dpct/foo/main.cu
Skipping /home/u52/workstation/CudaToDPC++/oneAPI-samples/Tools/Migration/folder-options-dpct/foo/main.cu. Compile command not found.
Processing: /home/u52/workstation/CudaToDPC++/oneAPI-samples/Tools/Migration/folder-options-dpct/foo/bar/util.cu
Skipping /home/u52/workstation/CudaToDPC++/oneAPI-samples/Tools/Migration/folder-options-dpct/foo/bar/util.cu. Compile command not found.
dpct exited with code: 1 (Migration not necessary; no CUDA code detected)
is the DPC++ compatibility tool supported on Devcloud? and is there any documentation for using the tool on the Devcloud?
Link Copied
Hi,
I have tried the steps (given in the tutorial) in my environment. The migration and compilation/run were successful in my case.
Could you please specify your CUDA toolkit?
DPCT requirements:
Thanks,
Rahul
Thanks, Rahul for your answer, I used the toolkit include from 10.2.
Which toolkit you used in your env. ?
Regards,
Alaa
Hi,
Apologies for the late response. I have the same CUDA toolkit version.
As a possible workaround, could you try changing your CUDA application to a different directory and give it a try? (CUDA toolkit installation directory and CUDA application directory should be different). Let me know if it helps.
Also, try to migrate a simple CUDA vector add code and let me know how it goes.
dpct --cuda-include-path=<path to cuda>/include vecadd.cu
Thanks,
Rahul
Hi,
Could you please confirm if your issue is solved? Let us know if you face any issues.
Thanks,
Rahul
Thanks Rahul, yes, I have the issue resolved. The solution to my issue us as follow:
1- as you suggested, changing the CUDA application directory helped in resolving the following issue:
Processing: /home/.../oneAPI-samples/Tools/Migration/vector-add-dpct/src/vector_add.cu
Skipping /home/.../oneAPI-samples/Tools/Migration/vector-add-dpct/src/vector_add.cu. Compile command not found.
dpct exited with code: 1 (Migration not necessary; no CUDA code detected)
2- Changing the CUDA application path not to be the same as CUDA lib, helped with that issue:
dpct exited with code: -5 (Error: Path for CUDA header files is invalid or not available. Use --cuda-include-path to specify the correct path to the header files)
So I used the following command to migrate: dpct --cuda-include-path=../include --in-root=. src/vector_add.cu --out-root=output/
Also, without specifying the --in-root option, it produced the same output.
Thanks for your help!
Hi,
Since your issue is resolved, could you let me know if I can close this thread from my end?
Thanks,
Rahul
Sure, it's resolved, and you can close the issue.
Thanks!
Alaa
Hi,
Thanks for the confirmation. Intel will no longer monitor this thread. Further discussions on this thread will be considered community only.
Regards,
Rahul
For more complete information about compiler optimizations, see our Optimization Notice.