-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Closed
Labels
enhancementNot as big of a feature, but technically not a bug. Should be easy to fixNot as big of a feature, but technically not a bug. Should be easy to fixmodule: reductionsneeds designWe want to add this feature but we need to figure out how firstWe want to add this feature but we need to figure out how firsttriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🚀 Feature
Provide a torch.minmax reduction operator that concurrently computes both the min and the max of the inputs.
Motivation
torch.min and torch.max often occur in pairs in pytorch code. It is desirable to have a concurrent min and max computation for efficiency.
Pitch
It is desirable to have a concurrent min and max computation for efficiency. This operator already exists internally as torch._aminmax and the proposal is to make this a public API
Alternatives
Build an FX optimizer (and/or a TorchScript JIT optimizer) that recognizes calls to torch.min and torch.max and replaces them with the optimized function.
Additional context
Computing min and max is often used together, e.g., in computing quantization parameters.
mruberry
Metadata
Metadata
Assignees
Labels
enhancementNot as big of a feature, but technically not a bug. Should be easy to fixNot as big of a feature, but technically not a bug. Should be easy to fixmodule: reductionsneeds designWe want to add this feature but we need to figure out how firstWe want to add this feature but we need to figure out how firsttriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module