使用Cudafy版本1.29,它可以從hereCudafy第3章例子有路徑問題如何解決?
我執行了在安裝文件夾中的實施例中被下載CudafyV1.29 \ CudafyByExample \
具體地,「第3章」的例子,開始線42 Program.cs文件的調用以下:
simple_kernel.Execute();
這是這樣的:
public static void Execute()
{
CudafyModule km = CudafyTranslator.Cudafy(); // <--exception thrown!
GPGPU gpu = CudafyHost.GetDevice(CudafyModes.Target, CudafyModes.DeviceId);
gpu.LoadModule(km);
gpu.Launch().thekernel(); // or gpu.Launch(1, 1, "kernel");
Console.WriteLine("Hello, World!");
}
指定的行拋出此異常:
Compilation error: CUDAFYSOURCETEMP.cu
'C:\Program' is not recognized as an internal or external command, operable program or batch file. .
這是顯而易見的是,路徑具有空間和程序員沒有雙引號或使用〜使其運行。
所以,我沒有寫這個代碼。而且我無法逐句通過CudafyModule km = CudafyTranslator.Cudafy();
中包含的密碼。事實上,我甚至不知道導致異常的完整路徑,它在異常消息中被截斷。
有沒有人有建議如何解決這個問題?
更新#1:我發現在那裏住CUDAFYSOURCETEMP.cu我的電腦上,那就是:
C:\Users\humphrt\Desktop\Active Projects\Visual Studio Projects\CudafyV1.29\CudafyByExample\bin\Debug
...我還在試圖確定什麼程序沿路徑尋找'C:\ PROGRAM〜'。
或許路徑從配置文件來嗎? – sapbucket