I think there was an issue with the version of pytorch I had installed which was compiled for a different version of CUDA I have installed.  Having a clean pytroch installation with the appropriate CUDA version fixed the original problem.  Thanks a lot for that !.
Now, I am facing other issue.
When running my extension on python , the next error is thrown out:
RuntimeError: CUDA error: an illegal memory access was encountered (bspline_cuda at bspline_cuda_kernel.cu:252)
This is the line where there is this check:
AT_CUDA_CHECK(cudaStreamSynchronize(stream));
The code segment that is giving me issues is this:
vector<at::Tensor> bspline_cuda(at::Tensor x, at::Tensor y)
{

    const int n= NCP;
    const int m_mm = NCP;
    const int n_mm = NCP;
    const int k_mm=1;

    dim3 dimGrid((k_mm + BLOCK_SIZE - 1) / BLOCK_SIZE, (m_mm + BLOCK_SIZE - 1) / BLOCK_SIZE);
    dim3 dimBlock(BLOCK_SIZE, BLOCK_SIZE);

    auto a  = at::zeros_like(x);
    auto b  = at::zeros_like(x);
    auto c  = at::zeros_like(x);
    auto d  = at::zeros_like(x);
    
    auto delta  = at::zeros(NCP-1,  at::kFloat);
    auto Delta  = at::zeros(NCP-1,  at::kFloat);
    auto M      = at::zeros({NCP,NCP},  at::kFloat);
    auto D      = at::zeros(NCP,  at::kFloat);

    auto TensorM_inv = at::zeros({NCP,NCP});

    for (int j =0; j<n; j++)
        for (int i=0;i<n; i++)
            TensorM_inv[i][j] = M_inv[i][j];

 AT_DISPATCH_FLOATING_TYPES( a.type(), 
    "NaturalCubicSplinePart1",
       ([&] 
        {
        NaturalCubicSplinePart1<scalar_t><<< N/TPB, TPB >>>(
                   a.data<scalar_t>(), 
                   delta.data<scalar_t>(), 
                    Delta.data<scalar_t>() , 
                     x.data<scalar_t>(), 
                  y.data<scalar_t>() 
                     );
                }
              )
        );

at::cuda::CUDAStream stream = at::cuda::getCurrentCUDAStream();
AT_CUDA_CHECK(cudaStreamSynchronize(stream));

Thanks a lot in advance for the help.