-
Notifications
You must be signed in to change notification settings - Fork 85
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
update meta-function for where
to error on a single input aka where(mark)
#146
Comments
Hi @nikitaved! I'm Kaeun, one of the new contributors on Thunder (and I am loving it!). Would it be ok if I try to tackle this issue?
This also means I would have to accept Best, |
Hey @k223kim! Your proposal makes sense, but I suggest tweaking it a little. Let's keep the primitive for lightning-thunder/thunder/torch/__init__.py Line 1538 in 139cc22
It can check for The reason I'd prefer to just edit the torch definition of this operation is that I think the core language and primitive How does that sound? |
Hi @mruberry! I see what you mean! Your suggestion seems to align better with how PyTorch operates so let me do that instead. Some additional questions regarding this:
Appreciate your comments and feedback :) |
That's a pretty good error message. I think it's slightly more consistent with other not supported messages to say "torch.where() does not support only specifying a condition".
That'd be great. The PR could update this OpInfo lightning-thunder/thunder/tests/opinfos.py Line 2487 in 139cc22
to use |
🐛 Bug
As per #124 (comment),
the error message in our tests is not particularly friendly since Thunder is not aware of this single argument overload.
Also, since this op is data-dependent, we cannot implement it just yet.
Therefore, it would be great to detect such usages and throw an error with comprehensive explanations.
One should probably start with checking
_where_meta
.cc @apaz-cli
The text was updated successfully, but these errors were encountered: