Redirecting profiler output to csv file

Hi
Is there a way to redirect profiling information into a CSV file while the profiler is running? Therefore, I can skip an additional step of interpreting the results with -ioption.

Hello,

Yes, you can export the profiling information to a CSV by using the --csv option in the command you use to profile your application.

Depending on what you end up doing with the exported CSV, you might also want to look into generating a regular ncu-rep report with the -o/--export option, and then post-processing the results with the Python report interface which will allow you to have more information about the profile results than just the CSV dump.

If I use nv-nsight-cu-cli --metrics ... --csv --page raw ./app it will print the csv content on the screen. I was looking for a way to append the raw entries in the csv file, so that I can see the content while profiling is in progress.

add this command line argument --log-file $your_desired_csv_file. This will append the raw entries in the csv file. However, it will append undesired progress lines to the top of the csv file. So, edit the uppermost few lines of the csv file after the program execution is done.

The option --log-file redirects everything from the terminal to a file. That includes program outputs and the profiler’s output. But the thing is that, you have to wait until profiler finishes the profiling. Therefore, this option is like other ones.

My question specifically seeks for a way to view the raw table while the profiling is in progress. For example, I launch the profiler with -c 1000 and I want to view the raw tables while the profiling is in progress. Therefore, I can see the the first 100 rows in the table while it is still in progress. I think there should be a way to do that, because each row (information about the invocations) is available after the invocation is profiled. So, when invocation 1 is done, the information is appended to the raw table. That means, when the profiler goes to invocation 2, I should be able to see invocation 1 information.

I even tried nv-nsight-cu-cli --csv --page raw --log-file test.csv --metrics $METRICS ./app, but as I said the information is available at the end of execution. In other words, while the program is being profiled, I am not able to see which invocation number is under process.

Thanks for getting in touch. Currently there isn’t any reporting available while the tool is still running the profile process. It is all processed after the run completes.