如何使用CUDA 8.0 nvprof剖析OpenCL应用程序 [英] How to profile OpenCL application with CUDA 8.0 nvprof
问题描述
我正在尝试在装有NVIDIA TITAN X和CUDA 8.0的系统中分析OpenCL应用程序a.out
.
I'm trying to profile OpenCL application, a.out
, in a system with NVIDIA TITAN X and CUDA 8.0.
如果是CUDA应用程序,则nvprof ./a.out
就足够了.但是我发现这不适用于OpenCL应用程序,并显示一条消息未分析内核".
If it was CUDA application, nvprof ./a.out
would be enough. But I found this does not work with OpenCL application, with a message "No kernels were profiled."
直到CUDA 7.5,我在COMPUTE_PROFILE=1 >此.不幸的是,文档说:"CUDA 8.0版本中已删除了对使用环境变量COMPUTE_PROFILE的命令行分析器的支持."
Until CUDA 7.5, I successfully used COMPUTE_PROFILE=1
following this. Unfortunately, the documentation says "The support for command-line profiler using the environment variable COMPUTE_PROFILE has been dropped in the CUDA 8.0 release."
问题是,除了降级CUDA以使用nvprof剖析OpenCL应用程序外,还有其他方法吗?
The question is, is there any way other than downgrading CUDA to profile OpenCL application with nvprof?
推荐答案
据我所知,nvprof
从不支持OpenCL分析.
To the best of my knowledge, nvprof
has never supported OpenCL profiling.
使用COMPUTE_PROFILE=1
运行代码会调用基于驱动程序的分析机制,该机制早于nvprof
的引入.这种基于驱动程序的机制已过时,现在已从CUDA 8开始删除,转而使用nvprof
.
Running code with COMPUTE_PROFILE=1
invokes a driver based profiling mechanism which predates the introduction of nvprof
. That driver based mechanism was deprecated a while ago and has now been removed as of CUDA 8 in favour of using nvprof
.
结果,似乎无法使用CUDA工具包来分析在NVIDIA硬件上运行的OpenCL代码.
As a result, it would appear that there is no way to profile OpenCL code running on NVIDIA hardware using the CUDA toolkit.
这篇关于如何使用CUDA 8.0 nvprof剖析OpenCL应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!