onnxruntime/js/web/test/data/ops/gather.jsonc
Jiajie Hu 447a3a7c70
[js/webgpu] Fix Expand/Gather when input type is bool (#18999)
### Description
Also update the op test suite.

### Motivation and Context
Previously the *total* size in case `Expand - last dim is not divisible
by 4` was a multiple of 4, even though the *last dimension* was not, so
the bug has never been caught.
2024-01-05 08:16:15 -08:00

148 lines
2.9 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[4] indices[]",
"inputs": [
{
"data": [false, true, false, false],
"dims": [4],
"type": "bool"
},
{
"data": [1],
"dims": [],
"type": "int32"
}
],
"outputs": [
{
"data": [true],
"dims": [],
"type": "bool"
}
]
},
{
"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"
}
]
}
]
}
]