ptxas segfault

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.

I recommend filing a bug. The instructions are linked to a sticky post at the top of this sub-forum.

Thank you. Just did.

In general, what are best practices to debug ptx? Is there a way to print out the value of a register, for example?

You could use cuda-gdb

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.