Skip to content

Fix stale codegen golden string in test_extension_backend - #188509

Closed
frgossen wants to merge 1 commit into
gh/frgossen/164/basefrom
gh/frgossen/164/head
Closed

frgossen wants to merge 1 commit into
gh/frgossen/164/basefrom
gh/frgossen/164/head

Conversation

@frgossen

@frgossen frgossen commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

test_open_device_registration uses a FileCheck to assert the generated
CPU C++ wrapper contains a scalar load expression. The expected string
was " = in_ptr0[static_cast(i0)];", but inductor CPU codegen now
emits " = in_ptr0[static_cast<int64_t>(x0)];": the index cast changed
from long to int64_t and the loop variable was renamed from i0 to x0.
The golden string was never updated, so the check fails on the
nogpu_NO_AVX2 periodic shard, which forces the scalar (non-vectorized)
load path via ATEN_CPU_CAPABILITY=default.

Rebaseline the expected string to match the current codegen output.

Test Plan:
Reproduced the shard's codegen path locally by forcing the scalar load
branch, which fails before this change and passes after:

ATEN_CPU_CAPABILITY=default python -m pytest \
  test/inductor/test_extension_backend.py::ExtensionBackendTests::test_open_device_registration -v
# -> 1 passed

Authored with Claude.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure, 2 Unrelated Failures

As of commit b3251c4 with merge base 2e53092 (image):

NEW FAILURE - The following job has failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

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

@frgossen

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -i

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jun 30, 2026
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged while ignoring the following 3 checks: inductor / inductor-test / test-osdc (inductor_timm, 1, 2, mt-l-x86aavx2-29-113-a10g), inductor / inductor-test / test-osdc (inductor_timm, 2, 2, mt-l-x86aavx2-29-113-a10g), inductor / inductor-test / test-osdc (inductor_torchbench, 2, 2, mt-l-x86aavx2-29-113-a10g)

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

vishalgoyal316 pushed a commit to vishalgoyal316/pytorch that referenced this pull request Jul 16, 2026
…8509)

test_open_device_registration uses a FileCheck to assert the generated
CPU C++ wrapper contains a scalar load expression. The expected string
was " = in_ptr0[static_cast<long>(i0)];", but inductor CPU codegen now
emits " = in_ptr0[static_cast<int64_t>(x0)];": the index cast changed
from long to int64_t and the loop variable was renamed from i0 to x0.
The golden string was never updated, so the check fails on the
nogpu_NO_AVX2 periodic shard, which forces the scalar (non-vectorized)
load path via ATEN_CPU_CAPABILITY=default.

Rebaseline the expected string to match the current codegen output.

Test Plan:
Reproduced the shard's codegen path locally by forcing the scalar load
branch, which fails before this change and passes after:

```
ATEN_CPU_CAPABILITY=default python -m pytest \
  test/inductor/test_extension_backend.py::ExtensionBackendTests::test_open_device_registration -v
# -> 1 passed
```

Authored with Claude.

Pull Request resolved: pytorch#188509
Approved by: https://github.com/zou3519, https://github.com/Skylion007
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…8509)

test_open_device_registration uses a FileCheck to assert the generated
CPU C++ wrapper contains a scalar load expression. The expected string
was " = in_ptr0[static_cast<long>(i0)];", but inductor CPU codegen now
emits " = in_ptr0[static_cast<int64_t>(x0)];": the index cast changed
from long to int64_t and the loop variable was renamed from i0 to x0.
The golden string was never updated, so the check fails on the
nogpu_NO_AVX2 periodic shard, which forces the scalar (non-vectorized)
load path via ATEN_CPU_CAPABILITY=default.

Rebaseline the expected string to match the current codegen output.

Test Plan:
Reproduced the shard's codegen path locally by forcing the scalar load
branch, which fails before this change and passes after:

```
ATEN_CPU_CAPABILITY=default python -m pytest \
  test/inductor/test_extension_backend.py::ExtensionBackendTests::test_open_device_registration -v
# -> 1 passed
```

Authored with Claude.

Pull Request resolved: pytorch#188509
Approved by: https://github.com/zou3519, https://github.com/Skylion007
pragupta pushed a commit to ROCm/pytorch that referenced this pull request Jul 29, 2026
…end (#3512)

test_open_device_registration uses a FileCheck to assert the generated
CPU C++ wrapper contains a scalar load expression. The expected string
was " = in_ptr0[static_cast<long>(i0)];", but inductor CPU codegen now
emits " = in_ptr0[static_cast<int64_t>(x0)];": the index cast changed
from long to int64_t and the loop variable was renamed from i0 to x0.
The golden string was never updated, so the check fails on the
nogpu_NO_AVX2 periodic shard, which forces the scalar (non-vectorized)
load path via ATEN_CPU_CAPABILITY=default.

Rebaseline the expected string to match the current codegen output.

Test Plan:
Reproduced the shard's codegen path locally by forcing the scalar load
branch, which fails before this change and passes after:

```
ATEN_CPU_CAPABILITY=default python -m pytest \
  test/inductor/test_extension_backend.py::ExtensionBackendTests::test_open_device_registration -v
# -> 1 passed
```

Authored with Claude.

Pull Request resolved: pytorch#188509
Approved by: https://github.com/zou3519, https://github.com/Skylion007

(cherry picked from commit 0e8ec23)

Co-authored-by: Frederik Gossen <[email protected]>
chinmaydk99 added a commit to ROCm/pytorch that referenced this pull request Jul 29, 2026
Port the remaining TheRock ROCm 7.14+ skips identified by full-suite run 30308582520.

The upstream source fixes from PRs pytorch#185656, pytorch#188509, pytorch#188580, and pytorch#188673 are intentionally excluded because they are tracked by separate backport PRs.

Derived from 666f2bc with those source-fix patches removed.

Co-authored-by: Cursor <[email protected]>
@github-actions
github-actions Bot deleted the gh/frgossen/164/head branch July 31, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants