onnxruntime/js/web/test/data/ops/gather.jsonc
Jiajia Qin 6781b6cf3d
[js/webgpu] add bool type for Expand/Gather (#18615)
### Description
In [detr-resnet-50](https://huggingface.co/Xenova/detr-resnet-50) model,
it uses expand with bool type running on cpu ep.




| Kernel    | Shape | Provider |
| -------- | ------- | ------- |
| Expand | "input_type_shape" :
[{"bool":[1,1,1,625]},{"int64":[4]}],"activation_size" :
"657","output_type_shape" : [{"bool":[1,1,625,625]}] |
CPUExecutionProvider |

After this change, it will run on jsep.
| Kernel    | Shape | Provider |
| -------- | ------- | ------- |
| Expand | "input_type_shape" :
[{"bool":[1,1,1,625]},{"int64":[4]}],"activation_size" :
"657","output_type_shape" : [{"bool":[1,1,625,625]}] |
JsExecutionProvider |
2023-11-30 15:47:08 -08:00

126 lines
2.4 KiB
Text

[
{
"name": "Gather",
"operator": "Gather",
"attributes": [],
"cases": [
{
"name": "data[4] indices[]",
"inputs": [
{
"data": [1, 2, 3, 4],
"dims": [4],
"type": "float32"
},
{
"data": [1],
"dims": [],
"type": "int32"
}
],
"outputs": [
{
"data": [2],
"dims": [],
"type": "float32"
}
]
},
{
"name": "data[4] indices[1]",
"inputs": [
{
"data": [1, 2, 3, 4],
"dims": [4],
"type": "float32"
},
{
"data": [1],
"dims": [1],
"type": "int32"
}
],
"outputs": [
{
"data": [2],
"dims": [1],
"type": "float32"
}
]
},
{
"name": "data[2,4] indices[]",
"inputs": [
{
"data": [1, 2, 3, 4, 5, 6, 7, 8],
"dims": [2, 4],
"type": "float32"
},
{
"data": [1],
"dims": [],
"type": "int32"
}
],
"outputs": [
{
"data": [5, 6, 7, 8],
"dims": [4],
"type": "float32"
}
]
},
{
"name": "data[2,4] indices[1]",
"inputs": [
{
"data": [1, 2, 3, 4, 5, 6, 7, 8],
"dims": [2, 4],
"type": "float32"
},
{
"data": [1],
"dims": [1],
"type": "int32"
}
],
"outputs": [
{
"data": [5, 6, 7, 8],
"dims": [1, 4],
"type": "float32"
}
]
}
]
},
{
"name": "Gather - bool",
"operator": "Gather",
"attributes": [],
"cases": [
{
"name": "data[2,4] indices[1]",
"inputs": [
{
"data": [true, false, false, true, false, false, true, true],
"dims": [2, 4],
"type": "bool"
},
{
"data": [1],
"dims": [1],
"type": "int32"
}
],
"outputs": [
{
"data": [false, false, true, true],
"dims": [1, 4],
"type": "bool"
}
]
}
]
}
]