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

[WebNN EP] Fix issues of GRU operator #22123

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

Conversation

miaobin
Copy link
Contributor

@miaobin miaobin commented Sep 18, 2024

Description

This PR fixes the spelling of the key value of the GRU operator in the map in the GetSupportedNodes function (Gru -> GRU) and removes the data type check for the fifth input (sequence_lens) of the GRU operator.

PTAL, thanks!

Copy link
Contributor

@Honry Honry left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

bool has_Y_h = output_defs.size() > 1 && output_defs[1]->Exists();

if (has_Y && !has_Y_h && GetType(*output_defs[0], Y_type, logger)) {
return IsDataTypeSupportedByOp(op_type, Y_type, wnn_limits, "outputs", "Y", logger);
Copy link
Contributor

Choose a reason for hiding this comment

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

It may return early if this returns True.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gru has two outputs (Y, Y_h). The if statement here enumerates all the cases. If the first if here returns True, this is expected. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, but this would introduce duplicates GetType for a single output.

How about just one by one check the outputs, and finally check if has both outputs, they should have same type.

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.

2 participants