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

Expected GPU memory usage #840

Closed
addisonklinke opened this issue May 2, 2019 · 1 comment
Closed

Expected GPU memory usage #840

addisonklinke opened this issue May 2, 2019 · 1 comment
Labels
question Further information is requested

Comments

@addisonklinke
Copy link

How much memory should I expect to see my GPU using for a Dali pipeline? I am running batches of 24 images where the average (compressed) image size is 58 KB in JPEG format. The pipeline includes the following operators

  • contrast
  • brightness
  • hue
  • saturation
  • crop
  • paste
  • rotate
  • resize
@JanuszL JanuszL added the question Further information is requested label May 6, 2019
@JanuszL
Copy link
Contributor

JanuszL commented May 6, 2019

Hi,
All depends on the image resolution and how your pipeline looks like.
DALI is not executing in place and is processing data in batches. So we need an intermediate buffer between every operator. So for every operator n we need XnYnN (N-number of sample in the batch), where X and Y are sizes of the output image. Some operators like decoder can have big images at the output and each is different, while some like crop will have their output with a fixed size. Also, DALI provides multiple buffering so we need to add space for the output buffers as well. So as the final formula I would count the worst case sizes of images in the batch at each operator output + prefetch queue depth number of output buffers. Also, some operators, like resize need some scratch buffer on their own. We are aware that DALI memory consumption is far from perfect and we want to improve it, but not sacrificing the performance. That is why this will be part of more significant architecture rework.

@JanuszL JanuszL closed this as completed Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants