-
Notifications
You must be signed in to change notification settings - Fork 493
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
Add impl for torchvision.nms and support multiple batch dim for convolution. #8291
Conversation
This is partial progress to support MaskRCNN.
@@ -109,6 +109,8 @@ def _aten_add(x, y, *, alpha=1): | |||
|
|||
assert x.dtype == y.dtype, (x.dtype, y.dtype) | |||
""" | |||
if isinstance(x, torch.Tensor) or isinstance(y, torch.Tensor): | |||
import pdb; pdb.set_trace() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to keep this here?
does these two line will block code running?
query, key, value, attn_mask=None, | ||
dropout_p=0.0, is_causal=False, scale=None) -> torch.Tensor: | ||
def _sdpa_reference(query, key, value, attn_mask=None, dropout_p=0.0, | ||
is_causal=False, scale=None, enable_gqa=False) -> torch.Tensor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, do we have short description for enable_gpa
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes: https://pytorch.org/docs/stable/generated/torch.nn.functional.scaled_dot_product_attention.html
this is newly added in torch 2.5
@@ -166,14 +166,20 @@ def tolist(self): | |||
def debug_accuracy(func, args, kwargs, current_output): | |||
args_torch, kwargs_torch, out_torch = torch_pytree.tree_map_only( | |||
torch.Tensor, lambda x: j2t(x._elem), (args, kwargs, current_output)) | |||
|
|||
if func == torch.ops.aten._native_batch_norm_legit_no_training: | |||
import pdb; pdb.set_trace() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, do we want to keep this code here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is partial progress to support MaskRCNN (#8116).
Fixes: #8278