-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[inductor] Make codecache.py pass follow-imports typechecking #113306
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
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/113306
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 685523f with merge base ee777a7 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…ing" cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler [ghstack-poisoned]
|
||
def triton( | ||
self, kernel_name: str, source_code: str, device: str = "cuda" | ||
self, kernel_name: str, source_code: str, device_str: str = "cuda" |
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.
Could this be a union of str and torch.device with the current API? Then the kwarg wouldn't need to change, right?
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.
This is just a nit though, feel free to ignore if it ends up being too complicated.
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.
Could this be a union of str and torch.device with the current API? Then the kwarg wouldn't need to change, right?
Yeah I guess it could, but it would require changing quite a few other type hints, e.g. get_interface_for_device
and torch.device()
, and the functions they call. Not super complicated, but it also seems like stricter type hints aren't necessarily a bad thing... makes the codebase easier to reason about IMO. It also doesn't look like triton()
is ever being called with an instance of torch.device
, so this fits the current usage.
pydot accepts both a str and a list of str for its `prog` parameter. Pull Request resolved: #113307 Approved by: https://github.com/Skylion007 ghstack dependencies: #113304, #113305, #113306
…h#113306) Pull Request resolved: pytorch#113306 Approved by: https://github.com/Skylion007 ghstack dependencies: pytorch#113304, pytorch#113305
…3307) pydot accepts both a str and a list of str for its `prog` parameter. Pull Request resolved: pytorch#113307 Approved by: https://github.com/Skylion007 ghstack dependencies: pytorch#113304, pytorch#113305, pytorch#113306
Stack from ghstack (oldest at bottom):
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler