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

[Relax] [PyTorch] Add support for torch.nn.Hardswish #17084

Merged
merged 3 commits into from
Jun 12, 2024

Conversation

mshr-h
Copy link
Contributor

@mshr-h mshr-h commented Jun 12, 2024

#17068

This is only for the fx frontend. But ONNX has the same HardSwish operator. I am thinking to add something like relax.nn.hardswish operator and call it from fx/onnx frontend after this PR is merged.

cc @yongwww @tqchen

@mshr-h mshr-h marked this pull request as ready for review June 12, 2024 13:24
@github-actions github-actions bot requested review from tqchen and yongwww June 12, 2024 14:15
Copy link
Member

@yongwww yongwww left a comment

Choose a reason for hiding this comment

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

LGTM

@yongwww
Copy link
Member

yongwww commented Jun 12, 2024

I am not sure if we need to introduce a new operator Hardswish to relax, looks we can compose it with several existing ops like add, and those ops are able to be fused by FuseOps pass, that means we won't lose perf even we compose it with several existing ops.

cc: @tqchen @vinx13 @MasterJH5574

@vinx13 vinx13 merged commit cc7eb2f into apache:main Jun 12, 2024
23 of 24 checks passed
@mshr-h mshr-h deleted the relax-fx-hardswish branch June 13, 2024 02:29
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.

None yet

3 participants