6.38. 分析器控制

本节介绍低级别 CUDA 驱动程序应用程序编程接口的分析器控制功能。

函数

CUresult cuProfilerStart ( void )
启用性能分析。
CUresult cuProfilerStop ( void )
禁用性能分析。

函数

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

为当前上下文启用活动分析工具的性能收集。如果性能分析已启用,则 cuProfilerStart() 不起作用。

cuProfilerStart 和 cuProfilerStop API 用于以编程方式控制性能分析粒度,从而允许仅对选择的代码段进行性能分析。

注意

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

另请参阅

cuProfilerInitialize, cuProfilerStop, cudaProfilerStart

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

为当前上下文禁用活动分析工具的性能收集。如果性能分析已禁用,则 cuProfilerStop() 不起作用。

cuProfilerStart 和 cuProfilerStop API 用于以编程方式控制性能分析粒度,从而允许仅对选择的代码段进行性能分析。

注意

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

另请参阅

cuProfilerInitialize, cuProfilerStart, cudaProfilerStop