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

[js/webgpu]FusedConv #17503

Closed
wants to merge 6 commits into from
Closed

[js/webgpu]FusedConv #17503

wants to merge 6 commits into from

Conversation

jchen351
Copy link
Contributor

Description

Motivation and Context

@satyajandhyala satyajandhyala added the ep:WebGPU ort-web webgpu provider label Sep 12, 2023
@jchen351 jchen351 marked this pull request as ready for review September 15, 2023 18:39
@@ -500,6 +502,8 @@ std::unique_ptr<KernelRegistry> RegisterKernels() {
BuildKernelCreateInfo<ONNX_OPERATOR_TYPED_KERNEL_CLASS_NAME(kJsExecutionProvider, kMSInternalNHWCDomain, 1, float, GlobalAveragePool)>,
BuildKernelCreateInfo<ONNX_OPERATOR_TYPED_KERNEL_CLASS_NAME(kJsExecutionProvider, kMSInternalNHWCDomain, 1, float, GlobalMaxPool)>,

BuildKernelCreateInfo<ONNX_CPU_OPERATOR_TYPED_MS_KERNEL(kJsExecutionProvider, kMSDomain, 1, float, FusedConv)>,
Copy link
Contributor

@satyajandhyala satyajandhyala Sep 29, 2023

Choose a reason for hiding this comment

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

Specifying the domain, kMSDomain, is not required when using ONNX_CPU_OPERATOR_TYPED_MS_KERNEL macro. Only name, version, type, builder, etc. are required. Is it a CPU operator?
I think you want to use the class name declared in line number 243.

{
"name": "conv without bias addition A",
"operator": "Conv",
"attributes": [{ "name": "kernel_shape", "data": [2, 2], "type": "ints" }],
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you planning to add activation attribute to this test case also?

class FusedConv : public Conv<T, is_channels_last> {
public:
explicit FusedConv(const OpKernelInfo& info) : Conv<T, is_channels_last>(info) {
ORT_ENFORCE(info.GetAttr<std::string>("activation", &(this->conv_attrs_.activation)).IsOK());
Copy link
Contributor

@satyajandhyala satyajandhyala Sep 29, 2023

Choose a reason for hiding this comment

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

Setting this attribute here will not pass the value to JSEP kernel because JSEP kernel is already created in the base class constructor.

@jchen351 jchen351 closed this Oct 13, 2023
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