cudaError_t cudaProfilerInitialize ( const char *  configFile,
const char *  outputFile,
cudaOutputMode_t  outputMode 
)

Using this API user can specify the configuration file, output file and output file format. This API is generally used to profile different set of counters by looping the kernel launch. configFile parameter can be used to select profiling options including profiler counters. Refer the "Command Line Profiler" section in the "Compute Visual Profiler User Guide" for supported profiler options and counters.

Configurations defined initially by environment variable settings are overwritten by cudaProfilerInitialize().

Limitation: Profiling APIs do not work when the application is running with any profiler tool such as Compute Visual Profiler. User must handle error cudaErrorProfilerDisabled returned by profiler APIs if application is likely to be used with any profiler tool.

Typical usage of the profiling APIs is as follows:

for each set of counters
{
cudaProfilerInitialize(); //Initialize profiling,set the counters/options in the config file
...
cudaProfilerStart();
// code to be profiled
cudaProfilerStop();
...
cudaProfilerStart();
// code to be profiled
cudaProfilerStop();
...
}

Parameters:
configFile - Name of the config file that lists the counters for profiling.
outputFile - Name of the outputFile where the profiling results will be stored.
outputMode - outputMode, can be cudaKeyValuePair OR cudaCSV.
Returns:
cudaSuccess, cudaErrorInvalidValue, cudaErrorProfilerDisabled
Note:
Note that this function may also return error codes from previous, asynchronous launches.
See also:
cudaProfilerStart, cudaProfilerStop


Generated by Doxygen for NVIDIA CUDA Library  NVIDIA