6.35. 性能分析器控制
本节介绍CUDA运行时应用程序编程接口的性能分析器控制功能。
Functions
- __host__ cudaError_t cudaProfilerStart ( void )
- Enable profiling.
- __host__ cudaError_t cudaProfilerStop ( void )
- Disable profiling.
Functions
- __host__ cudaError_t cudaProfilerStart ( void )
-
启用性能分析。
返回
描述
为当前上下文启用活动性能分析工具的配置文件收集功能。如果性能分析已启用,则cudaProfilerStart()不会产生任何效果。
cudaProfilerStart和cudaProfilerStop API用于通过编程方式控制分析粒度,允许仅对选定的代码片段进行分析。
Note:请注意,此函数也可能返回之前异步启动的错误代码。
另请参阅:
- __host__ cudaError_t cudaProfilerStop ( void )
-
禁用性能分析。
返回
描述
禁用当前上下文中活动性能分析工具的配置文件收集。如果性能分析已禁用,则cudaProfilerStop()不会产生任何效果。
cudaProfilerStart和cudaProfilerStop API用于通过编程方式控制分析粒度,允许仅对选定的代码片段进行分析。
Note:请注意,此函数也可能返回之前异步启动的错误代码。
另请参阅: