ai.onnx.Expand / build /webgpu /test.json
Xenova's picture
Xenova HF Staff
sync 2e7068faf55e
e394010 verified
Raw
History Blame
27 kB
{
"op": "ai.onnx.Expand",
"cases": [
{
"name": "int16_broadcast_boundaries",
"inputs": {
"input": { "dtype": "int16", "shape": [1, 4], "data": { "kind": "values", "values": [-32768, -1, 0, 32767] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 4] } }
},
"outputs": {
"output": {
"dtype": "int16",
"shape": [2, 4],
"tolerance": 0,
"data": { "kind": "values", "values": [-32768, -1, 0, 32767, -32768, -1, 0, 32767] }
}
}
},
{
"name": "dispatch_cliff_scalar_splat",
"inputs": {
"input": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [7.0] } },
"shape": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [16776963] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [16776963], "tolerance": 0 } }
},
{
"name": "scalar_to_3x3",
"inputs": {
"input": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.5] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
},
{
"name": "ort_float_scalar_to_3x3",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x3"
},
"inputs": {
"input": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
},
{
"name": "row_vector_to_3x3",
"inputs": {
"input": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
},
{
"name": "ort_float_vector_to_rows",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x1"
},
"inputs": {
"input": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
},
{
"name": "col_vector_to_3x3",
"inputs": {
"input": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
},
{
"name": "ort_float_col_vector_to_cols",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_1x3"
},
"inputs": {
"input": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } }
},
{
"name": "rank3_broadcast",
"inputs": {
"input": {
"dtype": "float32",
"shape": [1, 3, 1],
"data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 }
},
"shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 3, 4] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3, 4], "tolerance": 0.000001 } }
},
{
"name": "uint32_bool_like_broadcast",
"inputs": {
"input": { "dtype": "uint32", "shape": [1, 3, 1], "data": { "kind": "values", "values": [1, 0, 2] } },
"shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 3, 4] } }
},
"outputs": { "output": { "dtype": "uint32", "shape": [2, 3, 4], "tolerance": 0 } }
},
{
"name": "rank5_broadcast",
"inputs": {
"input": {
"dtype": "float32",
"shape": [2, 1, 2, 1, 1],
"data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23 }
},
"shape": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [2, 3, 2, 4, 2] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3, 2, 4, 2], "tolerance": 0.000001 } }
},
{
"name": "rank7_broadcast",
"inputs": {
"input": {
"dtype": "float32",
"shape": [1, 2, 1, 3, 1, 1, 2],
"data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19 }
},
"shape": { "dtype": "uint32", "shape": [7], "data": { "kind": "values", "values": [2, 2, 4, 3, 2, 3, 2] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 4, 3, 2, 3, 2], "tolerance": 0.000001 } }
},
{
"name": "true_scalar_to_rank3",
"inputs": {
"input": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-2.5] } },
"shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 2, 3] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 3], "tolerance": 0.000001 } }
},
{
"name": "scalar_to_scalar_empty_shape",
"inputs": {
"input": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [6.5] } },
"shape": { "dtype": "uint32", "shape": [0], "data": { "kind": "values", "values": [] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } }
},
{
"name": "broadcast_to_zero_width_rows",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x1",
"notes": "Valid empty-output broadcast: input shape [1,0] expands to [3,0]. No elements are written, but generated stride math must still compile."
},
"inputs": {
"input": { "dtype": "float32", "shape": [1, 0], "data": { "kind": "values", "values": [] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 0] } }
},
"outputs": {
"output": { "dtype": "float32", "shape": [3, 0], "tolerance": 0, "data": { "kind": "values", "values": [] } }
}
},
{
"name": "broadcast_to_zero_middle_dim_scalar",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x1x3x1_int64",
"notes": "Scalar-template companion for zero-sized broadcast output: the final dimension is not vec4-aligned, so the generic Expand shader must handle zero strides."
},
"inputs": {
"input": { "dtype": "float32", "shape": [1, 0, 5], "data": { "kind": "values", "values": [] } },
"shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [3, 0, 5] } }
},
"outputs": {
"output": { "dtype": "float32", "shape": [3, 0, 5], "tolerance": 0, "data": { "kind": "values", "values": [] } }
}
},
{
"name": "ort_int32_scalar_to_3x3",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x3_int32"
},
"inputs": {
"input": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [1] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [3, 3], "tolerance": 0 } }
},
{
"name": "ort_int32_vector_to_rows",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x1_int32"
},
"inputs": {
"input": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [1, 2, 3] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [3, 3], "tolerance": 0 } }
},
{
"name": "ort_int32_rank4_singletons",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x1x3x1_int64",
"notes": "Same rank-4 singleton broadcast pattern adapted to int32 storage."
},
"inputs": {
"input": {
"dtype": "int32",
"shape": [1, 3, 1, 3],
"data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9] }
},
"shape": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [3, 3, 3, 3] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [3, 3, 3, 3], "tolerance": 0 } }
},
{
"name": "ort_f16_scalar_to_3x3",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x3_float16"
},
"inputs": {
"input": { "dtype": "float16", "shape": [1], "data": { "kind": "values", "values": [1.0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
},
"outputs": { "output": { "dtype": "float16", "shape": [3, 3], "tolerance": 0.001 } }
},
{
"name": "ort_f16_vector_to_rows",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x1_float16"
},
"inputs": {
"input": { "dtype": "float16", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } }
},
"outputs": { "output": { "dtype": "float16", "shape": [3, 3], "tolerance": 0.001 } }
},
{
"name": "ort_f16_col_vector_to_cols",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_1x3_float16"
},
"inputs": {
"input": { "dtype": "float16", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } }
},
"outputs": { "output": { "dtype": "float16", "shape": [3, 3], "tolerance": 0.001 } }
},
{
"name": "ort_uint32_bool_scalar_to_3x3",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x3_bool",
"notes": "Adapts ORT's bool tensor to logical uint32 values because this framework stores bool-like tensors as u32 slots."
},
"inputs": {
"input": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [1] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
},
"outputs": { "output": { "dtype": "uint32", "shape": [3, 3], "tolerance": 0 } }
},
{
"name": "ort_uint32_bool_col_to_four_cols",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_1x4_bool",
"notes": "Adapts ORT's bool tensor to logical uint32 values because this framework stores bool-like tensors as u32 slots."
},
"inputs": {
"input": { "dtype": "uint32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 4] } }
},
"outputs": { "output": { "dtype": "uint32", "shape": [3, 4], "tolerance": 0 } }
},
{
"name": "ort_shape_dim_one_does_not_shrink_rank5",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_2x2x1x2x1_float"
},
"inputs": {
"input": {
"dtype": "float32",
"shape": [2, 2, 1, 2, 1],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] }
},
"shape": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [1, 2, 2, 2, 2] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 2, 2, 2], "tolerance": 0.000001 } }
},
{
"name": "ort_shape_dim_one_does_not_shrink_middle",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x1x8_float"
},
"inputs": {
"input": {
"dtype": "float32",
"shape": [3, 2, 1],
"data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] }
},
"shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [3, 1, 8] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3, 2, 8], "tolerance": 0.000001 } }
},
{
"name": "ort_int32_col_vector_to_cols",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_1x3_int32"
},
"inputs": {
"input": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [1, 2, 3] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [3, 3], "tolerance": 0 } }
},
{
"name": "ort_uint32_bool_col_to_cols",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_1x3_bool",
"notes": "Adapts ORT's bool tensor to logical uint32 values because this framework stores bool-like tensors as u32 slots."
},
"inputs": {
"input": { "dtype": "uint32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } }
},
"outputs": { "output": { "dtype": "uint32", "shape": [3, 3], "tolerance": 0 } }
},
{
"name": "ort_uint32_bool_row_to_rows",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_4x1_bool",
"notes": "Adapts ORT's bool tensor to logical uint32 values because this framework stores bool-like tensors as u32 slots."
},
"inputs": {
"input": { "dtype": "uint32", "shape": [1, 4], "data": { "kind": "values", "values": [0, 1, 0, 0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [4, 1] } }
},
"outputs": { "output": { "dtype": "uint32", "shape": [4, 4], "tolerance": 0 } }
},
{
"name": "ort_scalar_float_empty_shape",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_scalar_float"
},
"inputs": {
"input": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [3.0] } },
"shape": { "dtype": "uint32", "shape": [0], "data": { "kind": "values", "values": [] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } }
},
{
"name": "onnx_backend_expand_dim_changed",
"inputs": {
"input": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
"shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 1, 6] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3, 6] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_expand_dim_changed",
"notes": "ONNX int64 metadata/index tensors use framework int32/uint32 slots where representable."
}
},
{
"name": "onnx_backend_expand_dim_unchanged",
"inputs": {
"input": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 4] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [3, 4] } },
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_expand_dim_unchanged",
"notes": "ONNX int64 metadata/index tensors use framework int32/uint32 slots where representable."
}
},
{
"name": "ort_scalar_float_to_scalar",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_scalar_float",
"notes": "ORT shape is int64; this framework stores the empty shape tensor in uint32 slots."
},
"inputs": {
"input": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [3.0] } },
"shape": { "dtype": "uint32", "shape": [0], "data": { "kind": "values", "values": [] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [], "tolerance": 0 } }
},
{
"name": "ort_scalar_int32_to_rank3",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_scalar_int32",
"notes": "ORT shape is int64; this framework stores representable shape values in uint32 slots."
},
"inputs": {
"input": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [9] } },
"shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 3, 4] } }
},
"outputs": { "output": { "dtype": "int32", "shape": [2, 3, 4], "tolerance": 0 } }
},
{
"name": "ort_bool_pattern_uint32_row_expand",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x1_bool",
"notes": "ORT uses bool payloads; this framework represents logical bool-like values as uint32 slots."
},
"inputs": {
"input": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [0, 1, 0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } }
},
"outputs": { "output": { "dtype": "uint32", "shape": [3, 3], "tolerance": 0 } }
},
{
"name": "ort_int8_vector_to_rows_edge_values",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x1_int32",
"notes": "Same row-broadcast shape as ORT's int32 case, using ONNX-valid signed byte edge values."
},
"inputs": {
"input": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [-128, -1, 127] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } }
},
"outputs": { "output": { "dtype": "int8", "shape": [3, 3], "tolerance": 0 } }
},
{
"name": "ort_uint8_col_vector_to_cols_edge_values",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_1x3_int32",
"notes": "Same column-broadcast shape as ORT's int32 case, using ONNX-valid unsigned byte edge values."
},
"inputs": {
"input": { "dtype": "uint8", "shape": [3, 1], "data": { "kind": "values", "values": [0, 128, 255] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } }
},
"outputs": { "output": { "dtype": "uint8", "shape": [3, 3], "tolerance": 0 } }
},
{
"name": "ort_bool_scalar_to_3x3",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x3_bool"
},
"inputs": {
"input": { "dtype": "bool", "shape": [1], "data": { "kind": "values", "values": [1] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } }
},
"outputs": {
"output": {
"dtype": "bool",
"shape": [3, 3],
"tolerance": 0,
"data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1, 1, 1, 1] }
}
}
},
{
"name": "ort_bool_vector_to_rows",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_3x1_bool"
},
"inputs": {
"input": { "dtype": "bool", "shape": [3], "data": { "kind": "values", "values": [0, 1, 0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } }
},
"outputs": {
"output": {
"dtype": "bool",
"shape": [3, 3],
"tolerance": 0,
"data": { "kind": "values", "values": [0, 1, 0, 0, 1, 0, 0, 1, 0] }
}
}
},
{
"name": "ort_bool_col_to_cols",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_1x3_bool",
"notes": "The requested shape has a leading dimension of 1; ONNX Expand keeps the input's leading dimension of 3 rather than shrinking it."
},
"inputs": {
"input": { "dtype": "bool", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } }
},
"outputs": {
"output": {
"dtype": "bool",
"shape": [3, 3],
"tolerance": 0,
"data": { "kind": "values", "values": [0, 0, 0, 1, 1, 1, 0, 0, 0] }
}
}
},
{
"name": "ort_bool_row_to_four_rows",
"provenance": {
"source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc",
"test": "ExpandOpTest.Expand_4x1_bool"
},
"inputs": {
"input": { "dtype": "bool", "shape": [1, 4], "data": { "kind": "values", "values": [0, 1, 0, 0] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [4, 1] } }
},
"outputs": {
"output": {
"dtype": "bool",
"shape": [4, 4],
"tolerance": 0,
"data": { "kind": "values", "values": [0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0] }
}
}
},
{
"name": "int8_vec4_path_edge_values",
"inputs": {
"input": { "dtype": "int8", "shape": [1, 4], "data": { "kind": "values", "values": [-128, -1, 0, 127] } },
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 4] } }
},
"outputs": { "output": { "dtype": "int8", "shape": [3, 4], "tolerance": 0 } }
},
{
"name": "uint8_vec4_path_broadcast_row",
"inputs": {
"input": {
"dtype": "uint8",
"shape": [1, 8],
"data": { "kind": "values", "values": [0, 64, 128, 192, 255, 1, 127, 254] }
},
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [4, 8] } }
},
"outputs": { "output": { "dtype": "uint8", "shape": [4, 8], "tolerance": 0 } }
},
{
"name": "rank7_vec4_last_dim_divisible",
"inputs": {
"input": {
"dtype": "float32",
"shape": [2, 1, 3, 1, 2, 1, 4],
"data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19 }
},
"shape": { "dtype": "uint32", "shape": [7], "data": { "kind": "values", "values": [2, 3, 3, 2, 2, 2, 4] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 3, 3, 2, 2, 2, 4], "tolerance": 0.000001 } }
},
{
"name": "rank8_broadcast",
"inputs": {
"input": {
"dtype": "float32",
"shape": [1, 2, 1, 3, 1, 1, 2, 1],
"data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19 }
},
"shape": { "dtype": "uint32", "shape": [8], "data": { "kind": "values", "values": [2, 2, 4, 3, 2, 3, 2, 2] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 2, 4, 3, 2, 3, 2, 2], "tolerance": 0.000001 } }
},
{
"name": "f16_vec4_row_broadcast",
"provenance": {
"source": "authored for render coverage",
"test": "expand-vec4 `usesF16` arm",
"notes": "A float16 output whose innermost dimension is four exercises vec4 broadcasting and half-precision storage. Expand only copies exactly representable values, so the expected output is exact at tolerance zero."
},
"inputs": {
"input": {
"dtype": "float16",
"shape": [1, 8],
"data": { "kind": "values", "values": [1.0, -2.0, 3.5, -4.25, 8.0, -16.5, 0.125, 64.0] }
},
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 8] } }
},
"outputs": { "output": { "dtype": "float16", "shape": [3, 8], "tolerance": 0 } }
},
{
"name": "same_shape_identity_vec4",
"provenance": {
"source": "authored for render coverage",
"test": "expand-vec4 `x_same` arm",
"notes": "The requested shape equals the input shape, so expand-vec4 takes the x_same branch and emits the identity offset `return out_index;` instead of including expand-broadcast-offset. No other case has an input shape identical to the output shape while the innermost dim is divisible by 4; every other vec4-eligible case broadcasts at least one axis. All eight values are distinct so a wrong offset in the identity path shows up per position."
},
"inputs": {
"input": {
"dtype": "float32",
"shape": [2, 4],
"data": { "kind": "values", "values": [1.0, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, -8.0] }
},
"shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 4] } }
},
"outputs": { "output": { "dtype": "float32", "shape": [2, 4], "tolerance": 0 } }
}
]
}