[Inductor XPU GEMM] Step 1/N: Refactor cutlass configuration.#160174
[Inductor XPU GEMM] Step 1/N: Refactor cutlass configuration.#160174etaf wants to merge 37 commits intogh/etaf/154/basefrom
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/160174
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 654c7ac with merge base af6d994 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…tion." This PR is the second step toward implementing RFC #160175. Currently, all Cutlass-related Torch Inductor configs are located in `torch._inductor.config.cuda`. This PR refactors the device-agnostic Cutlass configurations into a separate module, `torch._inductor.config.cutlass`, so they can be shared and reused by XPU as well. [ghstack-poisoned]
…tion." This PR is the second step toward implementing RFC #160175. Currently, all Cutlass-related Torch Inductor configs are located in `torch._inductor.config.cuda`. This PR refactors the device-agnostic Cutlass configurations into a separate module, `torch._inductor.config.cutlass`, so they can be shared and reused by XPU as well. [ghstack-poisoned]
…tion." This PR is the second step toward implementing RFC #160175. Currently, all Cutlass-related Torch Inductor configs are located in `torch._inductor.config.cuda`. This PR refactors the device-agnostic Cutlass configurations into a separate module, `torch._inductor.config.cutlass`, so they can be shared and reused by XPU as well. [ghstack-poisoned]
…tion." This PR is the second step toward implementing RFC #160175. Currently, all Cutlass-related Torch Inductor configs are located in `torch._inductor.config.cuda`. This PR refactors the device-agnostic Cutlass configurations into a separate module, `torch._inductor.config.cutlass`, so they can be shared and reused by XPU as well. [ghstack-poisoned]
…on." This PR is the first step toward implementing RFC #160175. Currently, all Cutlass-related Torch Inductor configs are located in `torch._inductor.config.cuda`. This PR refactors the device-agnostic Cutlass configurations into `torch._inductor.config.cutlass`, so they can be shared and reused by XPU as well. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben mlazos [ghstack-poisoned]
…on." This PR is the first step toward implementing RFC #160175. Currently, all Cutlass-related Torch Inductor configs are located in `torch._inductor.config.cuda`. This PR refactors the device-agnostic Cutlass configurations into `torch._inductor.config.cutlass`, so they can be shared and reused by XPU as well. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben mlazos [ghstack-poisoned]
…on." This PR is the first step toward implementing RFC #160175. Currently, all Cutlass-related Torch Inductor configs are located in `torch._inductor.config.cuda`. This PR refactors the device-agnostic Cutlass configurations into `torch._inductor.config.cutlass`, so they can be shared and reused by XPU as well. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben mlazos [ghstack-poisoned]
Summary: Following up a previous change #160174 where we accidentally include cutlass path to config hash and regressed the cache hit rate, we want to have some basic test added to pytorch to guard against accidental changes to configs like this happening again in the future. One way to solve this is to add a fixture test which compare the latest config hash to an existing generated result from previous run. When developer need to update the config, it can simply be done by using ``` EXPECTTEST_ACCEPT=1 pytest test/test_torch_config_hash_fixture.py ``` Test Plan: pytest test/test_torch_config_hash_fixture.py Reviewers: Subscribers: Tasks: Tags:
Summary: Following up a previous change #160174 where we accidentally include cutlass path to config hash and regressed the cache hit rate, we want to have some basic test added to pytorch to guard against accidental changes to configs like this happening again in the future. One way to solve this is to add a fixture test which compare the latest config hash to an existing generated result from previous run. When developer need to update the config, it can simply be done by using ``` EXPECTTEST_ACCEPT=1 pytest test/test_torch_config_hash_fixture.py ``` Test Plan: pytest test/test_torch_config_hash_fixture.py Reviewers: Subscribers: Tasks: Tags:
Summary: Following up a previous change #160174 where we accidentally include cutlass path to config hash and regressed the cache hit rate, we want to have some basic test added to pytorch to guard against accidental changes to configs like this happening again in the future. One way to solve this is to add a fixture test which compare the latest config hash to an existing generated result from previous run. When developer need to update the config, it can simply be done by using ``` EXPECTTEST_ACCEPT=1 pytest test/test_torch_config_hash_fixture.py ``` Test Plan: pytest test/test_torch_config_hash_fixture.py Reviewers: Subscribers: Tasks: Tags:
Summary: Following up a previous change #160174 where we accidentally include cutlass path to config hash and regressed the cache hit rate, we want to have some basic test added to pytorch to guard against accidental changes to configs like this happening again in the future. One way to solve this is to add detection for common patterns like paths, username and hostname in the config values. Test Plan: pytest test/test_torch_config_hash_determinism.py Reviewers: Subscribers: Tasks: Tags:
…pytorch#160174)" This reverts commit eabb7ad. Reverted pytorch#160174 on behalf of https://github.com/huydhn due to Sorry for reverting your change, but it seems to cause a perf regression ([comment](pytorch#160174 (comment)))
Summary: Following up a previous change #160174 where we accidentally include cutlass path to config hash and regressed the cache hit rate, we want to have some basic test added to pytorch to guard against accidental changes to configs like this happening again in the future. One way to solve this is to add detection for common patterns like paths, username and hostname in the config values. Test Plan: pytest test/test_torch_config_hash_determinism.py Reviewers: Subscribers: Tasks: Tags: Fixes #ISSUE_NUMBER Pull Request resolved: #171275 Approved by: https://github.com/bobrenjc93, https://github.com/masnesral
ghstack-source-id: a5f925c Pull Request resolved: pytorch#160174
Summary: Following up a previous change pytorch#160174 where we accidentally include cutlass path to config hash and regressed the cache hit rate, we want to have some basic test added to pytorch to guard against accidental changes to configs like this happening again in the future. One way to solve this is to add detection for common patterns like paths, username and hostname in the config values. Test Plan: pytest test/test_torch_config_hash_determinism.py Reviewers: Subscribers: Tasks: Tags: Fixes #ISSUE_NUMBER Pull Request resolved: pytorch#171275 Approved by: https://github.com/bobrenjc93, https://github.com/masnesral
ghstack-source-id: fa78cb9 Pull Request resolved: pytorch#160174
ghstack-source-id: fa78cb9 Pull Request resolved: pytorch/pytorch#160174
|
Hi @etaf, it's tricky and error prone to run this internally so we should land, and I can let you know if it passes internally. Sorry for the delay on this. |
Thanks for your time! |
|
@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: Command Details for Dev Infra teamRaised by workflow job |
…on." This PR is the first step toward implementing RFC #160175. Currently, all Cutlass-related Torch Inductor configs are located in `torch._inductor.config.cuda`. This PR refactors the device-agnostic Cutlass configurations into `torch._inductor.config.cutlass`, so they can be shared and reused by XPU as well. The common cutlass configurations are moved from `class cuda` to `class cutlass` and the cuda specific configs are still in `class cuda`. Besides, to not break the BC, we need to keep the configs moved from `class cuda` to `class cutlass`, eg. cuda.cutlass_dir. So we add a wrapper `inherit_fields_from(cutlass)` to `class cuda` and `class xpu` so they also have configs in `class cutlass`. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo mlazos chenyang78 [ghstack-poisoned]
|
@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 |
…h#160174) This PR is the first step toward implementing RFC pytorch#160175. Currently, all Cutlass-related Torch Inductor configs are located in `torch._inductor.config.cuda`. This PR refactors the device-agnostic Cutlass configurations into `torch._inductor.config.cutlass`, so they can be shared and reused by XPU as well. The common cutlass configurations are moved from `class cuda` to `class cutlass` and the cuda specific configs are still in `class cuda`. Besides, to not break the BC, we need to keep the configs moved from `class cuda` to `class cutlass`, eg. cuda.cutlass_dir. So we add a wrapper `@inherit_fields_from(cutlass)` to `class cuda` and `class xpu` so they also have configs in `class cutlass`. Pull Request resolved: pytorch#160174 Approved by: https://github.com/EikanWang, https://github.com/mlazos, https://github.com/jansel
|
@etaf Will this commit continue to be merged? |
It has been merged. And the other PR in the stack will also be merged after get review approval. |
Stack from ghstack (oldest at bottom):
This PR is the first step toward implementing RFC #160175.
Currently, all Cutlass-related Torch Inductor configs are located in
torch._inductor.config.cuda. This PR refactors the device-agnostic Cutlass configurations intotorch._inductor.config.cutlass, so they can be shared and reused by XPU as well.The common cutlass configurations are moved from
class cudatoclass cutlassand the cuda specific configs are still inclass cuda.Besides, to not break the BC, we need to keep the configs moved from
class cudatoclass cutlass, eg. cuda.cutlass_dir. So we add a wrapper@inherit_fields_from(cutlass)toclass cudaandclass xpuso they also have configs inclass cutlass.cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo @mlazos @chenyang78