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 a few decompositions for aten ops seen in huggingface models. #102

Merged
merged 2 commits into from
Oct 20, 2023

Conversation

monorimet
Copy link
Contributor

No description provided.

@dan-garvey
Copy link
Member

Wait this whole time we could have just decomposed lift_fresh_copy? 😭

Copy link
Member

@dan-garvey dan-garvey left a comment

Choose a reason for hiding this comment

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

Can't see why it would hurt anything

@dan-garvey dan-garvey merged commit fe096ae into main Oct 20, 2023
@dan-garvey dan-garvey deleted the ean-aten-decomp branch October 20, 2023 16:47
@@ -43,6 +45,7 @@
torch.ops.aten.nll_loss_backward,
torch.ops.aten._to_copy,
torch.ops.aten._log_softmax_backward_data,
torch.ops.aten.lift_fresh_copy.default,
Copy link
Contributor

@brucekimrokcmu brucekimrokcmu Oct 23, 2023

Choose a reason for hiding this comment

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

Hey Ean,
I don't remember lift_fresh_copy decomposition registered from torch/_decomp.
(There's a lowering of it in inductor)
There's lift_fresh decomposition here: https://github.com/pytorch/pytorch/blob/main/torch/_decomp/decompositions.py#L1890

Currently, lift_fresh_copy is handled at here: https://github.com/nod-ai/SHARK-Turbine/blob/main/python/shark_turbine/dynamo/importer.py#L597-L602
by swapping the op to aten.clone.

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.

3 participants