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

Pin inputs to decoder operators as well #5003

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

jantonguirao
Copy link
Contributor

@jantonguirao jantonguirao commented Aug 17, 2023

Category:

Refactoring

Description:

  • ImageDecoder (particularly HW decoder) requires the input to be on pinned memory (as it is copied to GPU memory). If the input of the operator is not pinned, we need to copy the inputs to a pinned buffer unnecessarily.
  • Before this change, all mixed operator inputs are pinned except the inputs of the decoders.* operators.
  • This PR removes that exception, allowing the input to be consumed directly by nvjpeg
  • In the following picture we can see a gap in the execution between parsing samples and the decoding itself, due to copying 512 samples to pinned memory.
    image

Additional information:

Affected modules and functionalities:

  • ImageDecoder

Key points relevant for the review:

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

Signed-off-by: Joaquin Anton <janton@nvidia.com>
@JanuszL JanuszL self-assigned this Aug 17, 2023
@jantonguirao
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [9413151]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [9413151]: BUILD PASSED

@jantonguirao jantonguirao merged commit 2bdc8a9 into NVIDIA:main Aug 22, 2023
5 checks passed
JanuszL pushed a commit to JanuszL/DALI that referenced this pull request Oct 13, 2023
Signed-off-by: Joaquin Anton <janton@nvidia.com>
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

Successfully merging this pull request may close these issues.

4 participants