Suggestion for source code export

Glad to know that the newest version support --import-source to binding source code into ncu report from command line. However, there is no support for exporting source code from command line.

Could you consider to add such function? For example, --export-source and specify kernel by --kernel-id, and --source-page=source_and_sass etc.

Also, I use ncu-gui to export source code with metrics. The exported file contains source code and their file name. But it misses the full path of corresponding files.
Could you add the full path into the source file export function?

The ability to export the Source page from the command line is being planned, but I don’t have a definitive ETA yet.

The exported file contains source code and their file name. But it misses the full path of corresponding files
Sure, sounds like a reasonable request. I will open a ticket for this.

Note that you can potentially implement the export on the command line yourself using the python rules interface, at least as long as the source is locally available. The attached rule is using the NvRules API to query the information from the collected profile result (action) and print it to stdout. You can drop it in Nsight Compute’s sections directory and then collect the SourceCounters section on the CLI.

You can find more info on the NvRules API here NvRules API :: Nsight Compute Documentation

SourcePage2.py (2.0 KB)

1 Like

OK. Thanks for your reply. I’ll have a try.