Printing in cuda kernel - C++ - PyTorch Forums
discuss.pytorch.org › t › printing-in-cuda-kernelFeb 26, 2020 · I had the following code snippet and wanted to check the values of ci and cj. (I have removed most of the code in the kernel for readability) #include <stdio.h> #include <torch/extension.h> #include <cuda.h> #include <cuda_runtime.h> #include <vector> namespace { template <typename scalar_t> __global__ void sparse_cuda_index_v2_kernel( const torch::PackedTensorAccessor<scalar_t,2,torch ...