Closed barzan-hayati closed 9 months ago
这个警告是由于 CUDA 模块延迟加载未启用导致的。启用它可以显著减少设备内存的使用。CUDA 模块延迟加载是一种选项,它允许在需要时才加载 CUDA 模块,而不是一开始就加载所有模块。这样可以减少设备内存的使用,特别是当有多个 CUDA 应用程序在同一时间运行时。
要启用 CUDA 模块懒加载,可以设置环境变量 CUDA_MODULE_LOADING 为 1。可以在终端中使用以下命令来设置:
`#include
std::string env_var = "CUDA_MODULE_LOADING=1"; _putenv(env_var.c_str()); `
std::string env_var = "CUDA_MODULE_LOADING=1"; _putenv(env_var.c_str());
And where I should add these codes? There are multiple functions in calibrator.cpp
and retina_mnet.cpp
#include <cuda_runtime_api.h> #include <cstdlib> std::string env_var = "CUDA_MODULE_LOADING=1"; _putenv(env_var.c_str());
Nothing changes with these commands.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The problem has not been resolved yet.
Mark, same error.
Please check if this comment can solve this issue. https://github.com/wang-xinyu/tensorrtx/issues/1310#issuecomment-1722243922
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Env
About this repo
Your problem
what is your command? e.g.
./retina_mnet -s
what's your output? By setting
USE_FP32
I got this warning:By setting
USE_FP16
I got this warning:Meanwhile I could do face detection using these engines.
Now I want to load these engines to deepstream pipeline, what I have done perfectly for
cuda 11.4
andtensorrt 8.2
onubuntu 18.04
. But for this specs I receive this error and it seems that pipeline could not load engine correctly: