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

Quantize GDS chunk size to 1 MB. #3759

Merged
merged 1 commit into from
Mar 25, 2022
Merged

Quantize GDS chunk size to 1 MB. #3759

merged 1 commit into from
Mar 25, 2022

Conversation

mzient
Copy link
Contributor

@mzient mzient commented Mar 24, 2022

Signed-off-by: Michał Zientkiewicz mzient@gmail.com

Category:

Other Optimization

Description:

Previously, the chunks were just evenly distributed among threads in ThreadPool. This change introduces a granularity, which prevents splitting of small chunks and guarantees alignment of all but the last chunk in the sample.

Additional information:

Affected modules and functionalities:

Key points relevant for the review:

Checklist

Tests

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

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: Michał Zientkiewicz <mzient@gmail.com>
@jantonguirao jantonguirao self-assigned this Mar 24, 2022
size_t chunk_size = static_cast<size_t>( \
div_ceil(static_cast<uint64_t>(curr_tensor_list.nbytes()),
static_cast<uint64_t>(thread_pool_.NumThreads())));
const size_t kGDSChunkGranularity = 1<<20;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const size_t kGDSChunkGranularity = 1<<20;
const size_t kGDSChunkGranularity = 1<<20; // 1 MB

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [4225357]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [4225357]: BUILD PASSED

@mzient mzient merged commit 739bf6b into NVIDIA:main Mar 25, 2022
@mzient mzient changed the title Align GDS chunk size to 1 MB. Quantize GDS chunk size to 1 MB. Mar 25, 2022
@JanuszL JanuszL mentioned this pull request Mar 30, 2022
cyyever pushed a commit to cyyever/DALI that referenced this pull request May 13, 2022
Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jun 7, 2022
Signed-off-by: Michał Zientkiewicz <mzient@gmail.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