Consider adding a "cu" option to the -x language flag
nvcc recognizes cu as an option for the -x command line language flag to indicate that the source file should be treated as CUDA code. It would be helpful if circle recognized this option as well to aid in porting old code bases.
Do you know of a guide for finding the most recent cuda toolkit on the system? that would allow me to bypass the --cuda-path and just specify a .cu or -x cu.
Do you know of a guide for finding the most recent cuda toolkit on the system?
which nvcc?
Also this advice from Robert.
Does the --cuda-path option put circle in CUDA C++ mode?
That advice is impractical to do something at compiler startup. I just timed it and it was 6 seconds.
Ya, --cuda-path puts it into CUDA mode. Same as clang.
If nvidia shipped circle with the toolkit then you wouldn't need that option!
If it were me, I'd default to checking /usr/local/cuda/bin and then failing that, try which nvcc. Can always improve the search later when someone reports a weird case.
Also, I remembered this: https://github.com/jaredhoberock/nvcc-scons/blob/master/nvcc.py#L47
If it were me, I'd default to checking
/usr/local/cuda/binand then failing that, trywhich nvcc. Can always improve the search later when someone reports a weird case.
On my system it's /opt/local/hpc_sdk/Linux_x86_64/21.3/cuda/. It's in a different spot if you get it from the "HPC" SDK than in the older CUDA Toolkit. I have no idea why there are two separate distributions with what looks like 100% the same content.
Is CUDA_BIN_PATH defined in your environment?
Nevermind, that's something I manually defined at one point
An environment variable isn't a bad idea. Could just check for CUDA_PATH if the extension is .cu or -x cu, and if the env variable isn't defined, then prompt for --cuda-path.