Skip to content

Conversation

@kundaMwiza
Copy link
Collaborator

@kundaMwiza kundaMwiza commented Jul 14, 2025

An out of tree backend can have its own configuration options that the user can enable to control inductor compilation. These config options need to be taken into account when calculating the key that is used to determine cache miss / hits. This PR allows out of tree backends to specify a custom config module that has the same type as torch._inductor.config that can be used to control codegen (in addition to the default config), and will be used when creating the cache key.

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

@pytorch-bot
Copy link

pytorch-bot bot commented Jul 14, 2025

🔗 Helpful Links

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

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

✅ You can merge normally! (3 Unrelated Failures)

As of commit cb22c97 with merge base 2dccff7 (image):

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

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

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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

@kundaMwiza
Copy link
Collaborator Author

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Jul 14, 2025
@albanD albanD requested a review from eellison July 14, 2025 21:36
@albanD albanD added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jul 14, 2025
Copy link
Contributor

@eellison eellison left a comment

Choose a reason for hiding this comment

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

Looks good ! I think it would also be nice to have device-specific overrides of some of the configs in torch/_inductor/config.py that would be specifiable in another file.

cc @blaine-rister, also @exclamaforte

@kundaMwiza kundaMwiza force-pushed the mwizak/add_custom_backend_config branch from ad91a0d to 425a1fa Compare July 18, 2025 13:40
@kundaMwiza
Copy link
Collaborator Author

Rebased onto viable/strict as the failures look unrelated

@kundaMwiza
Copy link
Collaborator Author

@eellison Sorry I think I've fixed the import issue now so it should be good to go

@kundaMwiza
Copy link
Collaborator Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added ciflow/trunk Trigger trunk jobs on your pull request ciflow/inductor labels Jul 21, 2025
@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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: linux-binary-manywheel / manywheel-py3_9-cuda12_9-build / build

Details for Dev Infra team Raised by workflow job

@kundaMwiza kundaMwiza force-pushed the mwizak/add_custom_backend_config branch from 5c5718e to 3cec591 Compare July 21, 2025 10:19
@kundaMwiza
Copy link
Collaborator 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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: trunk / win-vs2022-cpu-py3 / test (default, 1, 3, lf.windows.4xlarge.nonephemeral)

Details for Dev Infra team Raised by workflow job

@kundaMwiza
Copy link
Collaborator Author

Test timed out. Will retry

@kundaMwiza kundaMwiza force-pushed the mwizak/add_custom_backend_config branch from 3cec591 to 6bd3959 Compare July 23, 2025 08:10
@kundaMwiza kundaMwiza force-pushed the mwizak/add_custom_backend_config branch from 4aea8d2 to cb22c97 Compare July 23, 2025 09:01
@kundaMwiza
Copy link
Collaborator 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

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 Merged module: inductor open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants