Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insuficient memory error #169

Open
sleepingsaint opened this issue Feb 27, 2022 · 0 comments
Open

insuficient memory error #169

sleepingsaint opened this issue Feb 27, 2022 · 0 comments

Comments

@sleepingsaint
Copy link

sleepingsaint commented Feb 27, 2022

Error

I am trying to run the sample_detector.cpp application. It got compiled with no errors ( some are deprecated warnings ) but I think it got compiled properly. Now when I run the yolo-trt I get insufficient memory error.

WARNING: Requested amount of GPU memory (4294967296 bytes) could not be allocated. There may not be enough free memory for allocation to succeed.
WARNING: Skipping tactic 1 due to insuficient memory on requested size of 4294967296 detected for tactic 0.
Try decreasing the workspace size with IBuilderConfig::setMaxWorkspaceSize()

This is the error I am getting.

Solutions I tried

I tried adding setMaxWorkspaceSize as suggested in the error like below:

// filename : modules/yolo.cpp line 164:166
// setting max workspace size as 1 GB 
std::size_t MAX_WORKSPACE_SIZE = 1ULL << 30;
config->setMaxWorkspaceSize(MAX_WORKSPACE_SIZE);

Even adding this didn't resolve the issue. Still getting the error.

Could you please help me? Any where else to add the setMaxWorkspaceSize function or should I do any thing else?

PC Specs

Ubuntu 20.04 LTS
8 GB RAM
Nvidia 940MX - 4 GB graphics card
Tensorrt Docker container with opencv installed

Docker file I used

FROM nvcr.io/nvidia/tensorrt:22.02-py3
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --no-install-recommends -y libopencv-dev

Any help is appreciated. Thanks in advance :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant