6.38. 性能分析器控制

本节介绍底层CUDA驱动应用程序编程接口的性能分析器控制功能。

Functions

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

Functions

CUresult cuProfilerStart ( void )
启用性能分析。
描述

为当前上下文启用活动性能分析工具的配置收集功能。如果性能分析已启用,则cuProfilerStart()不会产生任何效果。

cuProfilerStart和cuProfilerStop API用于通过编程方式控制分析粒度,允许仅对选定的代码片段进行分析。

Note:

请注意,此函数也可能返回之前异步启动的错误代码。

另请参阅:

cuProfilerInitialize, cuProfilerStop, cudaProfilerStart

CUresult cuProfilerStop ( void )
禁用性能分析。
描述

禁用当前上下文中活动性能分析工具的配置文件收集功能。如果性能分析已处于禁用状态,则cuProfilerStop()不会产生任何效果。

cuProfilerStart和cuProfilerStop API用于通过编程方式控制分析粒度,允许仅对选定的代码片段进行分析。

Note:

请注意,此函数也可能返回之前异步启动的错误代码。

另请参阅:

cuProfilerInitialize, cuProfilerStart, cudaProfilerStop