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 2 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!

@@ -219,6 +221,33 @@ bool GruOpBuilder::HasSupportedInputsImpl(const Node& node, const emscripten::va
return IsDataTypeSupportedByOp(op_type, input0_type, wnn_limits, "input", "X", logger);
}

bool LstmOpBuilder::HasSupportedOutputsImpl(const Node& node,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
bool LstmOpBuilder::HasSupportedOutputsImpl(const Node& node,
bool GruOpBuilder::HasSupportedOutputsImpl(const Node& node,

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.

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