2

我有一个简单的(经过测试的)pycuda 应用程序,并正在尝试对其进行分析。我尝试了 NVidia 的 Compute Visual Profiler,它运行程序 11 次,然后发出此错误:

NV_Warning: Ignoring the invalid profiler config option: fb0_subp0_read_sectors
Error : Profiler data file '/home/jguy/proj/gpu/tdbp/pyArch/temp_compute_profiler_0_0.csv' does not contain profiler output.This can happen when:
a) Profiling is disabled during the entire run of the application.
b) The application does not invoke any kernel launches or memory transfers.
c) The application does not release resources (contexts, events, etc.). The program needs to be modified to properly free up all resources before termination.

我还尝试运行“CUDA_PROFILE python scriptname.py arg1”。它创建了一个文件,其中包含:

NV_Warning: Ignoring the invalid profiler config option: instructions
# CUDA_PROFILE_LOG_VERSION 2.0
# CUDA_DEVICE 0 GeForce GTX 560 Ti
# CUDA_PROFILE_CSV 1
# TIMESTAMPFACTOR fffff7003e38fec8
gpustarttimestamp,method,gputime,cputime,occupancy

如果它有用,我还设置了这些环境变量:

CUDA_PROFILE_CONFIG=temp_cuda_profiler.conf
CUDA_PROFILE_CSV=1
CUDA_PROFILE_LOG=profile.csv
CUDA_PROFILE=1

和 temp_cuda_profiler.conf 包含

gpustarttimestamp
instructions

谷歌搜索了一个小时左右。没运气。感谢您提供的任何见解!

4

1 回答 1

1

使用 import pycuda.autoinit 时,在程序末尾有 pycuda.autoinit.context.detach() 很重要。这解决了问题。

于 2011-03-15T20:46:54.413 回答