#include "stdio.h"
__global__ void add(int a, int b, int *c)
{
*c = a + b;
}
int main()
{
int a, b, c;
int *dev_c;
a = 3;
b = 4;
cudaMalloc((void **)&dev_c, sizeof(int));
add<<<1, 1>>>(a, b, dev_c);
cudaMemcpy(&c, dev_c, sizeof(int), cudaMemcpyDeviceToHost);
printf("%d + %d is %d\n", a, b, c);
cudaFree(dev_c);
return 0;
}
When I use nvprof, like nvprof ./hello it works fine
But using nsight compute, like ncu -f -o mat_mul --set full --target-processes all ./hello it says ==WARNING== No kernels were profiled.
I have used other options, like adding sudo or sudo -E etc, but it doesn’t work.
GeForce GTX 1650 is a Kepler architecture GPU. This is not supported by
Nsight Compute. Refer the GPU support section in the Nsight Compute release notes.