Repository navigation
fix(optimizer): track Adam updates per parameter - #267
Open
superme1one wants to merge 2 commits into
Open
superme1one wants to merge 2 commits into
superme1one wants to merge 2 commits into
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Track Adam update counts per parameter, serialize named counters, and retain loading of legacy global-step checkpoints.
Motivation
Parameters that receive gradients late or intermittently must use their own update count for bias correction. Closes #235.
Type of Change
fix; no public API removal.Platforms Affected
CPU and CUDA optimizer/checkpoint code.
Smoke Test Result
Delayed, intermittent, absent and zero-gradient cases, named reorder/resume, legacy loading, and unequal-count checkpoint round trips passed. Three 10,000-step runs (SGD, default Adam and nondefault Adam) passed 675 parameter/state/counter comparisons against CPU PyTorch. Counters matched exactly; the largest Adam parameter difference was 7.16e-7.
The combined candidate stack passed 228 CPU tests (3 skips) and 229 Iluvatar GPU tests (2 CPU-only death checks skipped), with no failures. Coverage includes optimizer state, shared parameters, autograd and checkpoint round trips. The GPU build uses CoreX 4.3.0.20250624 with a separately recorded compatibility layer. NVIDIA execution and hosted CI are pending.
Test Results on Supported Platforms
Validated on the platforms listed above. Local formatting and patch-application checks passed. Hosted CI is tracked separately from the recorded target-platform tests. Affected backends not available in this session require their normal CI/owner checks.
Benchmark / Performance Impact
Correctness fix; no performance gain claimed.
Notes for Reviewers
Base:
InfiniTensor/InfiniTrain@e19a56dcb56bec11f1af63c089a1e8ae03ff24c7. Verification date: 2026-11-16. Detailed test inputs, source hashes and logs are retained in the separate validation package; performance reports are excluded from the source patch.Closes #235.
CI approval status at submission
The upstream pull-request workflows are
action_requiredand have not scheduled jobs. A repository maintainer needs to approve the runs. Target-platform tests are recorded above. This repository did not automatically run checks for the feature-branch push. Local formatting and target-platform results are recorded above. Backend tests requiring upstream infrastructure remain pending.Validation after include cleanup
Added direct standard-library and project includes to Adam and its optimizer/checkpoint tests; removed an unused include. Calculation behavior is unchanged.
afd10d6c09be5d236fc5237f80603986abb10fb3.