Hello all, I have a ptx code file that I would like to compile using ptxas. However, ptxas segfaults and I have no idea why. I have uploaded the ptx in question to here: https://github.com/marsupialtail/ptx-segfault
The exact ptxas command I used was ptxas -arch=sm_61 testing.ptx -o testing.cubin
To assist with debugging on your side, I have a simpler version of that ptx which ptxas likes better. I have included that ptx as well in the repo.
You cannot use printf in a ptx kernel the way you do in CUDA C++. It might be possible to study the ptx from a CUDA C++ kernel that has printf in it, and mimic that, but I’m not sure it would work and haven’t tried it.
You could also declare a global memory location for test/debug purposes, and copy the value of interest there, then print it out from host code after the kernel has finished.