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

Add impl for torchvision.nms and support multiple batch dim for convolution. #8291

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

qihqi
Copy link
Collaborator

@qihqi qihqi commented Oct 19, 2024

This is partial progress to support MaskRCNN (#8116).

Fixes: #8278

This is partial progress to support MaskRCNN.
@qihqi qihqi requested review from lsy323 and ManfeiBai October 19, 2024 01:12
@@ -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()
Copy link
Collaborator

@ManfeiBai ManfeiBai Oct 21, 2024

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:
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -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()
Copy link
Collaborator

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?

Copy link
Collaborator

@ManfeiBai ManfeiBai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qihqi qihqi merged commit 39dc4bc into master Oct 22, 2024
3 checks passed
@qihqi qihqi deleted the hanq_model_support branch October 22, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement torchvision.ops.nms in torch_xla2.
2 participants