Skip to content

[dynamo] Type source keys and region hashes as object - #196370

Closed
bobrenjc93 wants to merge 3 commits into
pytorch:mainfrom
bobrenjc93:bobren/dynamo-source-object
Closed

bobrenjc93 wants to merge 3 commits into
pytorch:mainfrom
bobrenjc93:bobren/dynamo-source-object

Conversation

@bobrenjc93

@bobrenjc93 bobrenjc93 commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • replace Any with object for opaque source keys and graph-region hash inputs
  • retain int for the positional ConstDictKeySource.index, and narrow opaque indices at consumers before use
  • validate encoded slice data before unpacking and make region sorting generic

These changes expose unchecked assumptions that Any previously hid without changing the accepted runtime values.

Test plan

  • pyrefly check torch/_dynamo/source.py torch/_dynamo/graph_region_tracker.py (0 errors, 3 pre-existing suppressions)
  • python -m py_compile torch/_dynamo/source.py torch/_dynamo/graph_region_tracker.py torch/_dynamo/functional_export.py torch/_dynamo/guards.py torch/_dynamo/variables/builder.py torch/_dynamo/variables/optimizer.py
  • lintrunner -a torch/_dynamo/source.py torch/_dynamo/graph_region_tracker.py torch/_dynamo/functional_export.py torch/_dynamo/guards.py torch/_dynamo/variables/builder.py torch/_dynamo/variables/optimizer.py
  • test/dynamo/test_graph_region_tracker.py (13 passed, 1 hardware-gated skip)
  • MiscTests.test_hash_getitem_slice, SourceCloneTests, and test/dynamo/test_contextvars.py (32 passed)

The local runtime tests loaded the patched Python modules through a scratch import shim because the available compiled extension predates this checkout. Full coverage will run in CI against a fresh build.

Authored with assistance from an AI coding assistant.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @chauhang @amjames @jataylo @azahed98

Replace Any with object at opaque source-key and graph-region hashing boundaries. Keep ConstDictKeySource.index concretely typed as int, narrow consumers before indexing, validate encoded slices before unpacking, and make region sorting generic.

Test Plan:

```
pyrefly check torch/_dynamo/source.py torch/_dynamo/graph_region_tracker.py
python -m py_compile torch/_dynamo/source.py torch/_dynamo/graph_region_tracker.py torch/_dynamo/functional_export.py torch/_dynamo/guards.py torch/_dynamo/variables/builder.py torch/_dynamo/variables/optimizer.py
lintrunner -a torch/_dynamo/source.py torch/_dynamo/graph_region_tracker.py torch/_dynamo/functional_export.py torch/_dynamo/guards.py torch/_dynamo/variables/builder.py torch/_dynamo/variables/optimizer.py
```

Targeted graph-region, source/guard, and ContextVar runtime tests passed locally through a scratch import shim for the older installed extension.

Authored with assistance from an AI coding assistant.
@pytorch-bot

pytorch-bot Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (2 Unrelated Failures)

As of commit ffe9741 with merge base ca66d98 (image):

GREEN LIGHT - PR approved to be merged without human review:

Focused private-API typing change in torch/_dynamo: most hunks are
annotation-only (Any -> object in source.py/graph_region_tracker.py,
list[list[T]] on _sort_with_ref_region) and the two casts at
functional_export.py:398-399 and optimizer.py:230 are runtime no-ops. The three
runtime-visible edits check out: the guards.py:3107-3109 str-narrowing is
equivalent to the old insert because used_builtin_vars is OrderedSet[str]
declared at guards.py:4646 and only membership-tested against builtins dict keys
at guards.py:4939; the functional_export.py:1070 int-narrowing matches the
stated intent of the comment at 1064-1066 and skips a case that previously
became a non-int key in graph_input_order: dict[int, int] and then failed at
flat_inputs[real_idx] (line 1074); and the new unpack_slice check at
source.py:761-767 is unreachable defensive code since __post_init__ (lines
745-748) is the sole writer of index_is_slice=True and always stores
slice.__reduce__(). The builder.py:464-467 isinstance(cur.index, str) guard is
strictly safer, falling through to the _SubscriptToken branch at line 473
instead of building an _AttrToken with a non-str name; no security, CI, or
docs/policy surface is touched.

reason: clean
Reviewed commit: ffe9741

Inference job

CRCR (non-blocking) - The following CRCR downstream CI jobs failed but are non-blocking:

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

@pytorch-bot pytorch-bot Bot added ciflow/inductor ciflow/torchtitan Run TorchTitan integration tests module: dynamo labels Sep 8, 2026
@bobrenjc93 bobrenjc93 added topic: not user facing topic category ciflow/trunk Trigger trunk jobs on your pull request labels Sep 8, 2026
@bobrenjc93

Copy link
Copy Markdown
Contributor Author

@claude

@claude

claude Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Claude finished @bobrenjc93's task in 23m 51s —— View job


Review complete

Mostly a clean typing tightening, but three of the added runtime assertions are behavior changes disguised as type narrowing — two of them can turn currently-working compiles into hard crashes.

Detailed review

Blocking: BUILTIN_MATCH assertion can crash precompile on non-str keys

torch/_dynamo/guards.py:3107-3111

if isinstance(guard.originating_source, DictGetItemSource):
    index = guard.originating_source.index
    if not isinstance(index, str):
        raise AssertionError(f"Expected a builtin name, got {index!r}")
    self.check_fn_manager.used_builtin_vars.add(index)

The isinstance(..., DictGetItemSource) check was doing double duty: it identified the builtins-dict case and implicitly the "this is a str name" case. But DictGetItemSource is used for many non-builtins dicts (symbolic_convert.py:2571 builtins, but also builder.py:1252, builder.py:3815, misc.py:1469, user_defined.py:513, dicts.py:1607, and guards.py:1432), and its index is legitimately either a literal or a ConstDictKeySource (per the docstring at source.py:850-853).

BUILTIN_MATCH is installed from builtin.py:444/builtin.py:616 (create_with_source), functions.py:2485 (bound builtins reached via AttrSource, but the chain can be rooted anywhere), torch.py:568, and builder.py:1371 (DebuggingVariable). Nothing guarantees that a BUILTIN_MATCH guard's originating source is the builtins-dict lookup. A callable stored in a user dict with a non-const key — e.g. d = {some_obj: print}; d[some_obj](x) — yields DictGetItemSource(base, ConstDictKeySource(...)), and this now raises where it previously silently added a non-str to used_builtin_vars (harmless: the set is only membership-tested against builtins.__dict__ keys at guards.py:4941).

The previous behavior was "add a value that never matches" — a no-op. The new behavior is a crash. It's guarded by save_guards, so it only bites caching_precompile, which makes it harder to catch in CI, not safer. Suggest narrowing intent rather than asserting:

if isinstance(guard.originating_source, DictGetItemSource) and isinstance(
    guard.originating_source.index, str
):
    self.check_fn_manager.used_builtin_vars.add(guard.originating_source.index)

That preserves exact existing semantics and satisfies the type checker.

Fix this →

Blocking: optimizer.py swaps an index bug for a silent graph break

torch/_dynamo/variables/optimizer.py:230-233

index = arg.source.index
if type(index) is not int:
    raise ArgMappingException
return self.value.param_groups[index]

ArgMappingException is caught at optimizer.py:137 and converted into a graph break / fallback. So a slice-indexed or otherwise non-int param_groups source now silently stops the optimizer from being captured, instead of failing loudly. Two concerns:

  1. type(index) is not int rejects bool and numpy.int64, and also rejects GetItemSource subclasses reached via ListGetItemSource — param_groups is a list, so this path realistically produces ListGetItemSource, whose index is an int, so probably fine in practice. But confirm: does isinstance(arg.source, GetItemSource) at line 226 currently ever match with index_is_slice=True? If not, this branch is dead and raise AssertionError would be more honest than a silent fallback.
  2. If the check is genuinely unreachable, prefer an AssertionError so a regression is visible rather than degrading perf silently. If it is reachable, the silent fallback is arguably right — but then it deserves a one-line comment saying so, because ArgMappingException reads like "unexpected" here.

Blocking: functional_export.py uses type(...) is not int, rejecting bool

torch/_dynamo/functional_export.py:399 and 1074

type(x) is not int is stricter than isinstance(x, int). More importantly, both sites raise AssertionError on a path that previously just worked for any hashable index. At 1074, the loop explicitly documents that it skips non-argument sources ("Skip inputs that come from other sources like closures") — the new assertion turns a GetItemSource with a non-int index into a crash rather than a skip, contradicting the stated intent of the surrounding code. If GetItemSource(index=slice) can reach here (a *args[1:2] style capture), this is a regression. Safer:

if isinstance(source, torch._dynamo.source.GetItemSource) and isinstance(
    source.index, int
):
    graph_input_order[source.index] = len(graph_input_order)

Also note graph_input_order is typed dict[int, int], so this narrowing is exactly what the annotation already claims.

Question: is ConstDictKeySource.index: int actually sound?

source.py:785. All four construction sites (optimizer.py:301,345,355, builder.py:1250, builder.py:2203, nn_module.py:1615) pass an enumerate index, and guards.py:1063 / 2099 consume it as a dict-keys position, so int looks right. Good tightening. But NonSerializableSetGetItemSource.index right below (line 806) is also typed int yet its __post_init__ validates only ConstantVariable.is_literal — worth a follow-up for consistency, not this PR.

Nit: redundant/duplicated validation in unpack_slice

source.py:758-766

Two raise AssertionError with the identical message, and slice_class is not slice is stricter than what __post_init__ guarantees. __post_init__ (line 745-748) is the only writer of index_is_slice=True, and it always stores slice.__reduce__(), which is (slice, (start, stop, step)). So all three new checks are unreachable given the invariant. Consider collapsing to one check with a single message, or dropping the slice_class is not slice half:

if not (isinstance(self.index, tuple) and len(self.index) == 2):
    raise AssertionError(f"expected an encoded slice, got {self.index!r}")
slice_class, slice_args = self.index

Distinct messages would also help debugging if one ever does fire.

Nit: _extract_args return type

graph_region_tracker.py:121 — object | None is redundant since None is already an object. -> object is equivalent and simpler. Same for tuple[object | None, ...] at line 132.

Looks good

  • graph_region_tracker.py:74,107,142 — Any → object and the list[list[T]] generic on _sort_with_ref_region are pure type improvements with no runtime effect. Region = list[Node] (line 47) means the single caller at line 369 binds T = Node cleanly.
  • builder.py:464-468 — adding isinstance(cur.index, str) to the UnspecializedParamBufferSource collapse is correct and safer than before: a non-str index now falls through to the isinstance(cur.index, (int, str)) branch at line 473 (a _SubscriptToken) or returns None, rather than constructing an _AttrToken with a non-str name that would later blow up in _format_access_path. This is the model of how the other narrowings should have been done.
  • _esc_str(s: object, ...) — correct; the body only calls repr/str.
  • DictGetItemSource.index / DictSubclassGetItemSource.index / GetItemSource.index / ContextVarGetSource.default_value as object — right call, and __post_init__ already validates the real constraint.

Testing

The PR description notes runtime tests ran "through a scratch import shim because the available compiled extension predates this checkout." Given three of the changes are new raise statements on paths that were previously permissive, I'd want a real build plus at least test/dynamo/test_export.py, test/dynamo/test_optimizers.py, test/dynamo/test_guard_serialization.py (for the save_guards path), and test/dynamo/test_repros.py before landing. pyrefly passing does not exercise any of the new raises.

Also: no test covers any of the new AssertionError paths. If they are believed unreachable, that's an argument for making them narrowing conditions (as in builder.py) rather than raises — the codebase then can't regress into them.

Summary: The Any → object conversions and the builder.py narrowing are good, but the four new AssertionError/ArgMappingException raises in guards.py:3109, optimizer.py:231, and functional_export.py:399,1074 convert previously-tolerated inputs into crashes or silent graph breaks; prefer narrowing conditions (as done correctly in builder.py:464) over raises.
| Branch: bobren/dynamo-source-object

The initial typing pass introduced runtime failures while narrowing object-typed source indices. Keep the existing permissive behavior by filtering non-string builtin keys, skipping non-integer export input sources, and using the established integer invariant only as a static cast in optimizer argument mapping. Also consolidate slice validation and simplify redundant object unions.

Test Plan:

```
pyrefly check torch/_dynamo/source.py torch/_dynamo/graph_region_tracker.py
python -m py_compile torch/_dynamo/source.py torch/_dynamo/graph_region_tracker.py torch/_dynamo/functional_export.py torch/_dynamo/guards.py torch/_dynamo/variables/builder.py torch/_dynamo/variables/optimizer.py
lintrunner -a torch/_dynamo/source.py torch/_dynamo/graph_region_tracker.py torch/_dynamo/functional_export.py torch/_dynamo/guards.py torch/_dynamo/variables/builder.py torch/_dynamo/variables/optimizer.py
```

Targeted graph-region, source/guard, and ContextVar runtime tests passed locally through a scratch import shim for the older installed extension.

Authored with assistance from an AI coding assistant.
@bobrenjc93

Copy link
Copy Markdown
Contributor Author

Addressed the review in 2fe31e3:

  • non-string BUILTIN_MATCH keys are now skipped instead of asserted
  • export input collection narrows with isinstance(..., int), while the output path uses a static cast and preserves runtime behavior
  • optimizer argument mapping uses its existing integer-index invariant as a static cast, without a new fallback
  • slice validation is consolidated, and redundant object | None annotations are simplified

@claude

@claude

claude Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Claude finished @bobrenjc93's task in 11m 43s —— View job


Re-review of 2fe31e3

All four blocking items are resolved, and none of the fixes change runtime behavior in a way that can crash a previously-working compile. One style nit and one deferred question remain; nothing blocking.

Verification detail

Resolved: BUILTIN_MATCH no longer asserts

torch/_dynamo/guards.py:3107-3109

source = guard.originating_source
if isinstance(source, DictGetItemSource) and isinstance(source.index, str):
    self.check_fn_manager.used_builtin_vars.add(source.index)

This is exactly the narrowing form I suggested. Semantics are now provably identical to before: used_builtin_vars is OrderedSet[str] (guards.py:4646) and is only ever membership-tested against builtins.__dict__ keys (guards.py:4939), so a non-str index was a guaranteed no-op. Skipping it is equivalent, and the annotation is now honest. Resolved.

Resolved: export input collection narrows instead of asserting

torch/_dynamo/functional_export.py:1069-1072

if isinstance(
    source, torch._dynamo.source.GetItemSource
) and isinstance(source.index, int):
    graph_input_order[source.index] = len(graph_input_order)

Correct, and it matches the stated intent of the comment two lines above ("Skip inputs that come from other sources"). Worth noting this is strictly safer than the pre-PR code, not just equivalent: a non-int index previously got inserted as a key into graph_input_order: dict[int, int] and then blew up at flat_inputs[real_idx] (functional_export.py:1075) with a TypeError. Now it's skipped. Resolved.

Resolved: output path and optimizer use static casts only

torch/_dynamo/functional_export.py:398 — cast(int, cast(GetItemSource, val).index) and torch/_dynamo/variables/optimizer.py:230 — self.value.param_groups[cast(int, arg.source.index)].

typing.cast is a no-op at runtime, so the raise AssertionError / raise ArgMappingException behavior changes I flagged are gone entirely. The type(x) is not int checks (which additionally rejected bool) are gone too. Both sites now type-check on an invariant the surrounding code already relies on: at 398 the "input" branch is only populated when vt.source.base.is_input holds (output_graph.py:2300-2307), and at 230 param_groups is a list so the source is index-based. Resolved.

Resolved: slice validation consolidated

torch/_dynamo/source.py:758-769 is now a single check with a single message. self.index[0] is slice is safe — slice is not an acceptable base type in CPython, so __reduce__() always yields exactly (slice, (start, stop, step)), and __post_init__ (line 745-748) is the only writer of index_is_slice=True. Resolved.

Resolved: redundant | None annotations

graph_region_tracker.py:121 is -> object and line 132 is tuple[object, ...]. T remains bound at line 37 and _sort_with_ref_region(index_to_rank, regions: list[list[T]]) binds T = Node cleanly at the sole call site (graph_region_tracker.py:369, Region = list[Node] at line 47). Any is still imported and used at line 280, so no dead import. Resolved.

Nit: functional_export.py:1069 splits across lines unnecessarily

GetItemSource is already imported at functional_export.py:21 (and used unqualified at line 368), so the fully-qualified path is what forces the awkward three-line split. Per the repo style guidance about undoing linter-forced line breaks:

if isinstance(source, GetItemSource) and isinstance(source.index, int):

That's 86 columns at this indent, under the limit, and reads better.

Fix this →

Minor: cast(int, cast(GetItemSource, val).index) at line 398 is a double cast; cast(int, val.index) would suffice since val is object there anyway. Take it or leave it.

Still open (not this PR): NonSerializableSetGetItemSource.index

source.py:809 is annotated int but __post_init__ validates only ConstantVariable.is_literal. Both construction sites (builder.py:1335, builder.py:2313) pass an enumerate index, so int is accurate in practice — but the validator and the annotation disagree about what's allowed. Fine as a follow-up.

By contrast ConstDictKeySource.index: int (source.py:788) checks out: all six construction sites pass enumerate indices (optimizer.py:298,342,352, builder.py:1250,2203, nn_module.py:1615), the consumer at guards.py:1062-1063 treats it as a dict-keys position, and dict_keys_getitem requires an integer. Good tightening.

Testing

I could not run pyrefly, lintrunner, or the dynamo test suite in this environment (no build / tools unavailable), so this is a static review of the diff only. That said, the risk profile is much better than the previous revision: every remaining narrowing is either a typing.cast (zero runtime effect) or a condition that skips a case which previously raised downstream. There are no longer any new raise statements on previously-permissive paths, so the specific extra test coverage I asked for last round (test_export.py, test_optimizers.py, test_guard_serialization.py) is no longer load-bearing — normal CI should be sufficient.

Summary: All four behavior-change concerns are fixed correctly — BUILTIN_MATCH and the export input loop now narrow rather than raise, and the optimizer/output paths use no-op typing.casts — leaving only a cosmetic line-wrap nit at functional_export.py:1069.
| Branch: bobren/dynamo-source-object

Use the imported GetItemSource name so the input-index guard stays on one line, and split the output-path casts for readability.

Test Plan:

```
python -m py_compile torch/_dynamo/functional_export.py
lintrunner -a torch/_dynamo/functional_export.py
```

Authored with assistance from an AI coding assistant.
@bobrenjc93

Copy link
Copy Markdown
Contributor Author

Addressed the remaining readability feedback in ffe9741: the export-input check now uses the existing unqualified import on one line, and the nested cast is split into named source/index steps.

@claude Please review the latest head and approve if there are no remaining concerns.

@claude

claude Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Claude finished @bobrenjc93's task in 1m 46s —— View job


Review of ffe9741 — no remaining concerns

The two readability fixes are cosmetic and confirmed behavior-preserving. Everything I flagged in the prior two rounds is resolved.

Verification detail

Incremental diff since 2fe31e3 is two lines of cosmetics

-                input_idx = cast(GetItemSource, val).index
+                input_source = cast(GetItemSource, val)
+                input_idx = cast(int, input_source.index)
-                if isinstance(
-                    source, torch._dynamo.source.GetItemSource
-                ) and isinstance(source.index, int):
+                if isinstance(source, GetItemSource) and isinstance(source.index, int):

Both confirmed:

  • typing.cast is a runtime no-op, so functional_export.py:398-399 has zero behavioral effect. Note the cast(int, ...) was added here relative to origin/main (the pre-PR line was a bare .index), which is the intended narrowing given index: object.
  • GetItemSource is imported at functional_export.py:21 and already used unqualified at line 368, so the collapsed form is consistent with the rest of the file. functional_export.py:1070 measures 88 columns — under the limit; grep -nE '^.{89,}$' shows no new over-length lines from this diff.

Full-diff recheck against origin/main base (ca66d98)

Site Status
guards.py:3107-3109 Narrowing, not a raise. used_builtin_vars is OrderedSet[str] and only membership-tested against builtins.__dict__ keys, so skipping a non-str index is exactly equivalent to the old no-op insert.
functional_export.py:1070 Narrowing, not a raise. Matches the comment at 1064-1066 ("Skip inputs that come from other sources"), and is strictly safer than pre-PR — a non-int index used to land as a key in dict[int, int] and then TypeError at line 1074.
functional_export.py:398-399, optimizer.py:230 typing.cast only. The earlier raise AssertionError / raise ArgMappingException and type(x) is not int checks (which also rejected bool) are gone.
source.py:761-767 Single consolidated check, single message. self.index[0] is slice is exact: slice is not subclassable in CPython and __post_init__ (line 745-748) is the sole writer of index_is_slice=True, always storing slice.__reduce__().
graph_region_tracker.py:121,132 -> object / tuple[object, ...]; no redundant `
builder.py:461-467 The isinstance(cur.index, str) guard on the UnspecializedParamBufferSource collapse is the model narrowing — a non-str index now falls through instead of building an _AttrToken with a non-str name.
source.py annotations GetItemSource.index, DictGetItemSource.index, DictSubclassGetItemSource.index, ContextVarGetSource.default_value as object; ConstDictKeySource.index as int (all six construction sites pass enumerate indices; dict_keys_getitem requires an integer). _esc_str(s: object) is fine — the body only calls repr/str.

Testing caveat

No build or Python environment is available in this runner (no .venv, pyrefly/lintrunner unavailable), so this remains a static review — as does the diff's own claim, which the description notes ran through an import shim. That's acceptable here: the diff contains no new raise on a previously-permissive path, so the only runtime-visible changes are two narrowings that skip cases which used to fail downstream anyway. Standard CI should cover it.

Follow-up, not this PR

source.py:809 — NonSerializableSetGetItemSource.index is annotated int but __post_init__ validates only ConstantVariable.is_literal. Accurate at both construction sites (builder.py:1335, builder.py:2313 pass enumerate indices), but the validator and annotation disagree about what's permitted.

I'm not able to approve pull requests — that's disabled for security reasons (FAQ). Treat this as a LGTM from my side; a human reviewer will need to click approve.

Summary: ffe9741 cleanly resolves the last cosmetic nit with two no-op changes, and I have no remaining concerns — every narrowing in the PR is either a runtime-no-op cast or a condition that skips a case which previously failed downstream.
| Branch: bobren/dynamo-source-object

@bobrenjc93
bobrenjc93 marked this pull request as ready for review September 8, 2026 23:27
@bobrenjc93

Copy link
Copy Markdown
Contributor Author

@pytorchbot drci

@bobrenjc93

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -i

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged while ignoring the following 0 checks:

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

BBBela pushed a commit to BBBela/pytorch that referenced this pull request Sep 9, 2026
## Summary

- replace `Any` with `object` for opaque source keys and graph-region hash inputs
- retain `int` for the positional `ConstDictKeySource.index`, and narrow opaque indices at consumers before use
- validate encoded slice data before unpacking and make region sorting generic

These changes expose unchecked assumptions that `Any` previously hid without changing the accepted runtime values.

## Test plan

- `pyrefly check torch/_dynamo/source.py torch/_dynamo/graph_region_tracker.py` (0 errors, 3 pre-existing suppressions)
- `python -m py_compile torch/_dynamo/source.py torch/_dynamo/graph_region_tracker.py torch/_dynamo/functional_export.py torch/_dynamo/guards.py torch/_dynamo/variables/builder.py torch/_dynamo/variables/optimizer.py`
- `lintrunner -a torch/_dynamo/source.py torch/_dynamo/graph_region_tracker.py torch/_dynamo/functional_export.py torch/_dynamo/guards.py torch/_dynamo/variables/builder.py torch/_dynamo/variables/optimizer.py`
- `test/dynamo/test_graph_region_tracker.py` (13 passed, 1 hardware-gated skip)
- `MiscTests.test_hash_getitem_slice`, `SourceCloneTests`, and `test/dynamo/test_contextvars.py` (32 passed)

The local runtime tests loaded the patched Python modules through a scratch import shim because the available compiled extension predates this checkout. Full coverage will run in CI against a fresh build.

Authored with assistance from an AI coding assistant.

Pull Request resolved: pytorch#196370
Approved by: https://github.com/pytorchgreenlight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor ciflow/torchtitan Run TorchTitan integration tests ciflow/trunk Trigger trunk jobs on your pull request Merged module: dynamo topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants