[Common] Split grouped activation build - #3430
Open
harryzhou2000 wants to merge 1 commit into
Open
Conversation
Signed-off-by: Harry Zhou <hhanyu@nvidia.com>
Contributor
Greptile SummaryThe PR splits grouped activation CUDA implementations into smaller per-activation and per-direction translation units without changing their APIs or kernel dispatch logic.
Confidence Score: 5/5The PR appears safe to merge, with the moved APIs, build registration, export surface, and source-specific compilation settings preserved. The change only redistributes existing grouped activation definitions, and all moved functions remain uniquely defined and included in the same architecture and fast-math build paths. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Grouped activation APIs] --> B[Per-activation CUDA translation units]
B --> C[Forward implementations]
B --> D[Backward implementations]
B --> E[Dbias implementations]
C --> F[Architecture-specific CMake source list]
D --> F
E --> F
F --> G[Transformer Engine shared library]
Reviews (1): Last reviewed commit: "[Common] Split grouped activation build" | Re-trigger Greptile |
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.
Description
Split five monolithic grouped-activation CUDA translation units into smaller
per-activation and per-direction translation units:
The existing function bodies and exported symbols are moved without changing
kernel logic or public APIs.
swiglu_grouped_dbias.curemains unchanged becauseit contains only one instantiation.
Build performance
The comparison used separate empty ccache directories with zero hits on the same
full-node GCP-NRT allocation (224 logical CPUs), container, venv, source base,
and submodules.
MAX_JOBSandCMAKE_BUILD_PARALLEL_LEVELwere unset, so Ninjaused machine parallelism. Both builds used
NVTE_BUILD_THREADS_PER_JOB=4,NVTE_CUDA_ARCHS=100, and the PyTorch-only configuration. The split build ranfirst, so any system cache warming favored the baseline.
The split increases aggregate compiler work by 13.7% because template parsing
is repeated across more translation units. With machine parallelism, that work
moves off the critical path: the longest translation unit changes from
gelu_grouped.cuto the unrelatedfused_topk_with_score_function.cu.Validation
and clang-format checks passed
git diff --checkpassed0 failures