-
Notifications
You must be signed in to change notification settings - Fork 3
[Core] Add recurring D2H window scheduling #131
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
Draft
XbzOnGit
wants to merge
16
commits into
main
Choose a base branch
from
feat/recurring-d2h-windows
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
55b9d6f
[Core] Implement recurring D2H windows
XbzOnGit 9562842
[Core] Queue D2H patterns and return acceptance
XbzOnGit b86beba
[Core] Age capacity flush fallback evidence
XbzOnGit f6521af
[Core] Add binary-adaptive recurring D2H grants
XbzOnGit 5e4f636
Merge origin/main into feat/recurring-d2h-windows
XbzOnGit d7a81ae
[Megatron] Disable windows with synchronous P2P
XbzOnGit cd345c2
[Test] Fix D2H window CPU classification
XbzOnGit becb5e4
[Megatron] Add final residual hook
XbzOnGit b5c5b63
Update Megatron integration for validation replay
XbzOnGit f47901f
[Megatron] Add distributed-aware hook policies
XbzOnGit dd5627b
[Megatron] Record runtime validation dataset mapping
XbzOnGit c7214d1
fix: use current CUDA memory APIs and close deferred record runtimes
Samfisheryu bb36a5b
Share one CUDA error check and keep the memory hints on 12.x
zaoxing fc5a0e2
Stop a drain stall from rewriting what a window learned
zaoxing fed8c76
Refuse a drain pause token the loop cannot act on
zaoxing 7b43d55
Tie the marker registry to the enum and document the missing field
zaoxing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| #pragma once | ||
|
|
||
| #include <cuda_runtime.h> | ||
|
|
||
| #include <stdexcept> | ||
| #include <string> | ||
|
|
||
| namespace ring { | ||
|
|
||
| // Shared by the D2H window translation units so a CUDA failure reports the | ||
| // same "<operation> failed: <reason>" shape wherever it is raised. | ||
| inline void check_cuda(cudaError_t error, const char* operation) { | ||
| if (error == cudaSuccess) | ||
| return; | ||
| throw std::runtime_error(std::string(operation) + | ||
| " failed: " + cudaGetErrorString(error)); | ||
| } | ||
|
|
||
| // Kernel launches report asynchronously, so their errors surface through | ||
| // cudaGetLastError() rather than a return value. | ||
| inline void check_cuda_launch(const char* operation) { | ||
| check_cuda(cudaGetLastError(), operation); | ||
| } | ||
|
|
||
| } // namespace ring |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #pragma once | ||
|
|
||
| #include <cstdint> | ||
|
|
||
| namespace ring { | ||
|
|
||
| enum class D2HWindowProgressKind : uint8_t { | ||
| PACKED_VERSION_COUNTER = 0, | ||
| }; | ||
|
|
||
| enum class D2HWindowGrantPolicyKind : uint8_t { | ||
| BINARY_ADAPTIVE = 0, | ||
| }; | ||
|
|
||
| struct D2HWindowOffset { | ||
| uint64_t begin{0}; | ||
| uint64_t end{0}; | ||
| }; | ||
|
|
||
| struct RecurringD2HWindowConfig { | ||
| bool enabled{false}; | ||
| D2HWindowProgressKind progress{D2HWindowProgressKind::PACKED_VERSION_COUNTER}; | ||
| D2HWindowGrantPolicyKind grant_policy{D2HWindowGrantPolicyKind::BINARY_ADAPTIVE}; | ||
| uint64_t minimum_record_probe_retry_interval_occurrences{0}; | ||
| uint64_t timing_revalidation_retry_interval_occurrences{4}; | ||
| uint64_t capacity_flush_fallback_threshold{0}; | ||
| // Age out isolated fallback evidence after this many complete pattern | ||
| // periods. The progress-distance threshold is this value times T. | ||
| uint64_t capacity_flush_count_reset_interval_periods{32}; | ||
| bool debug_enabled{false}; | ||
| }; | ||
|
|
||
| } // namespace ring |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.