onnxruntime/js/web/test/data/ops/gather-elements.jsonc
Hariharan Seshadri cbd97515cd
[JS/WebGPU] Support GatherElements kernel (#17243)
### Description
As title


### Motivation and Context
Improve WebGPU kernel coverage
2023-08-28 09:55:25 -07:00

234 lines
5.3 KiB
Text

[
{
"name": "GatherElements float32 data + int32 indices-1",
"operator": "GatherElements",
"attributes": [{ "name": "axis", "data": 1, "type": "int" }],
"cases": [
{
"name": "float32 data + int32 indices-1",
"inputs": [
{
"data": [1, 2, 3, 4],
"dims": [2, 2],
"type": "float32"
},
{
"data": [0, 0, 1, 0],
"dims": [2, 2],
"type": "int32"
}
],
"outputs": [
{
"data": [1, 1, 4, 3],
"dims": [2, 2],
"type": "float32"
}
]
}
]
},
{
"name": "GatherElements float32 data + int32 indices-2",
"operator": "GatherElements",
"attributes": [{ "name": "axis", "data": 1, "type": "int" }],
"cases": [
{
"name": "float32 data + int32 indices-2",
"inputs": [
{
"data": [1, 2, 3, 4],
"dims": [2, 2],
"type": "float32"
},
{
"data": [0, 1, 1, 0],
"dims": [2, 2],
"type": "int32"
}
],
"outputs": [
{
"data": [1, 2, 4, 3],
"dims": [2, 2],
"type": "float32"
}
]
}
]
},
{
"name": "GatherElements float32 data + int64 indices - 1",
"operator": "GatherElements",
"attributes": [{ "name": "axis", "data": 1, "type": "int" }],
"cases": [
{
"name": "float32 data + int64 indices - 1",
"inputs": [
{
"data": [1, 2, 3, 4],
"dims": [2, 2],
"type": "float32"
},
{
"data": [0, 0, -1, 0],
"dims": [2, 2],
"type": "int64"
}
],
"outputs": [
{
"data": [1, 1, 4, 3],
"dims": [2, 2],
"type": "float32"
}
]
}
]
},
{
"name": "GatherElements float32 data + int64 indices - 2",
"operator": "GatherElements",
"attributes": [{ "name": "axis", "data": 1, "type": "int" }],
"cases": [
{
"name": "float32 data + int64 indices - 2",
"inputs": [
{
"data": [1, 2, 3, 4],
"dims": [2, 2],
"type": "float32"
},
{
"data": [0, 0, -2, 0],
"dims": [2, 2],
"type": "int64"
}
],
"outputs": [
{
"data": [1, 1, 3, 3],
"dims": [2, 2],
"type": "float32"
}
]
}
]
},
{
"name": "GatherElements int32 data + int32 indices-1",
"operator": "GatherElements",
"attributes": [{ "name": "axis", "data": 1, "type": "int" }],
"cases": [
{
"name": "int32 data + int32 indices-1",
"inputs": [
{
"data": [1, 2, 3, 4],
"dims": [2, 2],
"type": "int32"
},
{
"data": [0, 0, 1, 0],
"dims": [2, 2],
"type": "int32"
}
],
"outputs": [
{
"data": [1, 1, 4, 3],
"dims": [2, 2],
"type": "int32"
}
]
}
]
},
{
"name": "GatherElements uint32 data + int32 indices-1",
"operator": "GatherElements",
"attributes": [{ "name": "axis", "data": 1, "type": "int" }],
"cases": [
{
"name": "uint32 data + int32 indices-1",
"inputs": [
{
"data": [1, 2, 3, 4],
"dims": [2, 2],
"type": "uint32"
},
{
"data": [0, 0, 1, 0],
"dims": [2, 2],
"type": "int32"
}
],
"outputs": [
{
"data": [1, 1, 4, 3],
"dims": [2, 2],
"type": "uint32"
}
]
}
]
},
{
"name": "GatherElements float32 data + int32 indices-1 + Negative axis + Negative indices",
"operator": "GatherElements",
"attributes": [{ "name": "axis", "data": -1, "type": "int" }],
"cases": [
{
"name": "GatherElements float32 data + int32 indices-1 + Negative axis + Negative indices",
"inputs": [
{
"data": [1, 2, 3, 4],
"dims": [2, 2],
"type": "float32"
},
{
"data": [0, 0, -1, 0],
"dims": [2, 2],
"type": "int32"
}
],
"outputs": [
{
"data": [1, 1, 4, 3],
"dims": [2, 2],
"type": "float32"
}
]
}
]
},
{
"name": "GatherElements float32 data + int32 indices-3",
"operator": "GatherElements",
"attributes": [{ "name": "axis", "data": 0, "type": "int" }],
"cases": [
{
"name": "GatherElements float32 data + int32 indices-3",
"inputs": [
{
"data": [1, 2, 3, 4, 5, 6, 7, 8, 9],
"dims": [3, 3],
"type": "float32"
},
{
"data": [1, 2, 0, 2, 0, 0],
"dims": [2, 3],
"type": "int32"
}
],
"outputs": [
{
"data": [4, 8, 3, 7, 2, 3],
"dims": [2, 3],
"type": "float32"
}
]
}
]
}
]