Skip to content

Fix memory consumption by PyTorch in dlpack zero-copy perf test. #5891

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

Merged
merged 2 commits into from
Apr 24, 2025

Conversation

mzient
Copy link
Contributor

@mzient mzient commented Apr 23, 2025

Category:

Other (e.g. Documentation, Tests, Configuration)

Description:

The test used to create a separate CUDA/torch stream for each run, which resulted in unexpectedly high memory consumption in PyTorch. Using a single global stream fixes the issue.

Additional information:

Affected modules and functionalities:

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

@JanuszL JanuszL self-assigned this Apr 23, 2025
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [27382426]: BUILD STARTED

Copy link
Contributor

@JanuszL JanuszL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remove global as we don't assign anything to the variables in local scope. Other than that 👍

Signed-off-by: Michal Zientkiewicz <[email protected]>
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [27382555]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [27382555]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [27382555]: BUILD PASSED

@mzient mzient merged commit edc7528 into NVIDIA:main Apr 24, 2025
6 checks passed
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