Insert CUDA/C code in ptx file generated by "-keep" in Linux

Dear

There are some way to insert the CUDA code in the intermediary ptx file in Linux Nsight like it can be done in Visual Nsight?

How it can be done with Nsight enviroment in Linux?

Thanks

Luis Gonçalves

What are you trying to accomplish (what is your use case)? If the goal is to simply insert some custom PTX into a framework of regular CUDA code, I would suggest looking at inline assembly code, i.e. asm() statements. If the goal is dynamic code generation at runtime, I would suggest looking at the support for JIT compilation from C++ code added in CUDA 7.x.

My idea, now is to identify how the CUDA is compiled to PTX and interpret .ptx files.

Later, I will want to know how to insert .ptx files in the chain of compilation (and not with asm()).

Thanks

Luis Gonçalves

I notice that in Visual Nsight there is not included the CUDA code in the .ptx file generated with the --keep option. It warn me that only it happens with compute capability bellow 2.0.

But I still want to insert .ptx files in the compilation chain. How to do that?

Thanks

Luis Gonçalves