onnxruntime/js/web/test/data/ops/where.jsonc
Xu Xing 992f3e4609
[js/webgpu] Support where (#17544)
Supported type: float. int32_t, uint32_t, bool.
Case where_broadcast.jsonc is not enabled due to
https://github.com/microsoft/onnxruntime/issues/17405.

### Description
<!-- Describe your changes. -->



### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

---------

Co-authored-by: Yulong Wang <7679871+fs-eire@users.noreply.github.com>
2023-10-03 14:28:21 -07:00

172 lines
3.9 KiB
Text

[
{
"name": "Where with no attributes",
"operator": "Where",
"attributes": [],
"cases": [
{
"name": "T[3] T[3] T[3] float32 T[3] ",
"inputs": [
{
"data": [true, false, true, false, true, false, true, false],
"dims": [8],
"type": "bool"
},
{
"data": [4.0, 8.0, 7.0, 2.0, 4.0, 8.0, 7.0, 1.0],
"dims": [8],
"type": "float32"
},
{
"data": [1.0, 3.0, 9.0, 6.0, 1.0, 3.0, 9.0, 2.0],
"dims": [8],
"type": "float32"
}
],
"outputs": [
{
"data": [4.0, 3.0, 7.0, 6.0, 4.0, 3.0, 7.0, 2.0],
"dims": [8],
"type": "float32"
}
]
}
]
},
{
"name": "Where with no attributes",
"operator": "Where",
"attributes": [],
"cases": [
{
"name": "T[3] T[3] T[3] int32 T[3] ",
"inputs": [
{
"data": [true, false, true, false, true, false, true, false],
"dims": [8],
"type": "bool"
},
{
"data": [4, 8, 7, 2, 4, 8, 7, 1],
"dims": [8],
"type": "int32"
},
{
"data": [1, 3, 9, 6, 1, 3, 9, 2],
"dims": [8],
"type": "int32"
}
],
"outputs": [
{
"data": [4, 3, 7, 6, 4, 3, 7, 2],
"dims": [8],
"type": "int32"
}
]
}
]
},
{
"name": "Where with no attributes",
"operator": "Where",
"attributes": [],
"cases": [
{
"name": "T[3] T[3] T[3] uint32 T[3] ",
"inputs": [
{
"data": [true, false, true, false, true, false, true, false],
"dims": [8],
"type": "bool"
},
{
"data": [4, 8, 7, 2, 4, 8, 7, 1],
"dims": [8],
"type": "uint32"
},
{
"data": [1, 4294967295, 9, 6, 1, 3, 9, 2],
"dims": [8],
"type": "uint32"
}
],
"outputs": [
{
"data": [4, 4294967295, 7, 6, 4, 3, 7, 2],
"dims": [8],
"type": "uint32"
}
]
}
]
},
{
"name": "Where with no attributes",
"operator": "Where",
"attributes": [],
"cases": [
{
"name": "T[3] T[3] T[3] bool T[3] ",
"inputs": [
{
"data": [true, false, true, false, true, false, true, false],
"dims": [8],
"type": "bool"
},
{
"data": [true, true, true, true, true, true, true, true],
"dims": [8],
"type": "float32"
},
{
"data": [true, false, true, false, true, false, true, false],
"dims": [8],
"type": "float32"
}
],
"outputs": [
{
"data": [true, false, true, false, true, false, true, false],
"dims": [8],
"type": "float32"
}
]
}
]
},
{
"name": "Where with no attributes",
"operator": "Where",
"attributes": [],
"cases": [
{
"name": "T[3 3] T[3 3] T[1] float32 broadcast",
"inputs": [
{
"data": [true, true, true, true, true, false, false, false, false],
"dims": [3, 3],
"type": "bool"
},
{
"data": [0, 1, 2, 3, 4, 5, 6, 7, 8],
"dims": [3, 3],
"type": "float32"
},
{
"data": [-1.0],
"dims": [1],
"type": "float32"
}
],
"outputs": [
{
"data": [0, 1, 2, 3, 4, -1, -1, -1, -1],
"dims": [3, 3],
"type": "float32"
}
]
}
]
}
]