the method is used in the global method.
my cuda’s version is cuda11.6,and my ide is VS2022,
the command line is
(Approximate command-line. Settings inherited from host are not visible below.)
(Please see the output window after a build for the full command-line)
Driver API (NVCC Compilation Type is .cubin, .gpu, or .ptx)
set CUDAFE_FLAGS=–sdk_dir "C:\Program Files (x86)\Windows Kits\10"
“C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin\nvcc.exe” --use-local-env -ccbin “C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX64\x64” -x cu -G --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static -o x64\Debug%(Filename)%(Extension).obj “%(FullPath)”
Runtime API (NVCC Compilation Type is hybrid object or .c file)
set CUDAFE_FLAGS=–sdk_dir "C:\Program Files (x86)\Windows Kits\10"
“C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin\nvcc.exe” --use-local-env -ccbin “C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX64\x64” -x cu -G --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static -g -Xcompiler "/EHsc /nologo /FS /Zi " -o x64\Debug%(Filename)%(Extension).obj “%(FullPath)”