- 
                Notifications
    You must be signed in to change notification settings 
- Fork 25.7k
[inductor] Allow backends to register their own custom config object #158254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[inductor] Allow backends to register their own custom config object #158254
Conversation
| 🔗 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 ( 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. | 
| @pytorchbot label "topic: not user facing" | 
There was a problem hiding this 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
ad91a0d    to
    425a1fa      
    Compare
  
    | Rebased onto viable/strict as the failures look unrelated | 
| @eellison Sorry I think I've fixed the import issue now so it should be good to go | 
| @pytorchbot merge | 
| Merge startedYour 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 | 
| Merge failedReason: 1 jobs have failed, first few of them are: linux-binary-manywheel / manywheel-py3_9-cuda12_9-build / build Details for Dev Infra teamRaised by workflow job | 
5c5718e    to
    3cec591      
    Compare
  
    | @pytorchbot merge | 
| Merge startedYour 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 | 
| Merge failedReason: 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 teamRaised by workflow job | 
| Test timed out. Will retry | 
3cec591    to
    6bd3959      
    Compare
  
    4aea8d2    to
    cb22c97      
    Compare
  
    | @pytorchbot merge | 
| Merge startedYour 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 | 
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.configthat 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