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

UserWarning: There is a performance drop because we have not yet implemented the batching rule for aten::greater_equal.Scalar #1080

Closed
carbocation opened this issue Nov 30, 2022 · 3 comments
Labels
actionable It is clear what should be done for this issue high priority These issues are at the top of mind for us. small

Comments

@carbocation
Copy link

carbocation commented Nov 30, 2022

🚀 The feature, motivation and pitch

In pytorch 1.14.0.dev20221128 when using vmap with greater_equal, I get the following warning:

UserWarning: There is a performance drop because we have not yet implemented the batching rule for aten::greater_equal.Scalar. Please file us an issue on GitHub so that we can prioritize its implementation. (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/aten/src/ATen/functorch/BatchedFallback.cpp:84.)
idx = torch.argmax(torch.greater_equal(torch.cumsum(input, dim=0), quantile).to(torch.int))

Alternatives

The alternative is to experience a performance drop. (The computation does complete correctly.)

Additional context

No response

cc @zou3519 @Chillee @samdow @soumith

@jiayisunx
Copy link

@carbocation , could you please provide a example to reproduce this issue?

@zou3519 zou3519 transferred this issue from pytorch/pytorch Dec 9, 2022
@zou3519 zou3519 added actionable It is clear what should be done for this issue small labels Dec 9, 2022
@zou3519
Copy link
Contributor

zou3519 commented Dec 9, 2022

Thanks for the issue, we'll prioritize it.

@zou3519 zou3519 added the high priority These issues are at the top of mind for us. label Dec 12, 2022
pytorchmergebot pushed a commit to pytorch/pytorch that referenced this issue Jan 5, 2023
Fixes pytorch/functorch#1080

```py
import torch
from functorch import vmap

def f(x):
    return torch.greater_equal(torch.cumsum(x, dim=0), .5 * 10)

x = torch.randn([10,10])
vmap(f)(x)
```

Pull Request resolved: #91324
Approved by: https://github.com/zou3519
@kshitij12345
Copy link
Contributor

Fixed in pytorch/pytorch#91324

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actionable It is clear what should be done for this issue high priority These issues are at the top of mind for us. small
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants