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

Move checkpoint to IterationData. Remove ExecIterData. #5555

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

mzient
Copy link
Contributor

@mzient mzient commented Jul 9, 2024

Category:

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

Description:

Checkpoint was previously stored in an executor-specific structure. It can land directly in IterationData, which will enable it to be carried along the pipeline.

Additional information:

Affected modules and functionalities:

Workspace
Old executor
Checkpointing

Key points relevant for the review:

Tests:

Checkpointing tests (all of them).

  • 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

@@ -74,8 +76,11 @@ class OperatorTraces {
struct IterationData {
int64_t iteration_index = 0;
OperatorTraces operator_traces;
std::shared_ptr<Checkpoint> checkpoint;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used shared_ptr here because it allows Checkpoint to be only forward-declared. Using unique_ptr wouldn't be much more elegant and would require IterationData to be DLL_PUBLIC (meh) and a separate translation unit for the destructor (blah) or a unique_ptr with a custom deleter (blah).

Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
@mzient mzient force-pushed the move_checkpoint_to_iter_data branch from 809f95b to 717a327 Compare July 9, 2024 15:21
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [16441482]: BUILD STARTED

@szkarpinski szkarpinski self-requested a review July 9, 2024 16:10
@szkarpinski szkarpinski self-assigned this Jul 9, 2024
if (checkpointing_) {
id->checkpoint = std::make_shared<Checkpoint>();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it a problem that checkpoint would be NULL when checkpointing_ == false?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think so, @stiepan ?

Copy link
Member

Choose a reason for hiding this comment

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

Me neither.

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [16441482]: BUILD PASSED

Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [16445782]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [16445782]: BUILD PASSED

@mzient mzient merged commit 40a831e into NVIDIA:main Jul 10, 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.

5 participants