Quantcast
Channel: CUDAfy.NET
Viewing all articles
Browse latest Browse all 1169

New Post: Visual Profiler (NVVP.exe)

$
0
0
Hi
In order to enable profiling, you'll have to enable profiling through an api call.
Call cudaProfilerStart(); at the start of your program (or at the very least before calling the kernel) and
call cudaProfilerStop(); at the end of your program (or at the very least after calling the kernel).

Those api functions are not currently exposed by cudafy, so you'll have to add the extern references yourself. Personally, I added the following to CUDARuntime.cs in the Cudafy source code, but you can declare them elsewhere if you so chose, just make sure you point to the same dll as cudafy's:
    [DllImport(CUDART_DLL_NAME)]
    public static extern cudaError cudaProfilerStart();

    [DllImport(CUDART_DLL_NAME)]
    public static extern cudaError cudaProfilerStop();

Viewing all articles
Browse latest Browse all 1169

Trending Articles