Skip to content

Conversation

ppanchalia
Copy link
Contributor

@ppanchalia ppanchalia commented Aug 14, 2025

We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.
It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Differential Revision: D80075975

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

Copy link

pytorch-bot bot commented Aug 14, 2025

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 338e2f3 with merge base 3650989 (image):

BROKEN TRUNK - The following job failed but were 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.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80075975

ppanchalia added a commit to ppanchalia/pytorch that referenced this pull request Aug 14, 2025
…H guard triggered recompiles (pytorch#160592)

Summary:


We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.

It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Test Plan:
rm -rf /tmp/r && TORCH_TRACE=/tmp/r buck2 run //scripts/ppanchalia/pt2_workspace:inline_inbuilt_nn_modules_test and CI Tests

Rollback Plan:

Differential Revision: D80075975
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80075975

ppanchalia added a commit to ppanchalia/pytorch that referenced this pull request Aug 14, 2025
…H guard triggered recompiles (pytorch#160592)

Summary:


We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.

It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Test Plan:
rm -rf /tmp/r && TORCH_TRACE=/tmp/r buck2 run //scripts/ppanchalia/pt2_workspace:inline_inbuilt_nn_modules_test and CI Tests

Rollback Plan:

Differential Revision: D80075975
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80075975

ppanchalia added a commit to ppanchalia/pytorch that referenced this pull request Aug 14, 2025
…H guard triggered recompiles (pytorch#160592)

Summary:


We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.

It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Test Plan:
rm -rf /tmp/r && TORCH_TRACE=/tmp/r buck2 run //scripts/ppanchalia/pt2_workspace:inline_inbuilt_nn_modules_test and CI Tests

Rollback Plan:

Differential Revision: D80075975
ppanchalia added a commit to ppanchalia/pytorch that referenced this pull request Aug 14, 2025
…H guard triggered recompiles (pytorch#160592)

Summary:


We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.

It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Test Plan:
rm -rf /tmp/r && TORCH_TRACE=/tmp/r buck2 run //scripts/ppanchalia/pt2_workspace:inline_inbuilt_nn_modules_test and CI Tests

Rollback Plan:

Differential Revision: D80075975
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80075975

ppanchalia added a commit to ppanchalia/pytorch that referenced this pull request Aug 14, 2025
…H guard triggered recompiles (pytorch#160592)

Summary:
Pull Request resolved: pytorch#160592

We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.

It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Test Plan:
rm -rf /tmp/r && TORCH_TRACE=/tmp/r buck2 run //scripts/ppanchalia/pt2_workspace:inline_inbuilt_nn_modules_test and CI Tests

Rollback Plan:

Differential Revision: D80075975
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80075975

Copy link
Contributor

@anijain2305 anijain2305 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very close to be done. Can you also add a test? For test, you can add a guard hook and check if the str [inline-inbuilt-nn-modules-candidate] is present in the str representation of guards. A pointer to do that is here -

with install_guard_manager_testing_hook(hook):

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80075975

ppanchalia added a commit to ppanchalia/pytorch that referenced this pull request Aug 14, 2025
…H guard triggered recompiles (pytorch#160592)

Summary:
Pull Request resolved: pytorch#160592

We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.

It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Test Plan:
rm -rf /tmp/r && TORCH_TRACE=/tmp/r buck2 run //scripts/ppanchalia/pt2_workspace:inline_inbuilt_nn_modules_test and CI Tests

Rollback Plan:

Differential Revision: D80075975
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80075975

ppanchalia added a commit to ppanchalia/pytorch that referenced this pull request Aug 14, 2025
…H guard triggered recompiles (pytorch#160592)

Summary:


We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.

It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Test Plan:
rm -rf /tmp/r && TORCH_TRACE=/tmp/r buck2 run //scripts/ppanchalia/pt2_workspace:inline_inbuilt_nn_modules_test and CI Tests

Rollback Plan:

Differential Revision: D80075975
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80075975

@ppanchalia ppanchalia self-assigned this Aug 14, 2025
Copy link
Contributor

@anijain2305 anijain2305 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test is failing. But the code looks good.

ppanchalia added a commit to ppanchalia/pytorch that referenced this pull request Aug 14, 2025
…H guard triggered recompiles (pytorch#160592)

Summary:


We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.

It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Test Plan:
rm -rf /tmp/r && TORCH_TRACE=/tmp/r buck2 run //scripts/ppanchalia/pt2_workspace:inline_inbuilt_nn_modules_test and CI Tests

And UT added

Rollback Plan:

Differential Revision: D80075975
ppanchalia added a commit to ppanchalia/pytorch that referenced this pull request Aug 14, 2025
…H guard triggered recompiles (pytorch#160592)

Summary:


We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.

It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Test Plan:
rm -rf /tmp/r && TORCH_TRACE=/tmp/r buck2 run //scripts/ppanchalia/pt2_workspace:inline_inbuilt_nn_modules_test and CI Tests

And UT added

Rollback Plan:

Differential Revision: D80075975
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80075975

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80075975

ppanchalia added a commit to ppanchalia/pytorch that referenced this pull request Aug 14, 2025
…H guard triggered recompiles (pytorch#160592)

Summary:
Pull Request resolved: pytorch#160592

We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.

It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Test Plan:
rm -rf /tmp/r && TORCH_TRACE=/tmp/r buck2 run //scripts/ppanchalia/pt2_workspace:inline_inbuilt_nn_modules_test and CI Tests

And UT added

Rollback Plan:

Differential Revision: D80075975
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80075975

@ppanchalia ppanchalia force-pushed the export-D80075975 branch 2 times, most recently from 96d626f to 6e68921 Compare August 14, 2025 21:57
ppanchalia added a commit to ppanchalia/pytorch that referenced this pull request Aug 14, 2025
…H guard triggered recompiles (pytorch#160592)

Summary:


We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.

It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Test Plan:
rm -rf /tmp/r && TORCH_TRACE=/tmp/r buck2 run //scripts/ppanchalia/pt2_workspace:inline_inbuilt_nn_modules_test and CI Tests

And UT added

Rollback Plan:

Differential Revision: D80075975
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80075975

…H guard triggered recompiles (pytorch#160592)

Summary:
Pull Request resolved: pytorch#160592

We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.

It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Test Plan:
rm -rf /tmp/r && TORCH_TRACE=/tmp/r buck2 run //scripts/ppanchalia/pt2_workspace:inline_inbuilt_nn_modules_test and CI Tests

And UT added

Rollback Plan:

Differential Revision: D80075975
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80075975

@ppanchalia
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

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

@ppanchalia ppanchalia deleted the export-D80075975 branch August 15, 2025 17:26
facebook-github-bot pushed a commit to pytorch/benchmark that referenced this pull request Aug 16, 2025
…H guard triggered recompiles (#160592)

Summary:
We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.
It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

X-link: pytorch/pytorch#160592
Approved by: https://github.com/anijain2305

Reviewed By: anijain2305, clee2000

Differential Revision: D80075975

fbshipit-source-id: 21c53f015c7aed9f6cf6e5da7e2b59fbc340c476
can-gaa-hou pushed a commit to can-gaa-hou/pytorch that referenced this pull request Aug 22, 2025
…H guard triggered recompiles (pytorch#160592)

We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.
It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Differential Revision: D80075975

Pull Request resolved: pytorch#160592
Approved by: https://github.com/anijain2305
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
…H guard triggered recompiles (pytorch#160592)

We add a logging around when an ID_MATCH guard is added at a place where inbuilt_inline_nn_modules would inline it. This is done with the aim of tagging recompiles that could be avoided by setting inbuilt_inline_nn_modules flag.
It will help us log and track the flag's adoption and potentially quantify saving in the the number of recompiles.

Differential Revision: D80075975

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants