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

[WebGPU EP] Batch Norm Implementation #23525

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

Conversation

prathikr
Copy link
Contributor

Increases operator coverage for webgpu ep.

@prathikr prathikr added the ep:WebGPU ort-web webgpu provider label Jan 29, 2025
github-actions[bot]

This comment was marked as outdated.

spatial_ = info.GetAttrOrDefault<int64_t>("spatial", 1);
training_mode_ = info.GetAttrOrDefault<int64_t>("training_mode", 0);
// NCHW for ai.onnx domain, NHWC for com.ms.internal.nhwc domain
format_ = info.GetAttrOrDefault<std::string>("format", "NHWC");
Copy link
Contributor

@fs-eire fs-eire Jan 30, 2025

Choose a reason for hiding this comment

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

Does the attribute "format" actually exist?

I think they are introduced in JSEP as a property of the corresponding typescript attribute object, but they are not "real attribute" that you can read from the protobuf.

Also, using string enum is a good practice in TS/JS, but in C++ a numeric type is better choice. For example, the following is defined in onnxruntime namespace:

enum class DataLayout {
  NCHW,
  NHWC,
  NCHWC,
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:WebGPU ort-web webgpu provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants