Skip to content

Conversation

Copy link

pytorch-bot bot commented Nov 8, 2023

🔗 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 Failures

As of commit 685523f with merge base ee777a7 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@int3 int3 changed the title [inductor] Make codecache.py pass follow-import typechecking [inductor] Make codecache.py pass follow-imports typechecking Nov 8, 2023
…ing"

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
@int3 int3 requested review from Skylion007 and eellison November 9, 2023 00:50
@int3 int3 added the topic: not user facing topic category label Nov 9, 2023

def triton(
self, kernel_name: str, source_code: str, device: str = "cuda"
self, kernel_name: str, source_code: str, device_str: str = "cuda"
Copy link
Collaborator

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?

Copy link
Collaborator

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.

Copy link
Contributor Author

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.

@int3 int3 requested a review from Skylion007 November 9, 2023 19:04
pytorchmergebot pushed a commit that referenced this pull request Nov 9, 2023
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
@facebook-github-bot facebook-github-bot deleted the gh/int3/72/head branch November 13, 2023 15:25
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants