我正在使用 Cudafy.net 进行 GPU 计算。除非我尝试使用 NSight 调试内核,否则一切正常。NSight->“启动CUDA调试”后出现这个错误:
“错误反编译 System.Void Network.ActivationFunction(Cudafy.GThread, System.Single[])”
错误后应用程序崩溃。我什至尝试了我能想到的最简单的内核(与错误匹配):
[Cudafy]
public static void ActivationFunction(GThread t, float[] x)
{
// Synapse idx
int i = t.blockDim.x * t.blockIdx.y * t.gridDim.x //rows preceeding current row in grid
+ t.blockDim.x * t.blockIdx.x //blocks preceeding current block
+ t.threadIdx.x;
x[i] = 1;
}
我已经搜索了解决方案并发现了这个: cudafy.net with NSight, debugger not working 但是,即使在对所有步骤进行多次检查后,我仍然无法使调试器运行。我什至无法在应用程序崩溃之前设置断点。也许 nvcc 或 cl 有问题?我错过了什么吗?
谢谢。