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

Added Fusion G3 NN library with kernels related to add, mul, quantize… #6738

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ckmadhira
Copy link

…, dequantize, cat, layer norm, softmax to backends/cadence folder. Added operators to backends/cadence folder

Summary

[PLEASE REMOVE] See CONTRIBUTING.md's Pull Requests for ExecuTorch PR guidelines.

[PLEASE REMOVE] If this PR closes an issue, please add a Fixes #<issue-id> line.

[PLEASE REMOVE] If this PR introduces a fix or feature that should be the upcoming release notes, please add a "Release notes: " label. For a list of available release notes labels, check out CONTRIBUTING.md's Pull Requests.

Test plan

[PLEASE REMOVE] How did you test this PR? Please write down any manual commands you used and note down tests that you have written if applicable.

…, dequantize, cat, layer norm, softmax to backends/cadence folder. Added operators to backends/cadence folder
Copy link

pytorch-bot bot commented Nov 8, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/6738

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Contributor

Hi @ckmadhira!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@ckmadhira
Copy link
Author

Fusion G3 NN library is added with kernels related to add, mul, quantize, dequantize, cat, layernorm and softmax. Operators which use these kernels are also added to backends/cadence folder

Copy link
Contributor

@zonglinpeng zonglinpeng left a comment

Choose a reason for hiding this comment

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

Thanks for the change! Had one comment on the op namespace


namespace impl {
namespace FusionG3 {
namespace native {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can the name spaces of all the G3 ops build as

namespace cadence {
namespace impl {
namespace G3 {
namespace native {

To align with other ops? HiFi example: https://github.com/pytorch/executorch/blob/main/backends/cadence/hifi/operators/op_add.cpp#L25

Copy link
Author

Choose a reason for hiding this comment

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

Updated as per review comment

- op: _softmax.out
kernels:
- arg_meta: null
kernel_name: impl::FusionG3::softmax_out
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment on the namespace

Copy link
Contributor

Choose a reason for hiding this comment

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

Per @hsharma35 's comment above, please use cadence::impl::G3::native::<OP_NAME> namespace

Copy link
Author

Choose a reason for hiding this comment

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

Updated the operator name as cadence::impl::G3::<OP_NAME>. native is not explicitly mentioned. As per kernel-library-custom-aten-kernel.md, native is automatically appended to the operators.

@@ -0,0 +1,119 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please change the kernel_name here to match cadence::impl::G3::native::OP_NAME. For example: cadence::impl::G3::native::add_out

Copy link
Author

Choose a reason for hiding this comment

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

Updated the operator name as cadence::impl::G3::add_out. native is not explicitly mentioned.

@hsharma35
Copy link
Contributor

Nit: Can we rename the folder FuG3 to FusionG3 instead?

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 11, 2024
@facebook-github-bot
Copy link
Contributor

@zonglinpeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Signed-off-by: cmadhira@cadence.com <mckala@invecas.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants