简体   繁体   中英

Running the CUDA command line profiler programmatically

How do I programmatically launch a CUDA command line app under the CUDA profiler and access the generated profiling information stored as .csv files by the profiler?

Background:

I'm writing a program that automates performance comparisons between CPU and GPU versions of equivalent codes. The program takes the paths to two executable files as arguments, one for the CPU and one for the GPU. The program then profiles the GPU version by running it under the CUDA command line profiler and analyses the results.

I'm using Windows 7.

I would like to launch the profiler by using the system() or ShellExecute() call.

I have to tried to run it like this: system("nvvp + filepath")

I have read the Compute Command Line Profiler User guide, but have not found the required information there.

Welcome to Stack Overflow.

To sum up the comments, the answer is basically that you shouldn't launch the profiler programmatically. You would end up with invalid comparison results and the profiler does not provide metrics such as memory usage.

Instead, keep track of memory usage within the applications, launch them with regular system calls and time them with Windows timers .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM