onnxruntime/js/web/test/data/ops/reshape-int32.jsonc
Yulong Wang d13f3153d7
[js/webgpu] enable op test for webgpu (#16542)
### Description
This change enables the JSON-format operator tests for webgpu.

Usage:

```
npm test -- op abs.jsonc -b=webgpu
```
2023-07-06 08:35:19 -07:00

97 lines
1.8 KiB
Text

[
{
"name": "Reshape with '0' and '-1' in the shape tensor input",
"operator": "Reshape",
"attributes": [],
"cases": [
{
"name": "T[0]",
"inputs": [
{
"data": [1, 1, 1, 1],
"dims": [2, 2],
"type": "float32"
},
{
"data": [-1, 0],
"dims": [2],
"type": "int32"
}
],
"outputs": [
{
"data": [1, 1, 1, 1],
"dims": [2, 2],
"type": "float32"
}
]
},
{
"name": "Scalar to 1D",
"inputs": [
{
"data": [1],
"dims": [],
"type": "float32"
},
{
"data": [1],
"dims": [1],
"type": "int32"
}
],
"outputs": [
{
"data": [1],
"dims": [1],
"type": "float32"
}
]
},
{
"name": "Scalar to 2D",
"inputs": [
{
"data": [1],
"dims": [],
"type": "float32"
},
{
"data": [1, 1],
"dims": [2],
"type": "int32"
}
],
"outputs": [
{
"data": [1],
"dims": [1, 1],
"type": "float32"
}
]
},
{
"name": "Scalar to 2D with -1 in shape hints",
"inputs": [
{
"data": [1],
"dims": [],
"type": "float32"
},
{
"data": [-1, 1],
"dims": [2],
"type": "int32"
}
],
"outputs": [
{
"data": [1],
"dims": [1, 1],
"type": "float32"
}
]
}
]
}
]