2023-08-16 18:24:26 +00:00
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
"name": "Expand 1 - float32",
|
|
|
|
|
"operator": "Expand",
|
|
|
|
|
"attributes": [],
|
|
|
|
|
"cases": [
|
|
|
|
|
{
|
|
|
|
|
"name": "Expand 1 - float32",
|
|
|
|
|
"inputs": [
|
|
|
|
|
{
|
|
|
|
|
"data": [1],
|
|
|
|
|
"dims": [1, 1],
|
|
|
|
|
"type": "float32"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"data": [1, 4],
|
|
|
|
|
"dims": [2],
|
|
|
|
|
"type": "int64"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"data": [1, 1, 1, 1],
|
|
|
|
|
"dims": [1, 4],
|
|
|
|
|
"type": "float32"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "Expand 2 - float32",
|
|
|
|
|
"operator": "Expand",
|
|
|
|
|
"attributes": [],
|
|
|
|
|
"cases": [
|
|
|
|
|
{
|
|
|
|
|
"name": "Expand 2 - float32",
|
|
|
|
|
"inputs": [
|
|
|
|
|
{
|
|
|
|
|
"data": [1],
|
|
|
|
|
"dims": [1, 1],
|
|
|
|
|
"type": "float32"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"data": [1, 6],
|
|
|
|
|
"dims": [2],
|
|
|
|
|
"type": "int64"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"data": [1, 1, 1, 1, 1, 1],
|
|
|
|
|
"dims": [1, 6],
|
|
|
|
|
"type": "float32"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "Expand 1D - float32",
|
|
|
|
|
"operator": "Expand",
|
|
|
|
|
"attributes": [],
|
|
|
|
|
"cases": [
|
|
|
|
|
{
|
|
|
|
|
"name": "Expand 1D - float32",
|
|
|
|
|
"inputs": [
|
|
|
|
|
{
|
|
|
|
|
"data": [1],
|
|
|
|
|
"dims": [1],
|
|
|
|
|
"type": "float32"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"data": [4],
|
|
|
|
|
"dims": [1],
|
|
|
|
|
"type": "int64"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"data": [1, 1, 1, 1],
|
|
|
|
|
"dims": [4],
|
|
|
|
|
"type": "float32"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
2023-11-22 22:14:24 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "Expand 5D - float32",
|
|
|
|
|
"operator": "Expand",
|
|
|
|
|
"attributes": [],
|
|
|
|
|
"cases": [
|
|
|
|
|
{
|
|
|
|
|
"name": "Expand 5 - float32",
|
|
|
|
|
"inputs": [
|
|
|
|
|
{
|
|
|
|
|
"data": [1],
|
|
|
|
|
"dims": [1, 1, 1, 1, 1],
|
|
|
|
|
"type": "float32"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"data": [1, 1, 1, 1, 6],
|
|
|
|
|
"dims": [5],
|
|
|
|
|
"type": "int64"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"data": [1, 1, 1, 1, 1, 1],
|
|
|
|
|
"dims": [1, 1, 1, 1, 6],
|
|
|
|
|
"type": "float32"
|
|
|
|
|
}
|
|
|
|
|
]
|
[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 23:47:08 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "Expand 5 - shape < input.size()",
|
|
|
|
|
"inputs": [
|
|
|
|
|
{
|
|
|
|
|
"data": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
|
|
|
"dims": [1, 1, 1, 2, 6],
|
|
|
|
|
"type": "float32"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"data": [2, 1, 6],
|
|
|
|
|
"dims": [3],
|
|
|
|
|
"type": "int64"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"data": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
|
|
|
"dims": [1, 1, 2, 2, 6],
|
|
|
|
|
"type": "float32"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "Expand - bool",
|
|
|
|
|
"operator": "Expand",
|
|
|
|
|
"attributes": [],
|
|
|
|
|
"cases": [
|
|
|
|
|
{
|
|
|
|
|
"name": "Expand - last dim is divisible by 4",
|
|
|
|
|
"inputs": [
|
|
|
|
|
{
|
|
|
|
|
"data": [true, false, false, true],
|
|
|
|
|
"dims": [4],
|
|
|
|
|
"type": "bool"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"data": [2, 4],
|
|
|
|
|
"dims": [2],
|
|
|
|
|
"type": "int64"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"data": [true, false, false, true, true, false, false, true],
|
|
|
|
|
"dims": [2, 4],
|
|
|
|
|
"type": "bool"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "Expand - last dim is not divisible by 4",
|
|
|
|
|
"inputs": [
|
|
|
|
|
{
|
2024-01-05 16:16:15 +00:00
|
|
|
"data": [true, false, false, true, true, true],
|
|
|
|
|
"dims": [1, 6],
|
[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 23:47:08 +00:00
|
|
|
"type": "bool"
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-01-05 16:16:15 +00:00
|
|
|
"data": [3, 1],
|
[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 23:47:08 +00:00
|
|
|
"dims": [2],
|
|
|
|
|
"type": "int64"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
2024-01-05 16:16:15 +00:00
|
|
|
"data": [
|
|
|
|
|
true,
|
|
|
|
|
false,
|
|
|
|
|
false,
|
|
|
|
|
true,
|
|
|
|
|
true,
|
|
|
|
|
true,
|
|
|
|
|
true,
|
|
|
|
|
false,
|
|
|
|
|
false,
|
|
|
|
|
true,
|
|
|
|
|
true,
|
|
|
|
|
true,
|
|
|
|
|
true,
|
|
|
|
|
false,
|
|
|
|
|
false,
|
|
|
|
|
true,
|
|
|
|
|
true,
|
|
|
|
|
true
|
|
|
|
|
],
|
|
|
|
|
"dims": [3, 6],
|
[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 23:47:08 +00:00
|
|
|
"type": "bool"
|
|
|
|
|
}
|
|
|
|
|
]
|
2023-11-22 22:14:24 +00:00
|
|
|
}
|
|
|
|
|
]
|
2023-08-16 18:24:26 +00:00
|
|
|
}
|
|
|
|
|
]
|