Repository navigation
Support mark_unbacked in minimal_fx_tracer - #3046
Conversation
|
@claude Pls review |
|
Claude finished @tugsbayasgalan's task in 3m 21s —— View job Code Review: Support mark_dynamic in minimal_fx_tracer
Overall this is a clean, well-scoped addition that stays true to the minimal tracer philosophy. The PR description is excellent at calling out what's deliberately in/out of scope. A few items I'd want addressed: Issues1. Missing blank line before 2. DTensor + mark_dynamic: attribute propagation concern The test If the attribute doesn't propagate, the inner tensor falls through to 3. dim_range = dynamic_ranges.get(dim)
if dim_range is None:
raise ValueError(
f"Dimension {dim} is in _dynamo_dynamic_indices but missing "
f"from _dynamo_dynamic_range. This likely indicates a "
f"torch._dynamo.mark_dynamic() internal inconsistency."
)4. Test Feedback5. Duplicated 6. Good: 7. Minor / Optional
SummaryThe implementation is well-structured and the test coverage is thorough. The main concern is the DTensor attribute propagation path (#2) — I'd want to understand whether the test actually passes as-is, since the code path suggests dynamic metadata could be lost during subclass unwrapping. The |
00bd731 to
af781fe
Compare
|
@claude Do another round |
|
Claude finished @tugsbayasgalan's task in 4m 57s —— View job Second Round Review: Support mark_dynamic in minimal_fx_tracer
This is a second pass with fresh eyes. The first round covered the broad strokes well; this round focuses on correctness subtleties and a few things the first round missed. Status of First-Round Items#1 (blank line style) — Still present but truly cosmetic. Not worth blocking on. #2 (DTensor attribute propagation) — After deeper investigation, the comment at #3 (KeyError risk) — Still present. #4 (guard ordering) — Still applicable. No comment explaining why #5 (duplicated fake_mode extraction) — Still present. Lines 87-94 and 119-126 are identical 8-line blocks. New Observations1.
In practice this appears to work because 2.
Consider moving 3.
def _fakeify_input(fake_mode, arg, *, input_name):
if not isinstance(arg, torch.Tensor):
return arg
symbolic_context = _symbolic_context_for_marked_dynamic_dims(arg)
if symbolic_context is not None:
from torch._dynamo.source import LocalSource
from torch.fx.experimental.symbolic_shapes import TrackedFake
# ... rest of symbolic path
return fake_mode.from_tensor(arg, static_shapes=True)4.
5. Test:
6. Guard regex in
SummaryThe implementation is solid and well-designed. None of the new findings are blocking. The most actionable items are:
The DTensor metadata propagation concern from the first round is adequately addressed by the existing comment and test coverage. Looks good overall. |
af781fe to
cc6221a
Compare
|
@claude Do review |
|
Claude finished @tugsbayasgalan's task in 3m 16s —— View job Code Review: Support mark_dynamic in minimal_fx_tracer (Round 3)
The implementation is well-structured and stays deliberately minimal. The PR description does a good job calling out the four deliberate design choices. Here's what I found: Correctness1. If dim_range = dynamic_ranges.get(dim)
if dim_range is None:
raise ValueError(
f"Dimension {dim} is in _dynamo_dynamic_indices but has no "
f"corresponding entry in _dynamo_dynamic_range."
)This aligns with the CLAUDE.md guidance: "ValueError for user-facing errors (bad config, invalid input)." 2.
Performance (minor)3. These two imports execute unconditionally for every unwrapped input tensor, including the common static-shape path. For models with many parameters (hundreds of tensors), this adds unnecessary def _fakeify_input(fake_mode, arg, *, input_name):
if not isinstance(arg, torch.Tensor):
return arg
symbolic_context = _symbolic_context_for_marked_dynamic_dims(arg)
if symbolic_context is not None:
from torch._dynamo.source import LocalSource
from torch.fx.experimental.symbolic_shapes import TrackedFake
# ... symbolic path
return fake_mode.from_tensor(arg, static_shapes=True)Type annotation4. Return type
Tests5. Test coverage is thorough and well-designed The five new tests cover the key behaviors well:
6. DTensor attribute propagation reliance is documented The comment at 7. Test helper refactoring cleans up The extraction of SummaryImplementation looks correct and intentionally minimal. The main actionable item is the |
cc6221a to
581d09e
Compare
| for node in traced.gm.graph.nodes | ||
| if node.op == "placeholder" | ||
| ) | ||
| x_min = torch.randn(2, 4) |
There was a problem hiding this comment.
what are you trying to test here in this test did you want to add
if (x.size()[0]>=2 and x.size()[0]<=5) int the forward and ensure it does not DDE?
There was a problem hiding this comment.
updated the test to be more rigorous
| self.assertTrue(torch.equal(forward({}, x_max), run_traced(traced, {}, x_max))) | ||
|
|
||
| def test_mark_unbacked_preserves_unbacked_placeholder_dim(self): | ||
| from torch._dynamo.decorators import mark_unbacked |
There was a problem hiding this comment.
this test basically ensure when you call mark_unbacked dim is dynamic right?
|
|
||
| x = torch.randn(2, 4) | ||
| y = torch.randn(2, 4) | ||
| mark_unbacked(x, 0, shape_id="batch") |
There was a problem hiding this comment.
better you can add
if (x.size()[0]==y.size([0])) and ensure it does not DDE. but its fine as is also.
| # binding logic, so bind them here explicitly. mark_unbacked() is | ||
| # only supported on plain tensor inputs, so binding after subclass | ||
| # unwrapping is sufficient. | ||
| torch.fx.experimental.symbolic_shapes.compute_unbacked_bindings( |
There was a problem hiding this comment.
yeh
since you are ignoring compute_unbacked_bindings result you can instead use
with shape_env.ignore_fresh_unbacked_symbols():
fake_args = tuple(
fakeify_input(fake_mode, a, input_name=f"minimal_fx_tracer_input{i}")
for i, a in enumerate(unwrapped_args)
There was a problem hiding this comment.
since you are ignoring compute_unbacked_bindings result you can instead use
with shape_env.ignore_fresh_unbacked_symbols():
fake_args = tuple(
fakeify_input(fake_mode, a, input_name=f"minimal_fx_tracer_input{i}")
for i, a in enumerate(unwrapped_args)
There was a problem hiding this comment.
Hmm we shouldn;t ignore them, no?
| return bool( | ||
| getattr(tensor, "_dynamo_unbacked_indices", None) | ||
| or getattr(tensor, "_dynamo_strict_unbacked_indices", None) | ||
| or getattr(tensor, "_dynamo_shape_ids", None) |
There was a problem hiding this comment.
not needed exisits iff _dynamo_unbacked_indices exisit
| getattr(tensor, "_dynamo_unbacked_indices", None) | ||
| or getattr(tensor, "_dynamo_strict_unbacked_indices", None) | ||
| or getattr(tensor, "_dynamo_shape_ids", None) | ||
| or getattr(tensor, "_dynamo_unbacked_bounds", None) |
512b8c6 to
544c5a1
Compare
7f390d3 to
0039071
Compare
| def _symbolic_context_for_marked_dims( | ||
| tensor: torch.Tensor, | ||
| *, | ||
| source: Any, |
There was a problem hiding this comment.
What is source used for?
There was a problem hiding this comment.
I think it is internally used for guard generation etc. @laithsakka would know more i think.
There was a problem hiding this comment.
delketed now. we don't need guards
| ) | ||
|
|
||
|
|
||
| def _standalone_compile_graph(gm): |
There was a problem hiding this comment.
Where is this function used?
There was a problem hiding this comment.
Good catch not needed.
| traced_result.gm.recompile() | ||
|
|
||
|
|
||
| def _graph_placeholder_fake_inputs(gm): |
There was a problem hiding this comment.
does the new api support List[Tensor] ..etc? do we need to test that?
There was a problem hiding this comment.
this is just test api so it doens't matter i think
| ) | ||
| x_other = torch.randn(3, 4) | ||
|
|
||
| self.assertIsInstance(fake_x.size(0), torch.SymInt) |
There was a problem hiding this comment.
nit: check it has unbacked symbol? if you want.
|
|
||
| maybe_register_blockmask_pytree_node() | ||
|
|
||
| def make_mask_fn(attn_regions, document_ids): |
| def _tensor_has_mark_unbacked(tensor: torch.Tensor) -> bool: | ||
| return bool( | ||
| getattr(tensor, "_dynamo_unbacked_indices", None) | ||
| or getattr(tensor, "_dynamo_strict_unbacked_indices", None) |
There was a problem hiding this comment.
yeh this one when we do mark_ubacked(strict=True) you are not really testing it, but i guess thats fine.
I want to delete this mode, this only allow throwing compile time errors if traced code have
torch._check(u0== 100(any integr)
| def _symbolic_context_for_marked_dims( | ||
| tensor: torch.Tensor, | ||
| *, | ||
| source: Any, |
There was a problem hiding this comment.
source not used in this function, we shall remove it probably?
|
|
||
| source = LocalSource(input_name, is_input=True) | ||
| symbolic_context = _symbolic_context_for_marked_dims(arg, source=source) | ||
| if symbolic_context is not None: |
There was a problem hiding this comment.
nit: early exit first
if symbolic_context is None:
# nothing to make dynamic.
fake_mode.from_tensor(arg, static_shapes=True)
|
|
||
|
|
||
| def _produce_symbolic_input_guards(fake_mode: FakeTensorMode) -> None: | ||
| shape_env = fake_mode.shape_env |
There was a problem hiding this comment.
why do you need to produce guards do we have a path in the non strict API that evaluate guards. ?
also for unabcked there shall not be guards (well now we have some but its a bug).
| if symbolic_context is not None: | ||
| fake = fake_mode.from_tensor( | ||
| arg, | ||
| source=source, |
There was a problem hiding this comment.
I believe if you dont care about guards you do not need the source at all you can pass none.
but you can keep it as is its ok also.
| ) | ||
| shape_env = fake_mode.shape_env | ||
| assert shape_env is not None and shape_env.tracked_fakes is not None | ||
| shape_env.tracked_fakes.append(TrackedFake(fake, source, symbolic_context)) |
There was a problem hiding this comment.
same thing here do you need to track if you are not calling _produce_symbolic_input_guards? probably not in theory.
| # binding logic, so bind them here explicitly. mark_unbacked() is | ||
| # only supported on plain tensor inputs, so binding after subclass | ||
| # unwrapping is sufficient. | ||
| torch.fx.experimental.symbolic_shapes.compute_unbacked_bindings( |
There was a problem hiding this comment.
yeh
since you are ignoring compute_unbacked_bindings result you can instead use
with shape_env.ignore_fresh_unbacked_symbols():
fake_args = tuple(
fakeify_input(fake_mode, a, input_name=f"minimal_fx_tracer_input{i}")
for i, a in enumerate(unwrapped_args)
0039071 to
275f0e7
Compare
| ) | ||
| shape_env = fake_mode.shape_env | ||
| assert shape_env is not None and shape_env.tracked_fakes is not None | ||
| shape_env.tracked_fakes.append(TrackedFake(fake, source, symbolic_context)) |
ydwu4
left a comment
There was a problem hiding this comment.
Implementation looks reasonable.
| ) | ||
| shape_env = fake_mode.shape_env | ||
| assert shape_env is not None and shape_env.tracked_fakes is not None | ||
| shape_env.tracked_fakes.append(TrackedFake(fake, source, symbolic_context)) |
There was a problem hiding this comment.
Need verify whether tracked_fakes are needed.
| _copy_fwd_metadata_to_bw_nodes(traced) | ||
|
|
||
| _remove_cpu_shadow_chains(traced) | ||
| _insert_runtime_asserts(traced, fake_mode) |
There was a problem hiding this comment.
what does this do to the graph if no dynamic shape is used?
we will need a pass to remove these runtime asserts.
In cudagraph setup, these nodes are not evaluate anyway.
I would have a flag to add runtime assert conditionally, and default to false.
| fake_mode.from_tensor(a, static_shapes=True) | ||
| with fake_mode.shape_env.ignore_fresh_unbacked_symbols(): | ||
| fake_args = tuple( | ||
| _fakeify_input(fake_mode, a, input_name=f"minimal_fx_tracer_input_{i}") |
There was a problem hiding this comment.
How would this name show up in graph?
can we make it shorter, more readable?
There was a problem hiding this comment.
This is a dummy string that comes with LocalSource from dynamo as it requires string to be initialized. I think it is only used in debugging/logging in torch.compile context. This won't change the graph.
| fake_args = tuple( | ||
| ( | ||
| fake_mode.from_tensor(a, static_shapes=True) | ||
| with fake_mode.shape_env.ignore_fresh_unbacked_symbols(): |
There was a problem hiding this comment.
What does this do when dynamic shape is not used?
Our principle for the tracer is, if a feature it not used, it cannot break the main code path.
There was a problem hiding this comment.
it won't do anything but to be safer i made this ctx manager bit more explicit (check if we have unbacked)
275f0e7 to
8da2515
Compare
|
|
||
| def _wrap_to_subclass( | ||
| plain_tensors: list[torch.Tensor], meta: SubclassMeta | ||
| plain_tensors: list[torch.Tensor], |
There was a problem hiding this comment.
nit, some new line changes seems linter config difference.
SherlockNoMad
left a comment
There was a problem hiding this comment.
didn't read dynamic_shape.py, I assume you have the blessing from Laith.
minimal_fx_tracer now supports mark_unbacked() on plain tensor inputs. Because this non-strict make_fx path fakeifies inputs directly, it must call compute_unbacked_bindings() itself after fakeification; otherwise fresh unbacked symbols remain pending and tracing fails. Scope is intentionally narrow: - support plain-tensor mark_unbacked() - reject mark_dynamic() - reject wrapper-subclass mark_unbacked() such as DTensor Tests cover replay, multiple inputs, shape_id/strict/min-max metadata, data-dependent branching failure on unbacked dims, and DTensor rejection. Co-authored-by: Codex <[email protected]>
8da2515 to
5587d8f
Compare
… commit `659a0d`). This CL imports TorchTitan head and stabilizes the build. Supporting feature gaps to be done in follow-up CLs. **For a summary of major changes and disabled tests see [internal link]** In this CL, we bypass the [ban](https://github.com/pytorch/torchtitan/blob/1c40dd26a91b0489249011a53d1da69061b03d38/torchtitan/models/common/config_utils.py#L85) of SDPA backend for language models in `models/common/config_utils.py` so our monkey patch to apply splash attention kernel works. Deprecation of sdpa backend on TPU and supporting document packing in the SplashAttention kernel is handled in child cl/954755047 In OSS, torch>=2.12 is **required**. After this update several files import `DataParallelMeshDims` from `torch.distributed.fsdp` which is only available in torch >=2.12 It disables the following tests: b/540005818 Disabled for numerical divergences: - test_train_minimal_distributed llama3_fsdp - test_train_minimal_distributed llama3_simplefsdp - test_train_minimal_distributed qwen3_simplefsdp - test_flux_qkv_split TestFluxSingleStreamUnbind Disabled for other reasons: - b/540119277 test_fused_swiglu_override - circular import issue with spmd_type - b/540048441 graph trainer tests (upstream refactored trace_train_step into minimal_fx_tracer API): - b/540049946 deepseek_v3_tp_dtensor - Linear: output DTensor has placements (Shard(dim=1),), but out_src_shardings expects (Shard(dim=2),) Tested on OSS with image built from torch 2.12: - redacted SimpleFSDP Compiled: [10,925 TPS]([internal link]) (10,0922 at head) - FLUX SimpleFSDP Compiled (F32 + BF16 MP): [3,737 TPS]([internal link]) (3652 at head) - Llama3 SimpleFSDP Compiled: [5,444 TPS]([internal link]) (5384 at head) See the list of commits: pytorch/torchtitan@627126f...659a0d2 #MIGRATION_3P_PY_TORCHTITAN__DEFAULT - 95ae6a0 ci: regenerate qwen3_moe_rocm_mi350x.txt baseline with ac... by Rishi Sinha <[email protected]> - db5da4b Refactor pipeline parallel helpers for graph PP reuse (#2... by sanketpurandare <[email protected]> - 6065055 Revert precompile PRs (pytorch#3107, pytorch#3178) to fix CI (pytorch#3212) by Bob Ren <[email protected]> - 179d9e1 CP AllGather on the wrong dimension (pytorch#3206) by francesco-bertolotti <[email protected]> - f522db0 Fix commands in DSV3 readme (pytorch#3116) by Daniel Vega-Myhre <[email protected]> - 0b148a2 [CI] Run integration tests in parallel (pytorch#3144) by Yuankai Chen <[email protected]> - 080c1d4 [GraphTrainer] Annotate loss region with module_fqn (pytorch#3207) by Sherlock Huang <[email protected]> - b2cd149 Observability: structured logging + training instrumentat... by Felipe Mello <[email protected]> - 706ed8d [GraphTrainer] Annotate generated FX code with user sourc... by Aditya Venkataraman <[email protected]> - af8d243 [GraphTrainer] Skip identity-slice rewrite when start/end... by Aditya Venkataraman <[email protected]> - d3c96e8 [mxfp8] Fix MXFP8GroupedExpertsConverter to actually swap... by Aditya Venkataraman <[email protected]> - d341407 [MoE] Pad token count to a multiple of sp_size in AllToAl... by Jiani Wang <[email protected]> - 2ae1340 [rl] add import torch to provisioner bootstrap to avoid c... by Shuhua Yu <[email protected]> - 0b6a29e [rl] Set PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True... by Felipe Mello <[email protected]> - 2c237ae refactor get_attention_masks to use positions instead of ... by liangel-02 <[email protected]> - 74bac7e [graph_trainer] FSDP AG RS overlap (pytorch#3156) by Yiming Zhou <[email protected]> - b6830b2 Upgrades torchtitan-ubuntu docker image to 22.04 and CTK ... by Syed Tousif Ahmed <[email protected]> - 5fa7af6 [float8] Quantize GroupedExperts params during conversion... by Aditya Venkataraman <[email protected]> - e62ab09 [rl] Fix CI loss=0 and logprob=NaN (pytorch#3232) by Jiani Wang <[email protected]> - f32a5bb [GraphTrainer] Overhaul README for accuracy and clarity (... by Sherlock Huang <[email protected]> - e425316 [rl] Remove VLLMGenerator.__del__ cleanup method (pytorch#3224) by Danielle Pintz <[email protected]> - ef54395 [graph_trainer] Move all FSDP-specific passes to fsdp_pas... by Yiming Zhou <[email protected]> - 301384b [GraphTrainer] Register BlockMask pytree node in aot_fx_t... by Bob Ren <[email protected]> - a24b247 [graph_trainer] Disable cpu_offload_all CI test for upstr... by Sherlock Huang <[email protected]> - 2dfee86 [GraphTrainer] Update manifesto: hardware heterogeneity, ... by Sherlock Huang <[email protected]> - c6cfaa2 Re-land "Enable bucketing pass in precompile path" (pytorch#3107... by Bob Ren <[email protected]> - ae5ff10 [cpu-offloading] Implement prefetching for cpu offloading... by Michael Lazos <[email protected]> - 046fdbb Support mark_unbacked in minimal_fx_tracer (pytorch#3046) by Tugsbayasgalan Manlaibaatar <[email protected]> - 8599818 [rl] Add a tag to trigger RL CI runs (pytorch#3230) by Jiani Wang <[email protected]> - 466da8c [graph_trainer] Port remat_using_tags_for_fwd_loss_bwd_gr... by Sherlock Huang <[email protected]> - 94d5f59 Re-land "Fix FlexAttention precompile bitwise determinist... by Bob Ren <[email protected]> - e2fea3f Wrong token count in validation when CP>1 (pytorch#3257) by francesco-bertolotti <[email protected]> - 1d392ca [torchtitan][llama4_parallelize] fixing fsdp_mesh_info bu... by anshul-si <[email protected]> - d91a9fc [Qwen3VL] remove local_map for dtensor interpolation (pytorch#29... by Shuhua Yu <[email protected]> - 19f88a3 profiler: drop duplicate dataclass fields (pytorch#3227) by Felipe Mello <[email protected]> - 52f3142 [GraphTrainer] Log graph pass names and total time (pytorch#3261) by Sherlock Huang <[email protected]> - bf2842d [GraphTrainer] Add memory policy registry and extra graph... by Syed Tousif Ahmed <[email protected]> - 4ebb089 Tests HybridEP integration with GraphTrainer (pytorch#3184) by Syed Tousif Ahmed <[email protected]> - da6ff79 [rl] Graceful shutdown GRPO (pytorch#3238) by Felipe Mello <[email protected]> - 54887a3 [GraphTrainer] Add compile.disable_passes to selectively ... by Sherlock Huang <[email protected]> - 4ed3c53 [codex] Fix weight tying parameter accounting (pytorch#3225) by 岛石 <[email protected]> - 5638c49 [codex] Fix shared BOS and EOS token inference (pytorch#3279) by 岛石 <[email protected]> - ecd117e [graph_trainer] Pass global_valid_tokens into loss_fn ins... by Yidi Wu <[email protected]> - 0fae167 [graph_trainer] AutoParallel AOT FX Trace Integration (#2... by sanketpurandare <[email protected]> - 74181b1 [LoRA] Add LoRA converter and rename quantization to conv... by Yifan Mao <[email protected]> - 0d8f57c Remove unnecessary clone from ChunkedCELoss (pytorch#3272) by Jiani Wang <[email protected]> - 28b83bd Merge lora and float8 tests (pytorch#3310) by Yifan Mao <[email protected]> - e917ff4 Avoid repeat_interleave output-size sync (pytorch#3274) by Simon Fan <[email protected]> - acece3b [graph_trainer] Disable flexattn integration test due to ... by Sherlock Huang <[email protected]> - 8ba1c6b Support kwargs in minimal_fx_tracer (pytorch#3262) by Tugsbayasgalan Manlaibaatar <[email protected]> - d107aa4 [Quantization] Use class factory for MXFP8/Float8 Grouped... by Yifan Mao <[email protected]> - ca4c7f2 [rl] Register customized config parser to vllm + less vll... by Jiani Wang <[email protected]> - 0b5e899 Fix precompile tests (pytorch#3316) by Tugsbayasgalan Manlaibaatar <[email protected]> - 0fadde3 [graph_trainer] Fix AutoParallel input_fn to include posi... by Ivan Kobzarev <[email protected]> - 2ceff82 [graph_trainer] Add log_timer utility for tracing step ti... by Sherlock Huang <[email protected]> - e9dbff6 [graph_trainer] Refactor selective activation remat to in... by Tugsbayasgalan Manlaibaatar <[email protected]> - b301dfa Remove MoE expert for-loop fallback (pytorch#3308) by sanketpurandare <[email protected]> - 1a0fe3e [graph_trainer] Refactor passes.py into focused modules (... by Sherlock Huang <[email protected]> - d57df09 Make ChunkedCELoss support torch.autograd.grad (pytorch#3249) by Yidi Wu <[email protected]> - 5ca23a5 [GraphTrainer] Add Context Parallel support (pytorch#3305) by Aditya Venkataraman <[email protected]> - 7f070c9 Enhance Lychee Link Checker (Resiliency & Performance) (#... by Andrei-Aksionov <[email protected]> - 7f602b9 Add AGENTS.md symlinks for Codex usage (pytorch#3326) by sanketpurandare <[email protected]> - 34801c0 [graph_trainer] Improve SAC tagging and CPU offload pass ... by Sherlock Huang <[email protected]> - 1a22c2d [graph_trainer] Remove deprecated AOT compile mode (pytorch#3327) by Sherlock Huang <[email protected]> - 7b418ab Revert "Avoid repeat_interleave output-size sync (pytorch#3274)"... by Simon Fan <[email protected]> - 6f2fa2f [rl] switch to vllm v2 engine (pytorch#3330) by Jiani Wang <[email protected]> - 1690e0a [cpu-offloading] Encode last consumer as dep arg in ao.wa... by Michael Lazos <[email protected]> - cee4982 [graph_trainer] Fix SAC remat to produce fresh FakeTensor... by Ivan Kobzarev <[email protected]> - d4a3c63 [graph_trainer] Generalize minimal_fx_tracer to module + ... by Tugsbayasgalan Manlaibaatar <[email protected]> - 4614e30 [graph_trainer] Support multiple FSDP PGs in overlap_fsdp... by Sherlock Huang <[email protected]> - 3781d1d Back out "[graph_trainer] Fix SAC remat to produce fresh ... by Sherlock Huang <[email protected]> - a2a0d99 RL: observability spans across trainer/generator/controll... by Felipe Mello <[email protected]> - 8cdfdc2 [rl] Better initial weight loading (pytorch#3318) by Jiani Wang <[email protected]> - f0795f0 [RL] - Enable experiment metrics (pytorch#3237) by Felipe Mello <[email protected]> - b64292b [graph_trainer] Remove fsdp_reshard_after_fwd_pass (pytorch#3370) by Sherlock Huang <[email protected]> - a670699 [graph_trainer] Skip dense numerics tests due to upstream... by Sherlock Huang <[email protected]> - cb7bf09 ci: declare workflow-level `contents: read` on 2 workflow... by Arpit Jain <[email protected]> - d64eabc [Full DTensor] Config-based Full DTensor for Llama3 (pytorch#3159) by Chien-Chin Huang <[email protected]> - a866d04 Fix memory snapshot pickle protocol for compatibility wit... by francesco-bertolotti <[email protected]> - 9f9ae4d [graph_trainer] Fix H100 CI failure from DeepEP compilati... by Sherlock Huang <[email protected]> - c9126af [graph_trainer] Add bucketing ops to precompile serializa... by Ivan Kobzarev <[email protected]> - 013890b [graph_trainer] Defer cudagraph compatibility check to pa... by Ivan Kobzarev <[email protected]> - 6a1b334 Fix optimizer state and module state coupling (pytorch#3356) by Tugsbayasgalan Manlaibaatar <[email protected]> - 4238c35 Re-enable compile for gpt-oss integration tests (pytorch#3373) by Aditya Venkataraman <[email protected]> - ebfceeb [rl] Add TITO generator and gen metrics (pytorch#3391) by Felipe Mello <[email protected]> - cf3c431 [graph_trainer] Re-enable FlexAttention tests after upstr... by Sherlock Huang <[email protected]> - 8aa96ac [graph_trainer] Fix eager SAC policy mm counter to reset ... by Ivan Kobzarev <[email protected]> - 52a292d [graph_trainer] Gate overlap_fsdp_ag_rs_pass behind a con... by Yiming Zhou <[email protected]> - 2057b56 [rl] fix CI timeout issue by properly tear down for vllm ... by Jiani Wang <[email protected]> - cfe97c6 [rl] use wandb=False in CI (pytorch#3408) by Felipe Mello <[email protected]> - 83e4904 [graph_trainer] Rework full_inductor_compilation_pass via... by Tugsbayasgalan Manlaibaatar <[email protected]> - 963c20c [MoE][5/n] Refactor MoE to clean DTensor boundaries for s... by Jessica Zhong <[email protected]> - da38566 [MoE][6/n] Extract local_reorder, split DeepEP/HybridEP d... by Jessica Zhong <[email protected]> - 3f721b4 [graph_trainer] Fix fsdp_passes compat with BitsetAncesto... by Ivan Kobzarev <[email protected]> - b585282 Fix imports for latest DeepEP (pytorch#3414) by Steffen Hirschmann <[email protected]> - c2a3771 [loss] Fix ChunkedCELoss + TP gradient placement mismatch... by Chien-Chin Huang <[email protected]> - 19c567f Debug Numerics with DebugMode (pytorch#3323) by Shangdi Yu <[email protected]> - 78b08dd [graph_trainer] Add DeepSeek V3 16B SDPA config (pytorch#3361) by sanketpurandare <[email protected]> - af33f76 [Module] Replace from_nn_module with native Module subcla... by Chien-Chin Huang <[email protected]> - 58b0344 Add FSDP symmetric memory configuration and related tests... by Masaki <[email protected]> (And 259 more changes) PiperOrigin-RevId: 956923721
minimal_fx_tracer now supports mark_unbacked() on plain tensor inputs.
Because this non-strict make_fx path fakeifies inputs directly, it must call
compute_unbacked_bindings() itself after fakeification; otherwise fresh
unbacked symbols remain pending and tracing fails.
Scope is intentionally narrow:
Tests cover replay, multiple inputs, shape_id/strict/min-max metadata,
data-dependent branching failure on unbacked dims, and DTensor rejection.
Co-authored-by: Codex [email protected]
Authored with Codex