[js/webgpu] Fix reshape int32 test case (#17113)

Co-authored-by: Xing Xu <xing.xu@intel.com>

Co-authored-by: Xing Xu <xing.xu@intel.com>
This commit is contained in:
xhcao 2023-08-16 12:18:13 +08:00 committed by GitHub
parent 8289e8b6ef
commit 33ecde9af1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
[
{
"name": "Reshape with '0' and '-1' in the shape tensor input",
"name": "Reshape float32 with '0' and '-1' in the shape tensor input",
"operator": "Reshape",
"attributes": [],
"cases": [
@ -93,5 +93,100 @@
]
}
]
},
{
"name": "Reshape int32 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": "int32"
},
{
"data": [-1, 0],
"dims": [2],
"type": "int64"
}
],
"outputs": [
{
"data": [1, 1, 1, 1],
"dims": [2, 2],
"type": "int32"
}
]
},
{
"name": "Scalar to 1D",
"inputs": [
{
"data": [1],
"dims": [],
"type": "int32"
},
{
"data": [1],
"dims": [1],
"type": "int64"
}
],
"outputs": [
{
"data": [1],
"dims": [1],
"type": "int32"
}
]
},
{
"name": "Scalar to 2D",
"inputs": [
{
"data": [1],
"dims": [],
"type": "int32"
},
{
"data": [1, 1],
"dims": [2],
"type": "int64"
}
],
"outputs": [
{
"data": [1],
"dims": [1, 1],
"type": "int32"
}
]
},
{
"name": "Scalar to 2D with -1 in shape hints",
"inputs": [
{
"data": [1],
"dims": [],
"type": "int32"
},
{
"data": [-1, 1],
"dims": [2],
"type": "int64"
}
],
"outputs": [
{
"data": [1],
"dims": [1, 1],
"type": "int32"
}
]
}
]
}
]