Create .ptx files from .cu files
조회 수: 11 (최근 30일)
이전 댓글 표시
Hi everyone,
I am completely knew to Cuda and wanted to practice with Matlab. Here is the code I wanted to run :
When downloaded the files, there were some .cu files. Therefore I read this :
It looks like .cu files have to be compiled to produce .ptx files that can then be run by Matlab. However, after hours and hours (and hours) of unsuccessful tries, I never made it. I installed Visual Studio 2012, then CUDA toolkit 6.0 and tried to run
nvcc -ptx "my file"
but I never passed the "cl.exe is not in PATH" error... And I tried many many things, like adding the path in ALL my environment variables...
So, it looks like it never manages to find cl.exe automatically, but I have found it (in different folder). Is there a way to manually add it when I type
nvcc -ptx "my file"
? Or maybe someone has a working step by step tutorial that works to compile the .cu files ?
Thanks for your help,
Alex
댓글 수: 1
Edric Ellis
2014년 7월 29일
Have you tried launching a "Visual Studio Command Prompt" from the "Start" menu and then using NVCC from there?
답변 (1개)
Herve Hugonnet
2020년 5월 8일
편집: Herve Hugonnet
2020년 5월 8일
I had the same issue and solved it by adding the path to the cl.exe filed in the comand line (change the path to match your visual studio installation) :
nvcc -ptx "test_kernel.cu" -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64"
Also make sure you installed cuda
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 GPU Computing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!