Skip to content

Find the tuned INT4 kernel's def under its module-level name too - #24097

Closed
bobrenjc93 wants to merge 1 commit into
pytorch:mainfrom
bobrenjc93:export-D126992211
Closed

bobrenjc93 wants to merge 1 commit into
pytorch:mainfrom
bobrenjc93:export-D126992211

Conversation

@bobrenjc93

Copy link
Copy Markdown

Summary:
test_a_tuned_shape_traces_only_its_picked_config finds the user kernel in Inductor's wrapper by the exact text def _int4_w4a16_direct_kernel(. That only matches the wrapper's async_compile.triton('''...''') string form, which keeps the kernel's own name.

pytorch/pytorch#200502 makes Inductor's python wrapper define each Triton kernel as module-level code by default. There, the def takes Inductor's kernel name, _int4_w4a16_direct_kernel_0. The test failed on its DiffTrain import, D126740082, which was reverted partly for this.

The test now matches ^def <name>\w*\( and slices back to the user_autotune( before that match. The decorator's configs=[...] still comes right before the def in both forms, so the check that only the picked config is traced is unchanged. This lands ahead of the #200502 reland.


landed-with-radar-review

Differential Revision: D126992211

Summary:
`test_a_tuned_shape_traces_only_its_picked_config` finds the user kernel in Inductor's wrapper by the exact text `def _int4_w4a16_direct_kernel(`. That only matches the wrapper's `async_compile.triton('''...''')` string form, which keeps the kernel's own name.

pytorch/pytorch#200502 makes Inductor's python wrapper define each Triton kernel as module-level code by default. There, the def takes Inductor's kernel name, `_int4_w4a16_direct_kernel_0`. The test failed on its DiffTrain import, D126740082, which was reverted partly for this.

The test now matches `^def <name>\w*\(` and slices back to the `user_autotune(` before that match. The decorator's `configs=[...]` still comes right before the def in both forms, so the check that only the picked config is traced is unchanged. This lands ahead of the #200502 reland.

___

landed-with-radar-review

Differential Revision: D126992211
@pytorch-bot

pytorch-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 Cancelled Job, 1 Pending, 3 Unrelated Failures, 2 Unclassified Failures

As of commit c3a199b with merge base 6368414 (image):

UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:

CANCELLED JOB - The following job was cancelled. Please retry:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 22, 2026
@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@bobrenjc93 bobrenjc93 closed this Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant