NVCC /Od option

I’m looking over several .ptx listings generated by nvcc that were created using the options --keep and -Xcompiler /Od (and/or -Xopencc /Od). Regardless of what level I use for the /O option, each listing has a “// -O3 (Optimization level)” line, and the generated ptx code is the same. I also verified that this code is embedded in the the program executable, so this is what the JIT sees, and not some bug in generating the listing file. While it certainly is true that the /Od compiler option is passed onto the host compiler (Windows cl.exe) for controlling optimization in the non-device code, the /O option does not change the generated ptx code, and this very annoying, inconsistent, comment within the listing. I’m wondering if this option, or any other option for that matter, can be used to control whether to generate optimized or unoptimized ptx code. Does anyone know?

[font=“Courier New”]nvopencc[/font] does not have a [font=“Courier New”]/Od[/font] option. But e.g. [font=“Courier New”]-Xopencc -O0[/font] should work.

[font=“Courier New”]nvopencc[/font] does not have a [font=“Courier New”]/Od[/font] option. But e.g. [font=“Courier New”]-Xopencc -O0[/font] should work.