Conversation
…ters Pass split Linear parameters through the custom-op boundary, reconstruct checked views at execution time and split full gradients outside backward. Preserve concatenation for disjoint storage and returned biases, handle promoted dtypes, and compute bias gradients when weights are frozen. Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Replace ConcatenatedTensor with DeferredCat(parts), expose metadata through to_spec and keep materialization inside the custom op. Preserve deferred backward operands for non-FP8 training, reject quantized parts, and make dimension checks consume explicit metadata. Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Keep singleton operands unwrapped and represent split parameters with immutable ParameterParts through the ConcatInput alias. Centralize eager and compiled input preparation, let the custom-op adapter restore saved parts, and select the execution path before concatenating parameters. Name backward weights by their role and update the existing MLA caller. Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Restore compile_unsupported_reason, setup_saved_tensors(ctx), the original backward operand names, and the existing adapter contract. Remove the unrelated MLA changes. Retain the parameter-parts alias and helper, split-parameter correctness fixes, and focused regression coverage. Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
This branch has not been deployed
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
Compiled
te.Linear(parameters_split=...)can consume adjacent parameter partswithout a concatenation copy. Pass the original parts through the custom op and
construct a checked view inside the consumer, preserving separate Parameters,
state-dict names and gradients. Disjoint or noncontiguous parts use concatenation.
This PR targets upstream
mainand adds split-parameter compile support only tote.Linear.ConcatInput[T]describes an ordinary operand or immutableParameterParts. A singleconcat_inputhelper keeps singleton tensors unchanged,uses
noop_catin eager, and defers supported compiled operands. Original partscross the op boundary; fake implementations receive metadata and the real
consumer constructs the view. Linear retains its existing final configuration
validation and
setup_saved_tensors(ctx)hook.Type of change
Changes
concatenating them; retain final validation of the prepared op arguments.
backward op; recheck storage adjacency on each execution.
Validation and remaining work
native TE extension: complete
test_torch_compile.pypassed (187 passed,46 skipped, 1 existing non-strict xfail passed). Includes 45 focused split/API
cases covering storage and parameter replacement, CUDA Graphs, saved hooks,
version checks, gradient targets, recipes and returned bias.
passed; tested source hashes match the commit.
backward, and earlier split-projection measurements found host overhead for
small shapes. Ordinary-Linear CPU latency has not been benchmarked. No general
speedup or Blackwell/distributed validation is claimed.
Checklist