Replace ModuleSpec with Protocols for LayerNorm submodules#3090
Conversation
|
/ok to test caa1bdc |
|
lgtm; just had a general q (its not the scope of this particular PR for sure), looks like for lot of submodules the builder class can be identity or None or no defaults.. not sure if we should make this more coherent at some point. |
|
Removed the misplaced assert that was causing the test failures! |
Oh yeah definitely, I've been noticing the same thing! "No default" is sensible in a lot of cases (for things that are effectively required), but IdentityOp vs None we should decide on |
|
/ok to test f83cef5 |
|
/ok to test a9c3e1b |
|
/ok to test 1db71cb |
|
CI passed earlier here The CI retriggered after merging main again but that was unnecessary. Will go ahead and merge this since it passed PR CI already and has approvals. |
Co-authored-by: Xin Yao <xiny@nvidia.com> Co-authored-by: Charlie Truong <chtruong@nvidia.com>
Co-authored-by: Xin Yao <xiny@nvidia.com> Co-authored-by: Charlie Truong <chtruong@nvidia.com>
Co-authored-by: Xin Yao <xiny@nvidia.com> Co-authored-by: Charlie Truong <chtruong@nvidia.com>
What does this PR do ?
Creates a unified Protocol representing a LayerNorm and uses it throughout.
Associated design doc: Typed ModuleSpec.pdf
Contribution process
flowchart LR A[Pre-checks] --> B[PR Tests] subgraph Code Review/Approval C1[Expert Review] --> C2[Final Review] end B --> C1 C2 --> D[Merge]Pre-checks
Core 0.8)Code review
The following process is enforced via the CODEOWNERS file for changes into
megatron/core. For changes outside ofmegatron/core, it is up to the PR author whether or not to tag the Final Reviewer team.For MRs into `main` branch
Feel free to message or comment the @mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!
(Step 1): Add PR label
Expert Review(Step 2): Collect the expert reviewers reviews
Expert Reviewlabel when your PR is ready for review.Final Review might get declined if these requirements are not fulfilled.
(Step 3): Final Review
Final Reviewlabel(Optional Step 4): Cherry-pick into release branch
If this PR also needs to be merged into
core_r*release branches, after this PR has been merged, selectCherry-pickto open a new PR into the release branch.For MRs into `dev` branch
The proposed review process for `dev` branch is under active discussion.MRs are mergable after one approval by either
eharper@nvidia.comorzijiey@nvidia.com.Merging your PR
Any member of core-adlr and
core-nemowill be able to merge your PR.