Reputation: 21
I'm using Cudafy.net for GPU computations. Everything works fine unless I try to debug the kernel using NSight. After NSight->"Start CUDA debugging", this error occurs:
"Error decompiling System.Void Network.ActivationFunction(Cudafy.GThread, System.Single[])"
After the error the application crashes. I tried even the most simple kernel I could think of like this one (matches to the error):
[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;
}
I've already searched for solution and found this: cudafy.net with NSight, debugger not working However even after multiple check of all steps, I still can't make the debugger running. I can't even set breakepoint before the app crashes. Maybe there's something wrong with nvcc or cl? Am I missing something?
Thanks.
Upvotes: 2
Views: 126
Reputation: 893
I was getting this error because the working directory for NSight was not set correctly. You need to set it where the executable for your application is actually running -- when debugging that is typically the debug directory (i.e. C:\somepath\yourproject\bin\Debug).
You set this value via the "NSight User Properties" button in the Solution Explorer.
Upvotes: 1