From e55aa41e5e636717dc40f9eb02455e143c57afaf Mon Sep 17 00:00:00 2001 From: Xu Xing Date: Wed, 20 Dec 2023 20:18:50 +0800 Subject: [PATCH 1/2] [js/webgpu] Fix activation_params in FusedConv Bug: https://github.com/microsoft/onnxruntime/issues/18899 --- js/web/test/data/ops/fused-conv.jsonc | 68 +++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/js/web/test/data/ops/fused-conv.jsonc b/js/web/test/data/ops/fused-conv.jsonc index 812e9d7c2def0..c1aa5a0e7dc1b 100644 --- a/js/web/test/data/ops/fused-conv.jsonc +++ b/js/web/test/data/ops/fused-conv.jsonc @@ -108,5 +108,73 @@ ] } ] + }, + { + "name": "fused conv with clip", + "operator": "FusedConv", + "attributes": [ + { "name": "activation", "data": "Clip", "type": "string" }, + { "name": "kernel_shape", "data": [2, 2], "type": "ints" }, + { "name": "activation_params", "data": [0.0, 600.0], "type": "floats" } + ], + "opset": { "domain": "com.microsoft", "version": 1 }, + "cases": [ + { + "name": "T[0]", + "inputs": [ + { + "data": [10, 20, 30, 40, 50, 60, 70, 80, 90], + "dims": [1, 1, 3, 3], + "type": "float32" + }, + { + "data": [1, 2, 3, 4], + "dims": [1, 1, 2, 2], + "type": "float32" + } + ], + "outputs": [ + { + "data": [370, 470, 600, 600], + "dims": [1, 1, 2, 2], + "type": "float32" + } + ] + } + ] + }, + { + "name": "fused conv with clip", + "operator": "FusedConv", + "attributes": [ + { "name": "activation", "data": "Clip", "type": "string" }, + { "name": "kernel_shape", "data": [2, 2], "type": "ints" }, + { "name": "activation_params", "data": [400.0, 600.0], "type": "floats" } + ], + "opset": { "domain": "com.microsoft", "version": 1 }, + "cases": [ + { + "name": "T[0]", + "inputs": [ + { + "data": [10, 20, 30, 40, 50, 60, 70, 80, 90], + "dims": [1, 1, 3, 3], + "type": "float32" + }, + { + "data": [1, 2, 3, 4], + "dims": [1, 1, 2, 2], + "type": "float32" + } + ], + "outputs": [ + { + "data": [400, 470, 600, 600], + "dims": [1, 1, 2, 2], + "type": "float32" + } + ] + } + ] } ] From cba28753210b81b9568a4d56590b028d3c0726c0 Mon Sep 17 00:00:00 2001 From: Xu Xing Date: Mon, 22 Jan 2024 10:41:16 +0800 Subject: [PATCH 2/2] Remove a case --- js/web/test/data/ops/fused-conv.jsonc | 34 --------------------------- 1 file changed, 34 deletions(-) diff --git a/js/web/test/data/ops/fused-conv.jsonc b/js/web/test/data/ops/fused-conv.jsonc index c1aa5a0e7dc1b..ad1c0a72c11d3 100644 --- a/js/web/test/data/ops/fused-conv.jsonc +++ b/js/web/test/data/ops/fused-conv.jsonc @@ -109,40 +109,6 @@ } ] }, - { - "name": "fused conv with clip", - "operator": "FusedConv", - "attributes": [ - { "name": "activation", "data": "Clip", "type": "string" }, - { "name": "kernel_shape", "data": [2, 2], "type": "ints" }, - { "name": "activation_params", "data": [0.0, 600.0], "type": "floats" } - ], - "opset": { "domain": "com.microsoft", "version": 1 }, - "cases": [ - { - "name": "T[0]", - "inputs": [ - { - "data": [10, 20, 30, 40, 50, 60, 70, 80, 90], - "dims": [1, 1, 3, 3], - "type": "float32" - }, - { - "data": [1, 2, 3, 4], - "dims": [1, 1, 2, 2], - "type": "float32" - } - ], - "outputs": [ - { - "data": [370, 470, 600, 600], - "dims": [1, 1, 2, 2], - "type": "float32" - } - ] - } - ] - }, { "name": "fused conv with clip", "operator": "FusedConv",