-
Notifications
You must be signed in to change notification settings - Fork 24.1k
Refactor some common autotune-related utils into a new file #152652
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
Closed
Closed
+210
−144
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: I'll need some of the benchmark-related functions surfaced in a common utils file so I can use them for remote autotuning. This PR is almost a straight move of a few nested functions from inside AlgorithmSelectorCache, plus the datatypes they depend on, except: * All hell breaks loose with mypy on select_algorithm.py with this refactor, so I disabled it. Initial investigations looks like there are potentially a ton of type problems in this file, so I'll tackle fixing types in a follow-up diff. * Introduced a new interface "Benchmarkable" as the base type that gets benchmarked. This is looking forward to the remote autotuning implementation where the types that we'll send across the wire must be serializable. So we won't be using the exact same types we pass to these utilities now, e.g., ExternKernelCaller. * Rather than checking types explicitly, I introduced an is_extern() method to the Benchmarkable interface. Test Plan: Existing unit tests [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/152652
Note: Links to docs will display an error until the docs builds have been completed. ❌ 29 New Failures, 2 Pending, 2 Unrelated FailuresAs of commit 283deba with merge base dfcfad2 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job 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. |
masnesral
added a commit
that referenced
this pull request
May 2, 2025
Summary: I'll need some of the benchmark-related functions surfaced in a common utils file so I can use them for remote autotuning. This PR is almost a straight move of a few nested functions from inside AlgorithmSelectorCache, plus the datatypes they depend on, except: * All hell breaks loose with mypy on select_algorithm.py with this refactor, so I disabled it. Initial investigations looks like there are potentially a ton of type problems in this file, so I'll tackle fixing types in a follow-up diff. * Introduced a new interface "Benchmarkable" as the base type that gets benchmarked. This is looking forward to the remote autotuning implementation where the types that we'll send across the wire must be serializable. So we won't be using the exact same types we pass to these utilities now, e.g., ExternKernelCaller. * Rather than checking types explicitly, I introduced an is_extern() method to the Benchmarkable interface. Test Plan: Existing unit tests ghstack-source-id: 5e531c9 Pull Request resolved: #152652
Summary: I'll need some of the benchmark-related functions surfaced in a common utils file so I can use them for remote autotuning. This PR is almost a straight move of a few nested functions from inside AlgorithmSelectorCache, plus the datatypes they depend on, except: * All hell breaks loose with mypy on select_algorithm.py with this refactor, so I disabled it. Initial investigations looks like there are potentially a ton of type problems in this file, so I'll tackle fixing types in a follow-up diff. * Introduced a new interface "Benchmarkable" as the base type that gets benchmarked. This is looking forward to the remote autotuning implementation where the types that we'll send across the wire must be serializable. So we won't be using the exact same types we pass to these utilities now, e.g., ExternKernelCaller. * Rather than checking types explicitly, I introduced an is_extern() method to the Benchmarkable interface. Test Plan: Existing unit tests cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
masnesral
added a commit
that referenced
this pull request
May 7, 2025
Summary: I'll need some of the benchmark-related functions surfaced in a common utils file so I can use them for remote autotuning. This PR is almost a straight move of a few nested functions from inside AlgorithmSelectorCache, plus the datatypes they depend on, except: * All hell breaks loose with mypy on select_algorithm.py with this refactor, so I disabled it. Initial investigations looks like there are potentially a ton of type problems in this file, so I'll tackle fixing types in a follow-up diff. * Introduced a new interface "Benchmarkable" as the base type that gets benchmarked. This is looking forward to the remote autotuning implementation where the types that we'll send across the wire must be serializable. So we won't be using the exact same types we pass to these utilities now, e.g., ExternKernelCaller. * Rather than checking types explicitly, I introduced an is_extern() method to the Benchmarkable interface. Test Plan: Existing unit tests ghstack-source-id: 521ae07 Pull Request resolved: #152652
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
Summary: I'll need some of the benchmark-related functions surfaced in a common utils file so I can use them for remote autotuning. This PR is almost a straight move of a few nested functions from inside AlgorithmSelectorCache, plus the datatypes they depend on, except:
Test Plan: Existing unit tests
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov