Skip to content

[aot_autograd] Don't let a non-differentiable output mark its aliases - #195357

Closed
bobrenjc93 wants to merge 68 commits into
gh/bobrenjc93/1097/basefrom
gh/bobrenjc93/1097/head
Closed

bobrenjc93 wants to merge 68 commits into
gh/bobrenjc93/1097/basefrom
gh/bobrenjc93/1097/head

Conversation

@bobrenjc93

@bobrenjc93 bobrenjc93 commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

torch.compile(backend="inductor") silently returns no gradient for

def f(x):
    y = torch.sin(x)
    return y[0:4], y[4:8], y.detach()

Eager gives grad_fn [True, True, False] and a populated x.grad; inductor gives
[False, False, False] and x.grad is None. A fourth, independently
differentiable output turns that into a crash in the compiled backward
("TypeError: expected Tensor() for op: input" from
assert_size_stride_grouped).

ctx.mark_non_differentiable is keyed on TensorImpl, so marking one returned
slot marks every returned slot holding the same object, and the forward
epilogue sets ctx._materialize_non_diff_grads = False, so a marked slot's
grad arrives as None. Backends may return one object in two slots: inductor
lowers aten.detach to a no-op, and h * 1 folds away. So y.detach() marks
y's intermediate base, whose None tangent process_runtime_tangent forwards
verbatim, and h.detach() marks the sibling output h * 1. The metadata is
right (requires_grad_for_backward is a subset of the forward's requires_grad);
only the runtime identity collision is wrong.

_dealias_marked_returns gives each slot about to be marked its own TensorImpl
via detach() when it collides with an unmarked slot; slots that stay
differentiable keep their identity. Skipping the mark instead would leave the
detach output with requires_grad=True and a grad_fn. The codegen'd
compiled_fn_wrapper emits the dealias ahead of the per-slot Tensor checks,
and the helper is exported from standalone_runtime and registered in
to_standalone_python's _known_helper_table so a rendered artifact resolves it
like the other runtime helpers once training artifacts exist (a later commit).

Test Plan:

python test/functorch/test_aotdispatch.py
python test/functorch/test_aotdispatch.py -k detach_output_aliasing -k dealias_marked_returns
python test/functorch/test_compile_to_python.py
python test/test_precompile.py
python test/dynamo/test_package.py
python test/dynamo/test_aot_autograd_cache.py

Two end-to-end tests, one per collision shape (intermediate base, parametrized
over aot_eager and inductor -- eager detach allocates a new TensorImpl, so the
aot_eager variant is parity only; sibling output, pinned to
joint_graph_constant_folding), assert requires_grad, grad_fn and the gradient
against eager, that the detach output stays a leaf, and via data_ptr that the
inductor slots really shared storage. A third
drives _dealias_marked_returns directly: only marked slots colliding with an
unmarked slot are rebound.

Authored with an AI assistant.

[no ci]

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/195357

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
bobrenjc93 added a commit that referenced this pull request Sep 2, 2026
torch.compile(backend="inductor") silently returns no gradient for

    def f(x):
        y = torch.sin(x)
        return y[0:4], y[4:8], y.detach()

Eager gives grad_fn [True, True, False] and a populated x.grad; inductor gives
[False, False, False] and x.grad is None. Adding a fourth, independently
differentiable output turns the silent wrong answer into a crash in the
compiled backward -- "TypeError: expected Tensor() for op: input" out of
inductor's assert_size_stride_grouped, or "Expected tensors only, but got
NoneType" out of copy_misaligned_inputs when the backward has no kernels for
the asserts to attach to.

ctx.mark_non_differentiable is keyed on TensorImpl, so marking one returned
slot marks EVERY returned slot holding that same object, and the forward
epilogue pairs it with ctx._materialize_non_diff_grads = False, which makes a
marked slot's grad arrive as None rather than zeros. Backends are free to
return one object in two slots: inductor lowers aten.detach to a no-op, and
h * 1 / h + 0 fold away. So

  * `return y[:2], y[2:], y.detach()` marks y's intermediate base -- a slot
    _codegen_backward_prologue keeps unconditionally -- and the base's tangent
    arrives None, which process_runtime_tangent forwards verbatim; and
  * `return h * 1, h.detach()` marks the sibling output, which is the only
    differentiable thing in the model.

The metadata is not at fault: the backward's predicate,
requires_grad_for_backward, is a strict subset of the forward's requires_grad
(collect_metadata_analysis.py), so no slot is dropped by one and kept by the
other. Only the runtime identity collision is.

Give each slot about to be marked its own TensorImpl instead
(`_dealias_marked_returns`). That is sound precisely because we are about to
declare the slot non-differentiable, so an alias of it is as good as the
original; slots that stay differentiable keep their identity. The rejected
alternative was to skip marking any slot that aliases a surviving one, which
spares the base but also spares the detach output -- it comes back with
requires_grad=True and a grad_fn, and backward flows through a detached tensor.

Fixing this in inductor instead would be the wrong layer twice over: detach is
not the culprit (h * 1 reproduces it with no detach anywhere), and AOTAutograd
is the component making the identity-keyed call.

The codegen emits the dealias and the per-slot Tensor checks it feeds in one
block, and the helper is part of the standalone-source surface: it is exported
from standalone_runtime and registered in to_standalone_python's
`_known_helper_table`, so an artifact rendered from a graph with a
non-differentiable output resolves it through that surface like the other
runtime helpers rather than through a bare runtime_wrappers import.

The dedup indexes the marked slots, usually one or two, and probes the rest
against them, so it costs ~0.8us per forward of a compiled autograd function
that has any non-differentiable output -- about 0.3% of a small MLP forward
and below the noise floor of an end-to-end measurement. A follow-up worth
having is an index-based mark_non_differentiable, which would make this free
and also cover the same hazard in mark_dirty.

Test Plan:

```
python test/functorch/test_aotdispatch.py
python test/test_precompile.py
python test/dynamo/test_package.py
python test/dynamo/test_aot_autograd_cache.py
```

Two new tests, one per collision shape: an output aliasing an intermediate
base (parametrized over aot_eager and inductor), and an output aliasing a
sibling output. Each asserts requires_grad, grad_fn and the gradient itself
against eager, and the first also asserts the detach output stays a leaf so
the rejected fix above cannot pass. Both fail without this change -- the
intermediate-base one errors, the sibling one returns the wrong gradient.

Authored with an AI assistant.

ghstack-source-id: 85ddf1d
Pull-Request: #195357
[ghstack-poisoned]
bobrenjc93 added a commit that referenced this pull request Sep 2, 2026
torch.compile(backend="inductor") silently returns no gradient for

    def f(x):
        y = torch.sin(x)
        return y[0:4], y[4:8], y.detach()

Eager gives grad_fn [True, True, False] and a populated x.grad; inductor gives
[False, False, False] and x.grad is None. Adding a fourth, independently
differentiable output turns the silent wrong answer into a crash in the
compiled backward -- "TypeError: expected Tensor() for op: input" out of
inductor's assert_size_stride_grouped, or "Expected tensors only, but got
NoneType" out of copy_misaligned_inputs when the backward has no kernels for
the asserts to attach to.

ctx.mark_non_differentiable is keyed on TensorImpl, so marking one returned
slot marks EVERY returned slot holding that same object, and the forward
epilogue pairs it with ctx._materialize_non_diff_grads = False, which makes a
marked slot's grad arrive as None rather than zeros. Backends are free to
return one object in two slots: inductor lowers aten.detach to a no-op, and
h * 1 / h + 0 fold away. So

  * `return y[:2], y[2:], y.detach()` marks y's intermediate base -- a slot
    _codegen_backward_prologue keeps unconditionally -- and the base's tangent
    arrives None, which process_runtime_tangent forwards verbatim; and
  * `return h * 1, h.detach()` marks the sibling output, which is the only
    differentiable thing in the model.

The metadata is not at fault: the backward's predicate,
requires_grad_for_backward, is a strict subset of the forward's requires_grad
(collect_metadata_analysis.py), so no slot is dropped by one and kept by the
other. Only the runtime identity collision is.

Give each slot about to be marked its own TensorImpl instead
(`_dealias_marked_returns`). That is sound precisely because we are about to
declare the slot non-differentiable, so an alias of it is as good as the
original; slots that stay differentiable keep their identity. The rejected
alternative was to skip marking any slot that aliases a surviving one, which
spares the base but also spares the detach output -- it comes back with
requires_grad=True and a grad_fn, and backward flows through a detached tensor.

Fixing this in inductor instead would be the wrong layer twice over: detach is
not the culprit (h * 1 reproduces it with no detach anywhere), and AOTAutograd
is the component making the identity-keyed call.

The codegen emits the dealias and the per-slot Tensor checks it feeds in one
block, and the helper is part of the standalone-source surface: it is exported
from standalone_runtime and registered in to_standalone_python's
`_known_helper_table`, so an artifact rendered from a graph with a
non-differentiable output resolves it through that surface like the other
runtime helpers rather than through a bare runtime_wrappers import.

The dedup indexes the marked slots, usually one or two, and probes the rest
against them, so it costs ~0.8us per forward of a compiled autograd function
that has any non-differentiable output -- about 0.3% of a small MLP forward
and below the noise floor of an end-to-end measurement. A follow-up worth
having is an index-based mark_non_differentiable, which would make this free
and also cover the same hazard in mark_dirty.

Test Plan:

```
python test/functorch/test_aotdispatch.py
python test/test_precompile.py
python test/dynamo/test_package.py
python test/dynamo/test_aot_autograd_cache.py
```

Two new tests, one per collision shape: an output aliasing an intermediate
base (parametrized over aot_eager and inductor), and an output aliasing a
sibling output. Each asserts requires_grad, grad_fn and the gradient itself
against eager, and the first also asserts the detach output stays a leaf so
the rejected fix above cannot pass. Both fail without this change -- the
intermediate-base one errors, the sibling one returns the wrong gradient.

Authored with an AI assistant.

ghstack-source-id: 94c3fae
Pull-Request: #195357
bobrenjc93 added a commit that referenced this pull request Sep 2, 2026
torch.compile(backend="inductor") silently returns no gradient for

    def f(x):
        y = torch.sin(x)
        return y[0:4], y[4:8], y.detach()

Eager gives grad_fn [True, True, False] and a populated x.grad; inductor gives
[False, False, False] and x.grad is None. Adding a fourth, independently
differentiable output turns the silent wrong answer into a crash in the
compiled backward -- "TypeError: expected Tensor() for op: input" out of
inductor's assert_size_stride_grouped, or "Expected tensors only, but got
NoneType" out of copy_misaligned_inputs when the backward has no kernels for
the asserts to attach to.

ctx.mark_non_differentiable is keyed on TensorImpl, so marking one returned
slot marks EVERY returned slot holding that same object, and the forward
epilogue pairs it with ctx._materialize_non_diff_grads = False, which makes a
marked slot's grad arrive as None rather than zeros. Backends are free to
return one object in two slots: inductor lowers aten.detach to a no-op, and
h * 1 / h + 0 fold away. So

  * `return y[:2], y[2:], y.detach()` marks y's intermediate base -- a slot
    _codegen_backward_prologue keeps unconditionally -- and the base's tangent
    arrives None, which process_runtime_tangent forwards verbatim; and
  * `return h * 1, h.detach()` marks the sibling output, which is the only
    differentiable thing in the model.

The metadata is not at fault: the backward's predicate,
requires_grad_for_backward, is a strict subset of the forward's requires_grad
(collect_metadata_analysis.py), so no slot is dropped by one and kept by the
other. Only the runtime identity collision is.

Give each slot about to be marked its own TensorImpl instead
(`_dealias_marked_returns`). That is sound precisely because we are about to
declare the slot non-differentiable, so an alias of it is as good as the
original; slots that stay differentiable keep their identity. The rejected
alternative was to skip marking any slot that aliases a surviving one, which
spares the base but also spares the detach output -- it comes back with
requires_grad=True and a grad_fn, and backward flows through a detached tensor.

Fixing this in inductor instead would be the wrong layer twice over: detach is
not the culprit (h * 1 reproduces it with no detach anywhere), and AOTAutograd
is the component making the identity-keyed call.

The codegen emits the dealias and the per-slot Tensor checks it feeds in one
block, and the helper is part of the standalone-source surface: it is exported
from standalone_runtime and registered in to_standalone_python's
`_known_helper_table`, so an artifact rendered from a graph with a
non-differentiable output resolves it through that surface like the other
runtime helpers rather than through a bare runtime_wrappers import.

The dedup indexes the marked slots, usually one or two, and probes the rest
against them, so it costs ~0.8us per forward of a compiled autograd function
that has any non-differentiable output -- about 0.3% of a small MLP forward
and below the noise floor of an end-to-end measurement. A follow-up worth
having is an index-based mark_non_differentiable, which would make this free
and also cover the same hazard in mark_dirty.

Test Plan:

```
python test/functorch/test_aotdispatch.py
python test/test_precompile.py
python test/dynamo/test_package.py
python test/dynamo/test_aot_autograd_cache.py
```

Two new tests, one per collision shape: an output aliasing an intermediate
base (parametrized over aot_eager and inductor), and an output aliasing a
sibling output. Each asserts requires_grad, grad_fn and the gradient itself
against eager, and the first also asserts the detach output stays a leaf so
the rejected fix above cannot pass. Both fail without this change -- the
intermediate-base one errors, the sibling one returns the wrong gradient.

Authored with an AI assistant.

ghstack-source-id: 94c3fae
Pull-Request: #195357
bobrenjc93 added a commit that referenced this pull request Sep 2, 2026
torch.compile(backend="inductor") silently returns no gradient for

    def f(x):
        y = torch.sin(x)
        return y[0:4], y[4:8], y.detach()

Eager gives grad_fn [True, True, False] and a populated x.grad; inductor gives
[False, False, False] and x.grad is None. Adding a fourth, independently
differentiable output turns the silent wrong answer into a crash in the
compiled backward -- "TypeError: expected Tensor() for op: input" out of
inductor's assert_size_stride_grouped, or "Expected tensors only, but got
NoneType" out of copy_misaligned_inputs when the backward has no kernels for
the asserts to attach to.

ctx.mark_non_differentiable is keyed on TensorImpl, so marking one returned
slot marks EVERY returned slot holding that same object, and the forward
epilogue pairs it with ctx._materialize_non_diff_grads = False, which makes a
marked slot's grad arrive as None rather than zeros. Backends are free to
return one object in two slots: inductor lowers aten.detach to a no-op, and
h * 1 / h + 0 fold away. So

  * `return y[:2], y[2:], y.detach()` marks y's intermediate base -- a slot
    _codegen_backward_prologue keeps unconditionally -- and the base's tangent
    arrives None, which process_runtime_tangent forwards verbatim; and
  * `return h * 1, h.detach()` marks the sibling output, which is the only
    differentiable thing in the model.

The metadata is not at fault: the backward's predicate,
requires_grad_for_backward, is a strict subset of the forward's requires_grad
(collect_metadata_analysis.py), so no slot is dropped by one and kept by the
other. Only the runtime identity collision is.

Give each slot about to be marked its own TensorImpl instead
(`_dealias_marked_returns`). That is sound precisely because we are about to
declare the slot non-differentiable, so an alias of it is as good as the
original; slots that stay differentiable keep their identity. The rejected
alternative was to skip marking any slot that aliases a surviving one, which
spares the base but also spares the detach output -- it comes back with
requires_grad=True and a grad_fn, and backward flows through a detached tensor.

Fixing this in inductor instead would be the wrong layer twice over: detach is
not the culprit (h * 1 reproduces it with no detach anywhere), and AOTAutograd
is the component making the identity-keyed call.

The codegen emits the dealias and the per-slot Tensor checks it feeds in one
block, and the helper is part of the standalone-source surface: it is exported
from standalone_runtime and registered in to_standalone_python's
`_known_helper_table`, so an artifact rendered from a graph with a
non-differentiable output resolves it through that surface like the other
runtime helpers rather than through a bare runtime_wrappers import.

The dedup indexes the marked slots, usually one or two, and probes the rest
against them, so it costs ~0.8us per forward of a compiled autograd function
that has any non-differentiable output -- about 0.3% of a small MLP forward
and below the noise floor of an end-to-end measurement. A follow-up worth
having is an index-based mark_non_differentiable, which would make this free
and also cover the same hazard in mark_dirty.

Test Plan:

```
python test/functorch/test_aotdispatch.py
python test/test_precompile.py
python test/dynamo/test_package.py
python test/dynamo/test_aot_autograd_cache.py
```

Two new tests, one per collision shape: an output aliasing an intermediate
base (parametrized over aot_eager and inductor), and an output aliasing a
sibling output. Each asserts requires_grad, grad_fn and the gradient itself
against eager, and the first also asserts the detach output stays a leaf so
the rejected fix above cannot pass. Both fail without this change -- the
intermediate-base one errors, the sibling one returns the wrong gradient.

Authored with an AI assistant.

ghstack-source-id: 94c3fae
Pull-Request: #195357
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@bobrenjc93

Copy link
Copy Markdown
Contributor Author

@claude please review

@claude

claude Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Claude finished @bobrenjc93's task in 33m 31s —— View job


Reviewed: no confirmed correctness bug, but the fix lands per-call Python work in a path explicitly designed to hoist everything to compile time, duplicates the logic into a branch that is dead code, and relies on an undocumented TensorAlias invariant.

Full review of #195357

PR Review: #195357

Summary

Adds _dealias_marked_returns so a slot about to be passed to ctx.mark_non_differentiable gets its own TensorImpl when it collides with an unmarked slot, fixing silently-dropped gradients when a backend returns one object in two output slots. The root-cause analysis and the choice to dealias rather than skip the mark are both right; the concerns below are about where the work is done, an undocumented invariant it leans on, and a duplicated edit into unreachable code.

Performance

  • runtime_wrappers.py:3506-3508 — the emitted call does per-forward-call work that this codegen path exists specifically to avoid. The comment two lines up at runtime_wrappers.py:3491-3492 states the intent: "build a list of specific indices at compile time rather than iterating at runtime." _dealias_marked_returns (runtime_wrappers.py:2701-2725) instead rebuilds, on every forward: a dict[int, list[int]] of id()→positions, a set(marked), and then a full enumerate(raw_returns) scan with a dict lookup per slot. Every compiled graph with at least one non-differentiable output now pays this, and non-differentiable outputs are common — collect_metadata_analysis.py:720 sets requires_grad = isinstance(o, torch.Tensor) and o.requires_grad, so any bool/int output, any detach() output, and any output that simply does not require grad lands in _non_diff_indices.

    Everything the helper computes at runtime is a compile-time constant. _non_diff_indices is known (runtime_wrappers.py:3493-3504); the complement over range(num_forward_returns) is known; and which of those complement slots are TensorAlias-wrapped (hence can never collide by id) is known from mutated_inp_runtime_indices + aliased_out_indices. So the whole thing can be emitted as straight-line code over the candidate unmarked plain-tensor indices, e.g.

    _c = {id(raw_returns[3]), id(raw_returns[7])}
    if id(raw_returns[2]) in _c: raw_returns[2] = raw_returns[2].detach()

    which removes the dict-of-lists build, the set(marked) build, and the scan over slots that provably cannot collide. There is also no benchmark guarding this epilogue's per-call overhead, so a regression here would not be caught. Fix this →

Code Quality

  • runtime_wrappers.py:2792-2798 — this edit is in dead code. _AutogradForwardEpilogue.finalize is unconditionally replaced by _codegen_finalize at runtime_wrappers.py:3552, the only construction site is runtime_wrappers.py:3391, and the codegen'd forward always routes through the patched attribute (runtime_wrappers.py:3303, return _finalize_(ctx, fw_outs)). So the _dealias_marked_returns call added at line 2797 never executes, and neither of the two end-to-end tests can cover it. That is pre-existing structure, not something this PR introduced, but it means the fix now exists in two hand-synchronized copies with only one of them reachable — exactly the setup where a future edit lands in one and not the other. Either drop the unreachable copy, or add a comment at line 2792 recording that this branch is a reference implementation shadowed by _codegen_finalize and must be kept in sync.

  • runtime_wrappers.py:2702 — the docstring overclaims and omits the actual policy. It says "Give each slot about to be marked non-differentiable its own TensorImpl," but the implementation deliberately does not: a marked slot is rebound only when it collides with an unmarked slot, and two marked slots sharing one object keep sharing it — which is the behavior the unit test at test_aotdispatch.py:5415-5416 pins. State the rule the code implements ("rebind only where a marked slot collides with a slot that stays differentiable; marked-marked sharing is harmless because both get marked anyway"), since the why is the non-obvious part.

  • runtime_wrappers.py:2701-2725 — the helper silently depends on an invariant about TensorAlias that is worth recording, because the ordering that makes it safe is itself subtle. The helper runs after the TensorAlias wrapping at lines 2748/2772 (and 3476/3489 in the codegen), and TensorAlias is a plain dataclass (schemas.py:929-930), not a Tensor subclass. So a marked plain-tensor slot holding y and an unmarked slot holding TensorAlias(y) never compare equal by id() and no dealias happens. I checked and believe this is currently harmless: wrapped slots are not tensor outputs of the autograd.Function, so mark_non_differentiable on the shared TensorImpl cannot reach them, and after unwrapping they are regenerated by gen_alias_from_base with target_requires_grad taken from compile-time metadata rather than from the tensor's flag.

    But the ordering cannot simply be moved earlier to make the isinstance filter uniform: .detach() clears _base, and functional_utils.py:358 gates view-replay on target_meta_tensor._base is not None, so dealiasing before the wrap would silently downgrade aliased outputs to the as_strided fallback. That is a real constraint that the next person to touch this will not rediscover. Add a comment noting both halves: why running after the wrap is required, and why the resulting TensorAlias blind spot is safe.

  • runtime_wrappers.py:2724-2725 — lower confidence, worth confirming rather than a claim: AliasOfIntermediateHandler reads its base from fw_outs[self.base_idx] (runtime_wrappers.py:316, codegen at runtime_wrappers.py:1045-1049), and for alias_of_intermediate_base_is_user_output that index is in user-output space. collect_metadata_analysis.py:640-667 can produce that output type with a base that is itself a non-differentiable user output, i.e. a slot eligible for rebinding here. If such a base gets replaced by .detach(), gen_alias_from_base then replays the view off a detached tensor and patch_requires_grad (functional_utils.py:326-331) sees aliased_base_tensor.requires_grad == False. In every instantiation I could reach the target is also non-differentiable so the outcome is unchanged, but I could not rule out a case where the base's runtime requires_grad differs from its metadata. Please confirm, and if it is genuinely unreachable, say so in the helper's comment so the exclusion is deliberate rather than incidental.

Testing

  • test/functorch/test_aotdispatch.py:5326,5375 — neither end-to-end test asserts that the codegen'd wrapper actually emits the dealias. Since the eager finalize is unreachable (above), the codegen emission at runtime_wrappers.py:3506-3508 is the only live copy, and there is an existing harness for exactly this check: test/functorch/test_codegen_output_alias.py uses _capture_codegen_source("compiled_fn_wrapper") and asserts on the emitted text (see test_codegen_output_alias.py:477-493 and 544-569). A test in that file asserting _dealias_marked_returns appears in the captured source would pin the emission; today, deleting line 3506-3508 while keeping line 2797 would leave the two end-to-end tests failing with no signal about which of the two copies broke.

  • test/functorch/test_aotdispatch.py:5401-5417 — the unit test covers the plain-tensor and non-tensor (raw[5] == 7) cases but not the TensorAlias shape, which is the one place the helper's behavior is surprising. Add a case where a marked plain-tensor slot collides with an unmarked TensorAlias(y) slot and assert the marked slot is not rebound, so the blind spot is pinned as intentional rather than left to be rediscovered as a bug.

  • test/functorch/test_aotdispatch.py:5361 — @torch._inductor.config.patch(joint_graph_constant_folding=True) pins a value that is already the default (torch/_inductor/config.py:1156). Harmless as a defensive pin, but a one-line comment saying so would stop a reader from inferring the test needs a non-default config.

Recommendation

Needs Discussion

The diagnosis and the dealias-rather-than-skip choice are correct and the end-to-end tests do pin the user-visible behavior against eager. What needs resolving before merge is the per-call cost in a path whose stated purpose is to resolve everything at compile time, the duplicated edit into an unreachable branch, and the two undocumented invariants (TensorAlias blind spot, and the intermediate-base question) that the fix quietly rests on.

| Branch: `gh/bobrenjc93/1097/head`

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@bobrenjc93 bobrenjc93 closed this Sep 19, 2026
@github-actions
github-actions Bot deleted the gh/bobrenjc93/1097/head branch November 17, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request release notes: dynamo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant