Skip to content
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

decomposition for torch.minimum, torch.maximum #1537

Open
t-vi opened this issue Dec 10, 2024 · 3 comments
Open

decomposition for torch.minimum, torch.maximum #1537

t-vi opened this issue Dec 10, 2024 · 3 comments
Labels
nvfuser operators program-coverage Requests for model and program coverage thunderfx for things that could be applicable to the dynamo+thunder frontend

Comments

@t-vi
Copy link
Collaborator

t-vi commented Dec 10, 2024

torch.maximum, torch.minimum can be decomposed using where (though we need to be careful about NaNs), we should do that...

cc @apaz-cli @tfogal

@t-vi t-vi added operators program-coverage Requests for model and program coverage labels Dec 10, 2024
@mruberry
Copy link
Collaborator

What's interesting about both torch.minimum and torch.maximum is that they are primitives in PyTorch, and similar operators are primitives in JAX.

While these operations can be expressed using other operations, it may be easier for executors to make the primitives fast than a decomposition of the operations.

@t-vi
Copy link
Collaborator Author

t-vi commented Dec 10, 2024

Works for me as long as NVFuser fuses them (I initially wanted to file that as an issue but then switched to the decomposition).

@mruberry
Copy link
Collaborator

I added the nvfuser label. Would you like to retitle the issue something "Add nvFuser support for torch.minimum and torch.maximum"?

@tfogal tfogal added the thunderfx for things that could be applicable to the dynamo+thunder frontend label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nvfuser operators program-coverage Requests for model and program coverage thunderfx for things that could be applicable to the dynamo+thunder frontend
Projects
None yet
Development

No branches or pull requests

3 participants