| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Signed-off-by: hongbinl <hongbinl@nvidia.com>
Signed-off-by: hongbinl <hongbinl@nvidia.com>
Greptile SummaryThis PR integrates device-initiated GroupedLinear activations with paged stashing while preserving the existing quantized-storage markers.
Confidence Score: 5/5The PR appears safe to merge with no concrete correctness, security, or compatibility defects identified. The marker is attached to the same physical activation and scale tensors subsequently flattened for autograd, and the new branches consistently handle plain, unquantized rowwise, quantized columnwise, and absent saved inputs. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[GroupedLinear activation] --> B{Saved representation}
B -->|Plain tensor| C[Mark activation]
B -->|Unquantized grouped| D[Mark rowwise data]
B -->|Quantized grouped| E[Mark columnwise data and scale inverse]
C --> F[prepare_for_saving]
D --> F
E --> F
F --> G[PyTorch save_for_backward]
G --> H[Paged stash and reload]
Reviews (1): Last reviewed commit: "Clarify paged stash grouped tensor marke..." | Re-trigger Greptile |
Sorry, something went wrong.
|
@vasunvidia @ksivaman Could you review this PR? thanks! |
Sorry, something went wrong.
|
Looks good to me |
Sorry, something went wrong.
|
Hi @timmoon10 @vthumbe1503 , can you guys take a look and merge this PR? This is for sync-free moe + grouped linear path |
Sorry, something went wrong.
There was a problem hiding this comment.
Changes for this PR LGTM.
I have another PR here https://github.com/NVIDIA/TransformerEngine/pull/3350/changes#diff-3399df04d9593b14f5d1d886f72cf4fd752677dc02394cb9ad8d8719afe19193R308
that changes this method altogether
So it turns out, along with BF16 groupedtensor, this wont work for nvfp4 grouped tensor as well. Since the columnwise data is transposed, paged stashing would read the data incorrectly in case of NVFP4. But that would also need change at the MCore level. cc: @vasunvidia
I wouldnt block this PR for nvfp4 use-case. Changes for BF16/FP16 grouped tensor's paged stashing looks good to me.
Sorry, something went wrong.
| tensor.columnwise_data is not None | ||
| ), "Columnwise data is not set for grouped tensor" | ||
|
|
||
| if not hasattr(tensor, "columnwise_data"): |
There was a problem hiding this comment.
can we change this to
| if not hasattr(tensor, "columnwise_data"): | |
| if not isinstance(tensor, GroupedTensorStorage): |
Sorry, something went wrong.
|
/te-ci pytorch |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
Enable paged stashing integrations to identify the activation storage saved by the device-initiated PyTorch GroupedLinear autograd function.
This is a follow-up to #3224. The paired Megatron-LM integration is NVIDIA/Megatron-LM#6828.
Validation