| { |
| "fixtureArrays": { |
| "ort_three_dim_float_upper_k1_input_input": [4, 1, 5, 8, 4, 3, 2, 4, 6, 1, 2, 3, 1, 6, 2, 1, 4, 1, 5, 8, 4, 3, 2, 4], |
| "onnx_backend_tril_input_input": [5, 0, 3, 3, 7, 9, 3, 5, 2, 4, 7, 6, 8, 8, 1, 6, 7, 7, 8, 1], |
| "onnx_backend_tril_square_input_input": [5, 0, 3, 3, 7, 9, 3, 5, 2, 4, 7, 6, 8, 8, 1, 6, 7, 7] |
| }, |
| "cases": [ |
| { |
| "name": "upper_rank2", |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0] } |
| } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [3, 3] } } |
| }, |
| { |
| "name": "lower_rank3_f16", |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { "dtype": "float16", "shape": [2, 3, 4] }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-1] } } |
| }, |
| "outputs": { "output": { "dtype": "float16", "shape": [2, 3, 4] } }, |
| "tolerance": 0.001 |
| }, |
| { |
| "name": "upper_rank5_k1", |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [1, 2, 1, 3, 4], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.23 } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 2, 1, 3, 4], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "lower_rank6_k_minus1", |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [1, 2, 1, 1, 3, 3], |
| "data": { |
| "kind": "values", |
| "values": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 100.0, 101.0, 102.0, 103.0, 104.0, 105.0, 106.0, 107.0, 108.0] |
| } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-1] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 2, 1, 1, 3, 3], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "upper_k_int_max_i32_overflow", |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { "dtype": "float32", "shape": [2, 3], "data": { "kind": "constant", "value": 1.5 } }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [2147483647] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "upper_large_positive_k_out_of_range_vec4", |
| "attrs": { "upper": 1 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluTest.small_k_float_upper", |
| "notes": "INT32_MAX is far outside this matrix and should keep no upper-triangular elements on the package's supported scalar-input route." |
| }, |
| "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] } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [2147483647] } } |
| }, |
| "outputs": { |
| "output": { "dtype": "float32", "shape": [2, 4], "tolerance": 0, "data": { "kind": "constant", "value": 0.0 } } |
| } |
| }, |
| { |
| "name": "lower_large_negative_k_out_of_range_scalar", |
| "attrs": { "upper": 0 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.neg_k_float_lower", |
| "notes": "An extreme negative diagonal offset in the supported int32 range removes every lower-triangular element." |
| }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [2, 3], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-2147483648] } } |
| }, |
| "outputs": { |
| "output": { "dtype": "float32", "shape": [2, 3], "tolerance": 0, "data": { "kind": "constant", "value": 0.0 } } |
| } |
| }, |
| { |
| "name": "ort_shape_inference_tri_upper_float_rank2", |
| "attrs": { "upper": 1 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_shape_inference_test.cc", |
| "test": "ShapeInferenceTests.tri_upper_float", |
| "notes": "A rank-2 float tensor of shape [4,7] exercises upper-triangular masking with the default diagonal." |
| }, |
| "inputs": { |
| "input": { "dtype": "float32", "shape": [4, 7], "data": { "kind": "linspace", "start": -13.0, "end": 14.0 } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [4, 7], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_shape_inference_tri_upper_zero_dim_float", |
| "attrs": { "upper": 1 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_shape_inference_test.cc", |
| "test": "ShapeInferenceTests.tri_upper_zero_dim_int", |
| "notes": "Preserves the zero-dimension rank-3 shape from the ONNX shape-inference case." |
| }, |
| "inputs": { "input": { "dtype": "float32", "shape": [4, 7, 0], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { "output": { "dtype": "float32", "shape": [4, 7, 0], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_shape_inference_tri_lower_rank4_float", |
| "attrs": { "upper": 0 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_shape_inference_test.cc", |
| "test": "ShapeInferenceTests.tri_lower_4d_int", |
| "notes": "Preserves the rank-4 shape from the ONNX shape-inference case." |
| }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [2, 3, 7, 11], |
| "data": { "kind": "fillFloat32", "scale": 0.5, "sinStep": 0.07, "cosStep": 0.13 } |
| } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 7, 11], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_two_by_two_float_upper", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.two_by_two_float_upper" |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [4.0, 7.0, 2.0, 6.0] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_two_by_two_float_lower", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.two_by_two_float_lower" |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [4.0, 7.0, 2.0, 6.0] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_three_dim_float_upper_k1", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.three_dim_float_upper" |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_three_dim_float_upper_k1_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 4], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_three_dim_float_lower_k1", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.three_dim_float_lower" |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_three_dim_float_upper_k1_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 4], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_neg_k_float_upper", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.neg_k_float_upper" |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_three_dim_float_upper_k1_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-1] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 4], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_neg_k_float_lower", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.neg_k_float_lower" |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_three_dim_float_upper_k1_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-1] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 4], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_small_k_float_upper", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluTest.small_k_float_upper" |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_three_dim_float_upper_k1_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-5] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 4], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_small_k_float_lower", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.small_k_float_lower" |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_three_dim_float_upper_k1_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-5] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 4], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_zero_dim_upper", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.zero_dim_upper" |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { "input": { "dtype": "float32", "shape": [2, 3, 0], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 0], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_zero_dim_lower", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.zero_dim_lower" |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { "input": { "dtype": "float32", "shape": [2, 3, 0], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 0], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_zero_dim_2_upper", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.zero_dim_2_upper" |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { "dtype": "float32", "shape": [2, 0, 0], "data": { "kind": "values", "values": [] } }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-5] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 0, 0], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "ort_zero_dim_2_lower", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.zero_dim_2_lower" |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { "dtype": "float32", "shape": [2, 0, 0], "data": { "kind": "values", "values": [] } }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-5] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 0, 0], "tolerance": 0.000001 } } |
| }, |
| { |
| "name": "onnx_backend_tril", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_tril", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [4, 5], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_tril_input_input" } } |
| } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_tril_neg", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_tril_neg", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [4, 5], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_tril_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-1] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_tril_one_row_neg", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_tril_one_row_neg", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [3, 1, 5], |
| "data": { |
| "kind": "values", |
| "values": [5.0, 0.0, 3.0, 3.0, 7.0, 9.0, 3.0, 5.0, 2.0, 4.0, 7.0, 6.0, 8.0, 8.0, 1.0] |
| } |
| } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [3, 1, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_tril_out_neg", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_tril_out_neg", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [4, 5], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_tril_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-7] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_tril_out_pos", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_tril_out_pos", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [4, 5], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_tril_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [6] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_tril_pos", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_tril_pos", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [4, 5], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_tril_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [2] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_tril_square", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_tril_square", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [2, 3, 3], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_tril_square_input_input" } } |
| } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_tril_square_neg", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_tril_square_neg", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [2, 3, 3], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_tril_square_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-1] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_tril_zero", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_tril_zero", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { "dtype": "float32", "shape": [3, 0, 5], "data": { "kind": "values", "values": [] } }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [6] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [3, 0, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_triu", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_triu", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [4, 5], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_tril_input_input" } } |
| } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_triu_neg", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_triu_neg", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [4, 5], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_tril_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-1] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_triu_one_row", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_triu_one_row", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [3, 1, 5], |
| "data": { |
| "kind": "values", |
| "values": [5.0, 0.0, 3.0, 3.0, 7.0, 9.0, 3.0, 5.0, 2.0, 4.0, 7.0, 6.0, 8.0, 8.0, 1.0] |
| } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [3, 1, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_triu_out_neg_out", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_triu_out_neg_out", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [4, 5], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_tril_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-7] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_triu_out_pos", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_triu_out_pos", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [4, 5], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_tril_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [6] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_triu_pos", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_triu_pos", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [4, 5], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_tril_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [2] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_triu_square", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_triu_square", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [2, 3, 3], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_tril_square_input_input" } } |
| } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_triu_square_neg", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_triu_square_neg", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [2, 3, 3], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_tril_square_input_input" } } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-1] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_triu_zero", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_triu_zero", |
| "notes": "Official tensor payload is int64; adapted to float32 because this WebGPU Trilu manifest supports floating tensors." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { "dtype": "float32", "shape": [0, 5], "data": { "kind": "values", "values": [] } }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [6] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [0, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_bool_rank3_lower_k_minus1", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.three_by_three_bool_lower", |
| "notes": "Extends ORT bool lower-triangle coverage to batched rank-3 and k=-1." |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "bool", |
| "shape": [2, 3, 3], |
| "data": { "kind": "values", "values": [1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1] } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-1] } } |
| }, |
| "outputs": { |
| "output": { |
| "dtype": "bool", |
| "shape": [2, 3, 3], |
| "data": { "kind": "values", "values": [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0] }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "ort_two_by_two_bool_upper", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.two_by_two_bool_upper" |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { "input": { "dtype": "bool", "shape": [2, 2], "data": { "kind": "values", "values": [1, 1, 1, 1] } } }, |
| "outputs": { |
| "output": { |
| "dtype": "bool", |
| "shape": [2, 2], |
| "data": { "kind": "values", "values": [1, 1, 0, 1] }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "ort_three_by_three_bool_lower", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.three_by_three_bool_lower" |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "bool", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [1, 1, 1, 1, 0, 1, 1, 1, 0] } |
| } |
| }, |
| "outputs": { |
| "output": { |
| "dtype": "bool", |
| "shape": [3, 3], |
| "data": { "kind": "values", "values": [1, 0, 0, 1, 0, 0, 1, 1, 0] }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "bool_vec4_aligned_causal_mask_lower", |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "bool", |
| "shape": [1, 1, 8, 8], |
| "data": { |
| "kind": "values", |
| "values": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] |
| } |
| } |
| }, |
| "outputs": { "output": { "dtype": "bool", "shape": [1, 1, 8, 8], "tolerance": 0 } } |
| }, |
| { |
| "name": "bool_vec4_aligned_upper_diag1", |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "bool", |
| "shape": [4, 4], |
| "data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } } |
| }, |
| "outputs": { "output": { "dtype": "bool", "shape": [4, 4], "tolerance": 0 } } |
| }, |
| { |
| "name": "f16_vec4_causal_mask_rank4_lower", |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float16", |
| "shape": [1, 2, 16, 16], |
| "data": { "kind": "fillFloat32", "scale": 1.0, "sinStep": 0.11, "cosStep": 0.19 } |
| } |
| }, |
| "outputs": { "output": { "dtype": "float16", "shape": [1, 2, 16, 16], "tolerance": 0.001 } } |
| }, |
| { |
| "name": "f16_vec4_attention_mask_upper_diag1", |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float16", |
| "shape": [2, 8, 8], |
| "data": { "kind": "fillFloat32", "scale": 1.0, "sinStep": 0.23, "cosStep": 0.31 } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } } |
| }, |
| "outputs": { "output": { "dtype": "float16", "shape": [2, 8, 8], "tolerance": 0.001 } } |
| }, |
| { |
| "name": "vec4_fold_last_block_guard_1x16x2048x2048", |
| "provenance": { |
| "notes": "Large nonzero periodic f16 payload isolates the vec4 2D-dispatch fold and final-block guard without spending the correctness run synthesizing and converting 67M transcendental values." |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float16", |
| "shape": [1, 16, 2048, 2048], |
| "data": { "kind": "cycle", "values": [0.5, -0.75, 1.25, -1.5] } |
| } |
| }, |
| "outputs": { "output": { "dtype": "float16", "shape": [1, 16, 2048, 2048], "tolerance": 0.001 } } |
| }, |
| { |
| "name": "scalar_fold_last_row_guard_1x1x262143x67", |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [1, 1, 262143, 67], |
| "data": { "kind": "fillFloat32", "scale": 1.0, "sinStep": 0.0007, "cosStep": 0.0011 } |
| } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 1, 262143, 67], "tolerance": 0 } } |
| }, |
| { |
| "name": "k_input_scalar_nonvec4_rank3", |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [2, 3, 5], |
| "data": { |
| "kind": "values", |
| "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0] |
| } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "k_input_f16_vec4_odd_row_crossing_rank3", |
| "provenance": { |
| "notes": "Locks the vec4 flat-buffer path when odd-width rows cross lane boundaries and k is supplied at runtime. The 40-element tensor is vec4-aligned even though each 5-element row is not." |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { "dtype": "float16", "shape": [2, 4, 5], "data": { "kind": "linspace", "start": 1.0, "end": 40.0 } }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-1] } } |
| }, |
| "outputs": { "output": { "dtype": "float16", "shape": [2, 4, 5], "tolerance": 0.001 } } |
| }, |
| { |
| "name": "f16_vec4_tiny_rows_multi_crossing", |
| "provenance": { |
| "notes": "With two elements per row, each four-lane vector spans two rows and must apply triangular coordinates independently to every lane." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { "dtype": "float16", "shape": [2, 4, 2], "data": { "kind": "linspace", "start": 1.0, "end": 16.0 } } |
| }, |
| "outputs": { "output": { "dtype": "float16", "shape": [2, 4, 2], "tolerance": 0.001 } } |
| }, |
| { |
| "name": "vec4_diag_per_lane_offdiag_boundary_rank3_k2", |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [3, 4, 8], |
| "data": { "kind": "fillFloat32", "scale": 1.0, "sinStep": 0.29, "cosStep": 0.37 } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [2] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [3, 4, 8], "tolerance": 0 } } |
| }, |
| { |
| "name": "lower_k_int_min_all_zero", |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { "dtype": "float32", "shape": [2, 4], "data": { "kind": "constant", "value": 1.5 } }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-2147483648] } } |
| }, |
| "outputs": { |
| "output": { "dtype": "float32", "shape": [2, 4], "tolerance": 0, "data": { "kind": "constant", "value": 0.0 } } |
| } |
| }, |
| { |
| "name": "scalar4_odd_row_crossing_rank4_lower_kminus1", |
| "provenance": { |
| "notes": "Compact lock for four-output scalar unrolling when a group crosses an odd-width row boundary and the tensor ends on a partial group." |
| }, |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [1, 2, 5, 5], |
| "data": { "kind": "linspace", "start": 1.0, "end": 50.0 } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-1] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 2, 5, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "rank7_lower", |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [1, 2, 1, 1, 1, 3, 4], |
| "data": { "kind": "linspace", "start": 1.0, "end": 24.0 } |
| } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 2, 1, 1, 1, 3, 4], "tolerance": 0 } } |
| }, |
| { |
| "name": "rank8_lower", |
| "attrs": { "upper": 0 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [1, 2, 1, 1, 1, 2, 3, 4], |
| "data": { "kind": "linspace", "start": 1.0, "end": 48.0 } |
| } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 2, 1, 1, 1, 2, 3, 4], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_standard_int32_upper_extremes_vec4", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc", |
| "test": "TriluOpTest.two_by_two_int32_upper", |
| "notes": "Signed extrema and values beyond f32 exactness verify that masking preserves the i32 payload exactly." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "int32", |
| "shape": [2, 4], |
| "data": { "kind": "values", "values": [-2147483648, 2147483647, -16777217, 16777217, -1, 0, 42, -42] } |
| } |
| }, |
| "outputs": { |
| "output": { |
| "dtype": "int32", |
| "shape": [2, 4], |
| "tolerance": 0, |
| "data": { "kind": "values", "values": [-2147483648, 2147483647, -16777217, 16777217, 0, 0, 42, -42] } |
| } |
| } |
| }, |
| { |
| "name": "ort_standard_int16_upper_extremes_vec4", |
| "provenance": { |
| "source": "onnx/docs/Operators.md#Trilu", |
| "notes": "ONNX Trilu-14 permits int16; both signed extrema verify logical int16 values stored in i32 slots during masking." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "int16", |
| "shape": [2, 4], |
| "data": { "kind": "values", "values": [-32768, 32767, -12345, 12345, -1, 0, 42, -42] } |
| } |
| }, |
| "outputs": { |
| "output": { |
| "dtype": "int16", |
| "shape": [2, 4], |
| "tolerance": 0, |
| "data": { "kind": "values", "values": [-32768, 32767, -12345, 12345, 0, 0, 42, -42] } |
| } |
| } |
| }, |
| { |
| "name": "ort_standard_int8_upper_extremes_vec4", |
| "provenance": { |
| "source": "onnx/docs/Operators.md#Trilu", |
| "notes": "ONNX Trilu-14 permits int8; signed extrema distinguish widened i32 storage from a lossy conversion." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "int8", |
| "shape": [2, 4], |
| "data": { "kind": "values", "values": [-128, 127, -64, 63, -1, 0, 42, -42] } |
| } |
| }, |
| "outputs": { |
| "output": { |
| "dtype": "int8", |
| "shape": [2, 4], |
| "tolerance": 0, |
| "data": { "kind": "values", "values": [-128, 127, -64, 63, 0, 0, 42, -42] } |
| } |
| } |
| }, |
| { |
| "name": "ort_standard_uint32_upper_extremes_vec4", |
| "provenance": { |
| "source": "onnx/docs/Operators.md#Trilu", |
| "notes": "ONNX Trilu-14 permits uint32; UINT32_MAX and values across the signed boundary lock exact u32 masking." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "uint32", |
| "shape": [2, 4], |
| "data": { "kind": "values", "values": [0, 4294967295, 16777217, 2147483648, 1, 42, 4000000000, 255] } |
| } |
| }, |
| "outputs": { |
| "output": { |
| "dtype": "uint32", |
| "shape": [2, 4], |
| "tolerance": 0, |
| "data": { "kind": "values", "values": [0, 4294967295, 16777217, 2147483648, 0, 42, 4000000000, 255] } |
| } |
| } |
| }, |
| { |
| "name": "ort_standard_uint8_upper_extremes_vec4", |
| "provenance": { |
| "source": "onnx/docs/Operators.md#Trilu", |
| "notes": "ONNX Trilu-14 permits uint8; UINT8_MAX and the signed boundary guard widened u32 masking." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "uint8", |
| "shape": [2, 4], |
| "data": { "kind": "values", "values": [0, 255, 127, 128, 1, 42, 254, 64] } |
| } |
| }, |
| "outputs": { |
| "output": { |
| "dtype": "uint8", |
| "shape": [2, 4], |
| "tolerance": 0, |
| "data": { "kind": "values", "values": [0, 255, 127, 128, 0, 42, 254, 64] } |
| } |
| } |
| }, |
| { |
| "name": "k_input_int32_min_scalar_route", |
| "provenance": { |
| "notes": "An INT32_MIN `k` input and unaligned width exercise scalar masking. Comparing `col - row` with `k` avoids overflow in the equivalent `row + k` form." |
| }, |
| "attrs": { "upper": 1 }, |
| "inputs": { |
| "input": { |
| "dtype": "float32", |
| "shape": [8, 7], |
| "data": { "kind": "fillFloat32", "sinStep": 0.031, "cosStep": 0.017, "scale": 1.0 } |
| }, |
| "k": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [-2147483648] } } |
| }, |
| "outputs": { "output": { "dtype": "float32", "shape": [8, 7], "tolerance": 0 } } |
| } |
| ] |
| } |
|
|