Converting nsys-rep file into a CSV file with formatting like the summary page in NCU GUI

I want to get the summary tables from NCU GUI from a large quantity of reports as CSV files, it there a way to bulk convert them or convert them using the terminal?

Which exact summary tables are you referring to? You can use the Nsight Compute CLI (ncu) to export data from reports as CSV and it will be easier to integrate ncu into a script for batch processing.

Simply import the report with -i and set --csv to generate the output as CSV. You can also set --log-file <file> if you want to write the output somewhere but the console. Depending on which exact information you want to export, you may need to pass another --print-* or --page flag. You can start with --page raw to print the contents of the UI’s Raw page, i.e. the table of all captured workloads and metrics. You can add --metrics to filter for individual metrics.

I recommend to check the CLI documentation here.

For even more fine-grained access, you can also use the Python Report Interface to access report contents from your own python script, but that may be not needed for your use case.

I am looking to get this table from the NCU GUI, but I have like 30 or so .ncu-rep report files so I was wondering if there was a way to export them quickly.

Unfortunately, this exact page is not yet supported on the CLI as-is. You can export the raw page and filter the metric list like
ncu -i report.ncu-rep --csv --page raw --metrics launch__registers_per_thread,gpc__cycles_elapsed.max,sm__throughput.avg.pct_of_peak_sustained_elapsed,gpu__compute_memory_throughput.avg.pct_of_peak_sustained_elapsed,gpu__time_duration.sum
If needed, you can configure the way the kernel name is shown with --print-kernel-base.

1 Like

is it possible to get the block size as well as this is useful to the profiling tests we are doing on the program.

You can refer to the metrics shown on the UI’s Raw page (may need to check tool tips if the metric has a corresponding label) as well as this reference table, which includes the launch metrics you are looking for.

this is what the current command looks like (ignore the starting part and filePath, it is due to the way our systems were installed and how I am bulk converting them).

"/usr/local/cuda/bin/ncu --import " + filePath + " --csv --print-kernel-base function --page raw --metrics launch__registers_per_thread,gpc__cycles_elapsed.max,sm__throughput.avg.pct_of_peak_sustained_elapsed,gpu__compute_memory_throughput.avg.pct_of_peak_sustained_elapsed,gpu__time_duration.sum,launch__blocks_size >> "+ fileName + “.csv”

this command is still not generating the block size in the csv file…

The GUI version is also not giving me any tooltips in regards to the name of the metric “block size”

I think the reason for this is a typo in the documentation (and therefore also in your command). Please try with launch__block_size instead (i.e. no “s”). The missing tooltip would have the same typo root-cause.

thanks this works :).
Is there a way to get the column headers to be like the ones in the summary instead of the metric ones?

There is no way to get this with standard csv output. You can use the python report interface mentioned earlier to generate your own output format, if that level of customization is needed.