CUDA Driver API (PDF) - v11.0.207 (older) - Last updated June 29, 2020 - Send Feedback

## 5.29. Profiler Control

This section describes the profiler control functions of the low-level CUDA driver application programming interface.

### Functions

CUresult cuProfilerStart ( void )
  Enable profiling.
CUresult cuProfilerStop ( void )
  Disable profiling.

### Functions

CUresult cuProfilerStart ( void )
  Enable profiling.

  ###### Returns

  CUDA_SUCCESS, CUDA_ERROR_INVALID_CONTEXT

  ###### Description

  Enables profile collection by the active profiling tool for the current context. If profiling is already enabled, then cuProfilerStart() has no effect.

  cuProfilerStart and cuProfilerStop APIs are used to programmatically control the profiling granularity by allowing profiling to be done only on selective pieces of code.

  Note:

  Note that this function may also return error codes from previous, asynchronous launches.

  See also:

  cuProfilerInitialize, cuProfilerStop, cudaProfilerStart

CUresult cuProfilerStop ( void )
  Disable profiling.

  ###### Returns

  CUDA_SUCCESS, CUDA_ERROR_INVALID_CONTEXT

  ###### Description

  Disables profile collection by the active profiling tool for the current context. If profiling is already disabled, then cuProfilerStop() has no effect.

  cuProfilerStart and cuProfilerStop APIs are used to programmatically control the profiling granularity by allowing profiling to be done only on selective pieces of code.

  Note:

  Note that this function may also return error codes from previous, asynchronous launches.

  See also:

  cuProfilerInitialize, cuProfilerStart, cudaProfilerStop