NVprof works while NSight Compute says No kernels were profiled

I am having trouble getting ncu to work with CUDA 12.1 for any program.

Details about the system:

NVIDIA-SMI 530.30.02, Driver Version: 530.30.02, CUDA Version: 12.1
GPU: NVIDIA GeForce GTX 1650

Here is a simple CUDA program:

#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);
    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.

Can anyone please help?

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.

You will need to use nvprof.

This problem started with CUDA 12.1. Previously I was using CUDA 11.8 (before formatting my Ubuntu system) and it worked perfectly fine.

This difference is not expected between ncu from CUDA 12.1 versus ncu from CUDA 11.8. Both ncu versions do not support Kepler GPUs.

Can you please confirm the compute capability for the GPU used? Output from nvidia-smi may be useful.

Are you sure? Techpowerup database has the GTX1650 as a Turing SM7.5

I am sorry (I must have earlier looked up an incorrect GPU). You are correct on GTX 1650 being a Turing GPU. This GPU is supported by Nsight Compute.

Does the application run correctly without and with Nsight Compute profiling? Can you share the output?

For some reason if there was some CUDA API error and the kernel was not properly executed you could get this warning:

==WARNING== No kernels were profiled