2024-05-23 14:32:52.558221: E tensorflow/compiler/xla/backends/profiler/gpu/cupti_error_manager.cc:194] cuptiSubscribe: error 15: CUPTI_ERROR_NOT_INITIALIZED
2024-05-23 14:32:52.558245: E tensorflow/compiler/xla/backends/profiler/gpu/cupti_error_manager.cc:459] cuptiGetResultString: ignored due to a previous error.
2024-05-23 14:32:52.558256: E tensorflow/compiler/xla/backends/profiler/gpu/cupti_tracer.cc:1746] function cupti_interface_->Subscribe( &subscriber_, (CUpti_CallbackFunc)ApiCallback, this)failed with error
2024-05-23 14:32:52.558293: I tensorflow/tsl/profiler/lib/profiler_session.cc:131] Profiler session tear down.
在windows环境WSL ubuntu22.04使用tensorflow的profiling时遇到如上问题
问题原因:无法获取GPU权限
(1)官方网站解决方案:(将英文翻译成了汉语)
使用'sudo'或作为具有CAP_SYS_ADMIN功能集的用户启动该工具
GPU性能计数器控制需要 Linux 显示驱动程序 418.43 或更高版本
我查到的解决方法是打开Nvidia控制面板,设置“允许所有用户访问GPU性能计数器”
参考:
Ubuntu深度学习环境配置(Tensorflow-GPU)及运行程序遇到的问题_layout failed: invalid argument: subshape must hav-CSDN博客
CUPTI Initialization error · Issue #99615 · pytorch/pytorch · GitHub