Skip to content

Conversation

@zou3519
Copy link
Contributor

@zou3519 zou3519 commented Dec 2, 2024

Test Plan:
- lintrunner

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Dec 2, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/141894

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit b22b108 with merge base 9012e7a (image):
💚 Looks good so far! There are no failures yet. 💚

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

Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok!

Test Plan:
- lintrunner

[ghstack-poisoned]
device_types: device_types_t = None,
schema: Optional[str] = None,
) -> Callable:
) -> Any:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this valuable typing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not correct

from typing import Callable, TypeVar


F = TypeVar("F")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
F = TypeVar("F")
_F = TypeVar("_F")

No reason for the TypeVar to be public

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't public (the path is torch.utils._exposed_in) so F isn't public

pytorchmergebot pushed a commit that referenced this pull request Dec 3, 2024
We've been using it privately for half a year and everything's been
good. This PR:
1. Makes torch.library.triton_op public
2. Renames capture_triton -> wrap_triton. We got feedback that no one
   knew what "capture triton" does.
3. Makes torch.library.wrap_triton public.

triton_op is used to construct a Python custom operator that may call 1+
triton kernels. Each of those triton kernels must be annotated with
wrap_triton.

Test Plan:
- existing tests

Pull Request resolved: #141880
Approved by: https://github.com/albanD
ghstack dependencies: #141894
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
We've been using it privately for half a year and everything's been
good. This PR:
1. Makes torch.library.triton_op public
2. Renames capture_triton -> wrap_triton. We got feedback that no one
   knew what "capture triton" does.
3. Makes torch.library.wrap_triton public.

triton_op is used to construct a Python custom operator that may call 1+
triton kernels. Each of those triton kernels must be annotated with
wrap_triton.

Test Plan:
- existing tests

Pull Request resolved: pytorch#141880
Approved by: https://github.com/albanD
ghstack dependencies: pytorch#141894
zou3519 added a commit that referenced this pull request Dec 5, 2024
Summary:
#141894 made this API actually
typed w.r.t. pyre, which is causing some internal type failures. This PR
expands the typing for stack_module_state to squash those failures.

Test Plan:
- pyre

[ghstack-poisoned]
zou3519 added a commit that referenced this pull request Dec 5, 2024
Summary:
#141894 made this API actually
typed w.r.t. pyre, which is causing some internal type failures. This PR
expands the typing for stack_module_state to squash those failures.

Test Plan:
- pyre

ghstack-source-id: b392e29
Pull Request resolved: #142169
pytorchmergebot pushed a commit that referenced this pull request Dec 6, 2024
Summary:
#141894 made this API actually
typed w.r.t. pyre, which is causing some internal type failures. This PR
expands the typing for stack_module_state to squash those failures.

Test Plan:
- pyre
Pull Request resolved: #142169
Approved by: https://github.com/albanD
AmdSampsa pushed a commit to AmdSampsa/pytorch that referenced this pull request Dec 9, 2024
AmdSampsa pushed a commit to AmdSampsa/pytorch that referenced this pull request Dec 9, 2024
We've been using it privately for half a year and everything's been
good. This PR:
1. Makes torch.library.triton_op public
2. Renames capture_triton -> wrap_triton. We got feedback that no one
   knew what "capture triton" does.
3. Makes torch.library.wrap_triton public.

triton_op is used to construct a Python custom operator that may call 1+
triton kernels. Each of those triton kernels must be annotated with
wrap_triton.

Test Plan:
- existing tests

Pull Request resolved: pytorch#141880
Approved by: https://github.com/albanD
ghstack dependencies: pytorch#141894
pytorch-bot bot pushed a commit that referenced this pull request Dec 9, 2024
Summary:
#141894 made this API actually
typed w.r.t. pyre, which is causing some internal type failures. This PR
expands the typing for stack_module_state to squash those failures.

Test Plan:
- pyre
Pull Request resolved: #142169
Approved by: https://github.com/albanD
@github-actions github-actions bot deleted the gh/zou3519/1098/head branch January 3, 2025 02:06
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.

5 participants