I understood that the error is due to wrong way of accessing the array elements it should be like below:
const int i = (blockIdx.x * blockDim.x) + threadIdx.x;
const int j = (blockIdx.y * blockDim.y) + threadIdx.y;
const int index = j*num_points +i;

out_attributes[index] = value

But if the dimensions of my tensor increases it is very difficult to visualize the memory allocation of tensor to access elements this way.
How to use AT_DISPATCH_FLOATING_TYPES to pass a tensor to the kernel in standard CUDA way ??
When we pass c++ array to cuda kernel as mentioned in the CUDA documentation under section 2.2. Thread Hierarchy
https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html 15
We can access the elements like  out_attribute[i][j][k] = value much easier.