Is it possible to use NVCC to build only a .PTX file without the need for the visual studio cl.exe?
From what I can gather the cl.exe is only needed for host code compiling as the gpu PTX stuff should all be handled by nvcc.
My current command line is:
[codebox]“%CUDA_BIN_PATH%\nvcc.exe” -arch sm_13 -m 32 -use_fast_math -DNVCC -Xcompiler “/EHsc /W3 /nologo /Ox /Zi” -I"…/" -I"%OPTIX_INCLUDE%" -maxrregcount=32 -ptx -o “in.cu” “out.ptx”[/codebox]
I tried removing ‘-Xcompiler “/EHsc /W3 /nologo /Ox /Zi”’ with no luck and can’t see how cl.exe be needed when it should be for host code but I may eb wrong?
I would set the path to the cl.exe but I don’t want to hard code this as the directory could change between computer systems and version etc. I could just say that an environemtn variable must be created manually for this though… but thats not nice.
Alternatively is it okay to put the cl.exe in the applciation directory to overcome this. It would probably need a lot of files along with it though.