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

Remove default_cuda_stream_priority from native code and deprecate it in Python #5717

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

mzient
Copy link
Contributor

@mzient mzient commented Nov 20, 2024

Category:

Refactoring (Redesign of existing code that doesn't affect functionality)

Description:

The argument default_cuda_stream_priority was not used for more than two years and there were no issues raised.
This PR removes it entirely, along with the old StreamPool (no longer used) and deprecates the argument in Python.
Related tests were also removed.

Additional information:

Affected modules and functionalities:

Key points relevant for the review:

Tests:

Tests REMOVED

  • 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

… in Python.

Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
@mzient mzient force-pushed the deprecate_stream_priority_arg branch from c56b613 to ed23fb8 Compare November 20, 2024 19:08
@NVIDIA NVIDIA deleted a comment from dali-automaton Nov 20, 2024
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [20615955]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [20615955]: BUILD PASSED

@@ -215,14 +213,6 @@ void Pipeline::Init(int max_batch_size, int num_threads, int device_id, int64_t
std::min(lowest_cuda_stream_priority, highest_cuda_stream_priority);
const auto max_priority_value =
std::max(lowest_cuda_stream_priority, highest_cuda_stream_priority);
DALI_ENFORCE(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove the lines 206/208 up to here?

int lowest_cuda_stream_priority = 0, highest_cuda_stream_priority = 0;
    // do it only for the GPU pipeline
    if (device_id != CPU_ONLY_DEVICE_ID) {
      CUDA_CALL(cudaDeviceGetStreamPriorityRange(&lowest_cuda_stream_priority,
                                                 &highest_cuda_stream_priority));
    }
    const auto min_priority_value =
        std::min(lowest_cuda_stream_priority, highest_cuda_stream_priority);
    const auto max_priority_value =
        std::max(lowest_cuda_stream_priority, highest_cuda_stream_priority);

I guess we don't need it anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Follow up? max_num_streams (found only in native code) is also unused, so I'll remove it as well.

@mzient mzient merged commit 79d4bf0 into NVIDIA:main Nov 21, 2024
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