Clean up remaining HAVE_TE gating in GPT experimental specs and inference controller#4223
Clean up remaining HAVE_TE gating in GPT experimental specs and inference controller#4223returnL wants to merge 3 commits into
Conversation
|
This PR has been automatically converted to draft because all PRs must start as drafts. When you are ready for review, click Ready for Review to begin the review process. This will:
See the contribution guide for more details. |
9a11204 to
2d2f621
Compare
|
Hi @mcore-oncall , this is a follow-up cleanup PR to #3763 that removes remaining HAVE_TE gating inconsistencies. The changes are minimal and low-risk:
Could you please help review or assign reviewers? Thanks! |
|
Hi @returnL Thanks a lot for the contribution! Could you resolve merge conflicts, please? |
cb1e904 to
d092d97
Compare
|
Hi @dimapihtar, Thanks for the reminder. I have rebased this PR on the latest The updated branch has been pushed. Please let me know if anything else is needed. |
d092d97 to
8f7e636
Compare
8f7e636 to
28efd8e
Compare
28efd8e to
c98a714
Compare
Greptile SummaryThis PR removes a duplicated local
Confidence Score: 5/5Safe to merge — both changes are pure cleanup with no logic alterations. The removed try/except block in text_generation_controller.py was verified to be entirely unused (HAVE_TE never referenced after definition). The migration to the shared HAVE_TE flag in experimental_attention_variant_module_specs.py is consistent with how every other file in the extensions layer handles TE availability, and the TESpecProvider = None fallback mirrors the pre-existing NameError-equivalent behaviour when TE is absent. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Module Import] --> B{HAVE_TE?\nfrom megatron.core.extensions.transformer_engine}
B -- Yes --> C[import TESpecProvider\nfrom transformer_engine_spec_provider]
B -- No --> D[TESpecProvider = None]
C --> E[_get_backend_spec_provider]
D --> E
E --> F{config.use_kitchen?}
F -- Yes --> G[KitchenSpecProvider\nfallback=TESpecProvider]
F -- No --> H[TESpecProvider]
Reviews (1): Last reviewed commit: "Merge branch 'main' into unify-te-gating..." | Re-trigger Greptile |
What does this PR do ?
Follow up on #3763 by cleaning up two remaining low-risk HAVE_TE gating inconsistencies.
megatron.core.extensions.transformer_engine.HAVE_TEinmegatron/core/models/gpt/experimental_attention_variant_module_specs.pymegatron/core/inference/text_generation_controllers/text_generation_controller.pyThis PR intentionally does not touch files where local TE detection is still required or was previously reverted.
Contribution process
Pre-checks
Code review
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!
All PRs start as draft. If you open a non-draft PR, it will be automatically converted to draft.
Step 1: Mark PR as "Ready for Review"
.github/CODEOWNERS.Final Review might get declined if these requirements are not fulfilled.
Step 2: Final Review
For PRs that change
megatron/core, once all expert reviewers have approved, theFinal Reviewlabel is applied automatically and final reviewers are assigned.For PRs outside
megatron/core, this step is skipped.Step 3: Approved
Once all required reviewers have approved, the
Approvedlabel is applied automatically.Merge
Any member of mcore-engineers will be able to merge your PR.
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.