diff --git "a/build/webgpu/test.json" "b/build/webgpu/test.json" new file mode 100644--- /dev/null +++ "b/build/webgpu/test.json" @@ -0,0 +1,4756 @@ +{ + "fixtureArrays": { + "same_upper_stride2_autopad_input_x": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], + "dilated_stride2_padding_saturates_u8_input_x": [0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 128, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0], + "per_channel_grouped_requant_oc_indexing_g4_i8_input_x": [-8, -4, 0, 4, 8, 12, -12, 16, -16, 3, -3, 6, -6, 9, -9, 12, 20, -20], + "per_channel_grouped_requant_oc_indexing_g4_i8_input_w": [-10, -8, -6, -4, -2, 0, 2, 4, 6, 3, 5, 7, 9, 11, 13, 15, 17, 19], + "nchw_dp4a_pointwise_c66_tail_oc32_input_x": [3, 200, 41, 137, 88, 251, 17, 64, 190, 112, 9, 233, 75, 156, 28, 205, 122], + "nhwc_dp4a_pointwise_c66_tail_oc32_s8x_u8w_input_x": [-77, 3, 51, -120, 96, -14, 33, -60, 118, -5, 71, -101, 22, 84, -39, 12, -128], + "nhwc_dp4a_pointwise_per_channel_bias_c32_oc16_input_w_zero_point": [-4, -3, -2, -1, 0, 1, 2, 3, 4, 5, -4, -3, -2, -1, 0, 1], + "nhwc_channels_x4_group2_3x3_input_w_scale": [0.01, 0.0112, 0.0124, 0.0136, 0.0148, 0.016, 0.0172, 0.0184, 0.0196, 0.0208, 0.022, 0.0232, 0.0244, 0.0256, 0.0268, 0.028], + "qconv-nchw-batch2-tail-k567-perchannel-bias-fixture_input_w_scale": [0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125], + "qconv-nchw-batch2-tail-k567-perchannel-bias-fixture_input_w_zero_point": [0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3], + "qconv-nchw-batch3-dilated-asymmetric-stride2-u8-weights-s8-output-fixture_input_w_scale": [0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125], + "qconv-nchw-batch3-dilated-asymmetric-stride2-u8-weights-s8-output-fixture_input_w_zero_point": [128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125], + "qconv-nchw-signed-group2-control-fixture_input_w_scale": [0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125], + "qconv-nchw-signed-group2-control-fixture_input_w_zero_point": [0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3, 5, 0, -3], + "qconv-nchw-near-half-dot_input_w": [-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, 80, -44, 9, 62, 115, -87, -34, 19, 72, 125, -77, -24, 29, 82, -120, -67, -14], + "qconv-nchw-near-half-bias_input_w": [-127, -90, -53, -16, 21, 58, 95, -123, -86, -49, -12, 25, 62, 99, -119, -82, -44, 9, 62, 115, -87, -34, 19, 72, 125, -77, -24, 29, 82, -120, -67, -14], + "nchw_dp4a_im2col_per_channel_3x3_c16_oc24_input_w_scale": [0.01, 0.0113, 0.0126, 0.0139, 0.0152, 0.0165, 0.0178, 0.0191, 0.0204, 0.0217, 0.023, 0.0243, 0.0256, 0.0269, 0.0282, 0.0295, 0.01, 0.0113, 0.0126, 0.0139, 0.0152, 0.0165, 0.0178, 0.0191], + "nchw_dp4a_im2col_per_channel_3x3_c16_oc24_input_w_zero_point": [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6], + "nhwc_dp4a_im2col_bias_3x3_c8_oc16_input_B": [-700, -510, -320, -130, 60, 250, 440, 630, 820, -700, -510, -320, -130, 60, 250, 440], + "nhwc_dp4a_im2col_per_channel_3x3_c32_oc32_input_w_scale": [0.01, 0.0109, 0.0118, 0.0127, 0.0136, 0.0145, 0.0154, 0.0163, 0.0172, 0.0181, 0.019, 0.0199, 0.0208, 0.0217, 0.0226, 0.0235, 0.0244, 0.0253, 0.0262, 0.0271, 0.028, 0.0289, 0.0298, 0.01, 0.0109, 0.0118, 0.0127, 0.0136, 0.0145, 0.0154, 0.0163, 0.0172], + "nhwc_dp4a_im2col_per_channel_3x3_c32_oc32_input_w_zero_point": [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, -5, -4, -3, -2, -1, 0, 1, 2], + "nhwc_bias_x_uint8_67": [0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255, 16, 33, 50, 67, 84, 101, 118, 135, 152, 169, 186, 203, 220, 237, 254, 15, 32, 49, 66, 83, 100, 117, 134, 151, 168, 185, 202, 219, 236, 253, 14, 31, 48, 65, 82, 99, 116, 133, 150, 167, 184, 201, 218, 235, 252, 13, 30, 47, 64, 81, 98], + "nhwc_bias_w_int8_71": [-128, -99, -70, -41, -12, 17, 46, 75, 104, -123, -94, -65, -36, -7, 22, 51, 80, 109, -118, -89, -60, -31, -2, 27, 56, 85, 114, -113, -84, -55, -26, 3, 32, 61, 90, 119, -108, -79, -50, -21, 8, 37, 66, 95, 124, -103, -74, -45, -16, 13, 42, 71, 100, -127, -98, -69, -40, -11, 18, 47, 76, 105, -122, -93, -64, -35, -6, 23, 52, 81, 110], + "nhwc_bias_w_int8_13": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96], + "nhwc_bias_x_int8_67": [-128, -111, -94, -77, -60, -43, -26, -9, 8, 25, 42, 59, 76, 93, 110, 127, -112, -95, -78, -61, -44, -27, -10, 7, 24, 41, 58, 75, 92, 109, 126, -113, -96, -79, -62, -45, -28, -11, 6, 23, 40, 57, 74, 91, 108, 125, -114, -97, -80, -63, -46, -29, -12, 5, 22, 39, 56, 73, 90, 107, 124, -115, -98, -81, -64, -47, -30], + "nhwc_bias_w_uint8_71": [0, 29, 58, 87, 116, 145, 174, 203, 232, 5, 34, 63, 92, 121, 150, 179, 208, 237, 10, 39, 68, 97, 126, 155, 184, 213, 242, 15, 44, 73, 102, 131, 160, 189, 218, 247, 20, 49, 78, 107, 136, 165, 194, 223, 252, 25, 54, 83, 112, 141, 170, 199, 228, 1, 30, 59, 88, 117, 146, 175, 204, 233, 6, 35, 64, 93, 122, 151, 180, 209, 238], + "nhwc_bias_w_zero_point_uint8_32": [128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125, 133, 128, 125], + "nhwc_bias_B_int32_32_2": [-16384, -8465, -546, 7373, 15292, -9557, -1638, 6281, 14200, -10649, -2730, 5189, 13108, -11741, -3822, 4097, 12016, -12833, -4914, 3005, 10924, -13925, -6006, 1913, 9832, -15017, -7098, 821, 8740, -16109, -8190, -271], + "nhwc_bias_B_int32_16": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "nhwc_bias_nonperiodic_B_int32_32": [-16384, -8465, -546, 7373, 15292, -9557, -1638, 6281, 14200, -10649, -2730, 5189, 13108, -11741, -3822, 4097, 12016, -12833, -4914, 3005, 10924, -13925, -6006, 1913, 9832, -15017, -7098, 821, 8740, -16109, -8190, -271] + }, + "cases": [ + { + "name": "same_upper_stride2_autopad", + "provenance": { + "source": "ONNX Runtime's CPU provider (QLinearConv-10)", + "notes": "QLinearConv inherits Conv auto_pad semantics. This fixture exercises the exact SAME_UPPER spelling and derived asymmetric bottom/right padding; unit scales and zero points make the expected requantized values equal the integer convolution sums. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "auto_pad": "SAME_UPPER", "kernel_shape": [3, 3], "strides": [2, 2] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 4, 4], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/same_upper_stride2_autopad_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 3, 3], "data": { "kind": "constant", "value": 1 } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 1, 2, 2], + "data": { "kind": "values", "values": [54, 45, 72, 54] }, + "tolerance": 0 + } + } + }, + { + "name": "same_lower_stride2_autopad", + "provenance": { + "source": "ONNX Runtime's CPU provider (QLinearConv-10)", + "notes": "ONNX auto_pad SAME_LOWER places the odd padding element at the start of the axis. The nonzero leading pad verifies that execution uses the derived padding rather than unrelated explicit pad attributes. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "auto_pad": "SAME_LOWER", "strides": [2, 2] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 4, 4], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/same_upper_stride2_autopad_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 3, 3], "data": { "kind": "constant", "value": 1 } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 2, 2], "tolerance": 0 } } + }, + { + "name": "uint8_padding", + "attrs": { "strides": [1, 1], "pads": [1, 1, 1, 1], "channels_last": 0 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 3, 3], + "data": { "kind": "values", "values": [128, 129, 130, 131, 132, 133, 134, 135, 136] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [127, 128, 129, 130] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 4, 4] } }, + "provenance": { + "notes": "Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider. The layout attribute is spelled explicitly so the explicit and default spellings are both covered." + } + }, + { + "name": "int8_output", + "inputs": { + "x": { + "dtype": "int8", + "shape": [1, 1, 3, 3], + "data": { "kind": "values", "values": [-4, 3, -2, 1, 0, -1, 2, -3, 4] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "int8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1, -1, 2, -2] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } } + }, + "outputs": { "y": { "dtype": "int8", "shape": [1, 1, 2, 2] } }, + "attrs": {}, + "provenance": { + "notes": "Signed output storage with a nonzero output zero point. The input is not a ramp, so the 2x2 kernel gives each output position its own response. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + } + }, + { + "name": "dilated_stride2_padding_saturates_u8", + "attrs": { "strides": [2, 2], "dilations": [2, 2], "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 5, 5], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/dilated_stride2_padding_saturates_u8_input_x" } + } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.05] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [0, 255, 255, 0] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.04] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.001] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 3, 3], "tolerance": 0 } }, + "provenance": { + "notes": "Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + } + }, + { + "name": "ort_style_multi_channel_four_outputs_pad1_u8", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.WithBias_2D", + "notes": "Adapts the handwritten 2D multi-channel/multi-output QLinearConv shape without optional bias. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 2, 4, 4], + "data": { "kind": "cycle", "values": [135, 140, 128, 120, 150, 110, 160, 100] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { + "dtype": "uint8", + "shape": [4, 2, 3, 3], + "data": { "kind": "cycle", "values": [110, 115, 105, 130, 100, 125] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.03] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [110] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [121] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 4, 4, 4], "tolerance": 0 } } + }, + { + "name": "ort_style_group3_stride2_pad1_u8", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.WithGroup_2D", + "notes": "Covers grouped convolution with group=3 and stride=2 using symmetric padding supported by the WebGPU manifest. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "group": 3, "strides": [2, 2], "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 6, 5, 5], + "data": { "kind": "cycle", "values": [98, 166, 219, 195, 46, 97, 27, 211, 239, 1] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.01] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [135] } }, + "w": { + "dtype": "uint8", + "shape": [6, 2, 3, 3], + "data": { "kind": "cycle", "values": [220, 111, 73, 254, 235, 151, 6, 156, 129, 204, 234, 198] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [110] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.04] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [121] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 6, 3, 3], "tolerance": 0 } } + }, + { + "name": "ort_u8s8_depthwise_no_bias", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8S8_Depthwise_NoBias", + "notes": "Adapts ORT's depthwise no-bias coverage using scalar quantization and group=in_channels. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "group": 3, "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 3, 3, 3], + "data": { "kind": "cycle", "values": [4, 31, 63, 95, 127, 159, 191, 223, 255] } + }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.04] } }, + "x_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [4] } }, + "w": { "dtype": "int8", "shape": [3, 1, 2, 2], "data": { "kind": "cycle", "values": [-63, -17, 0, 23, 63] } }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "w_zero_point": { "dtype": "int8", "shape": [], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.5] } }, + "y_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [80] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 3, 4, 4], "tolerance": 0 } } + }, + { + "name": "ort_1d_u8s8_pad1", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv1D_U8S8", + "notes": "Compact 1D convolution with symmetric padding. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "pads": [1, 1] }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 1, 5], "data": { "kind": "values", "values": [10, 11, 12, 13, 14] } }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [10] } }, + "w": { "dtype": "int8", "shape": [1, 1, 3], "data": { "kind": "values", "values": [1, 2, 3] } }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "int8", "shape": [], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [100] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 1, 5], + "data": { "kind": "values", "values": [103, 108, 114, 120, 111] }, + "tolerance": 0 + } + } + }, + { + "name": "ort_1d_s8s8_pointwise_signed_output", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv1D_S8S8_Pointwise", + "notes": "Compact signed 1D pointwise convolution. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "inputs": { + "x": { "dtype": "int8", "shape": [1, 1, 4], "data": { "kind": "values", "values": [-3, -2, -1, 0] } }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "int8", "shape": [], "data": { "kind": "values", "values": [-3] } }, + "w": { "dtype": "int8", "shape": [1, 1, 1], "data": { "kind": "values", "values": [4] } }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "int8", "shape": [], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "int8", "shape": [], "data": { "kind": "values", "values": [-10] } } + }, + "outputs": { + "y": { + "dtype": "int8", + "shape": [1, 1, 4], + "data": { "kind": "values", "values": [-10, -6, -2, 2] }, + "tolerance": 0 + } + }, + "attrs": {} + }, + { + "name": "ncw1d_scalar_bias", + "provenance": { + "source": "ONNX Operators.md, QLinearConv", + "notes": "A one-dimensional quantized convolution carrying a bias, which is the ordinary audio form. The bias is non-zero so the case proves it is applied, not merely that a route exists. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "kernel_shape": [2], "pads": [0, 0] }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 1, 4], "data": { "kind": "values", "values": [1, 2, 3, 4] } }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "int8", "shape": [1, 1, 2], "data": { "kind": "values", "values": [1, 1] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [10] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 1, 3], + "data": { "kind": "values", "values": [13, 15, 17] }, + "tolerance": 0 + } + } + }, + { + "name": "ncw1d_per_channel_weight_quantization", + "provenance": { + "source": "ONNX Operators.md, QLinearConv", + "notes": "One-dimensional convolution uses weights quantized independently per output channel. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "kernel_shape": [2], "pads": [0, 0] }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 1, 4], "data": { "kind": "values", "values": [1, 2, 3, 4] } }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "int8", "shape": [2, 1, 2], "data": { "kind": "values", "values": [1, 1, 2, -1] } }, + "w_scale": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1.0, 1.0] } }, + "w_zero_point": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [0, 0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 2, 3], + "data": { "kind": "values", "values": [3, 5, 7, 0, 1, 2] }, + "tolerance": 0 + } + } + }, + { + "name": "ncdhw3d_scalar_bias", + "provenance": { + "source": "ONNX Operators.md, QLinearConv", + "notes": "A three-dimensional quantized convolution includes a nonzero bias. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "kernel_shape": [2, 2, 2], "pads": [0, 0, 0, 0, 0, 0] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 2, 2, 2], + "data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { + "dtype": "int8", + "shape": [1, 1, 2, 2, 2], + "data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1, 1, 1] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [4] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 1, 1, 1, 1], + "data": { "kind": "values", "values": [40] }, + "tolerance": 0 + } + } + }, + { + "name": "ort_3d_u8s8_compact", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv3D_U8S8", + "notes": "Compact deterministic adaptation of ORT's 3D uint8-input/int8-weight QLinearConv coverage. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider. The layout attribute is spelled explicitly so the explicit and default spellings are both covered." + }, + "attrs": { "strides": [1, 1, 1], "channels_last": 0 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 2, 2, 2, 2], + "data": { "kind": "values", "values": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] } + }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.05] } }, + "x_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [4] } }, + "w": { "dtype": "int8", "shape": [1, 2, 2, 1, 1], "data": { "kind": "values", "values": [2, -3, 4, 1] } }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "w_zero_point": { "dtype": "int8", "shape": [], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.025] } }, + "y_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [54] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 1, 1, 2, 2], + "tolerance": 0, + "data": { "kind": "values", "values": [62, 63, 64, 65] } + } + } + }, + { + "name": "ort_per_channel_weight_zero_points_u8s8", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8S8_PerChannelZeroPoints", + "notes": "Compact mixed uint8 activation / int8 weight per-output-channel quantization case without optional bias. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 2, 2, 2], + "data": { "kind": "values", "values": [120, 128, 136, 144, 100, 110, 130, 150] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.2] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "int8", "shape": [2, 2, 1, 1], "data": { "kind": "values", "values": [-8, 12, 16, -4] } }, + "w_scale": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [0.25, 0.5] } }, + "w_zero_point": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [-2, 6] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 2, 2, 2], + "data": { "kind": "values", "values": [59, 78, 124, 170, 208, 200, 152, 104] }, + "tolerance": 0 + } + }, + "attrs": {} + }, + { + "name": "ort_pointwise_2d_with_bias", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.WithBias_2D", + "notes": "Compact ORT-valid pointwise adaptation that preserves optional int32 bias semantics. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [10, 11, 12, 13] } }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [10] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 1, 1], "data": { "kind": "values", "values": [14] } }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [10] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [100] } }, + "B": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [-2] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 1, 2, 2], + "data": { "kind": "values", "values": [98, 102, 106, 110] }, + "tolerance": 0 + } + }, + "attrs": {} + }, + { + "name": "requant_exact_half_ties_to_even", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8S8_Requantize_NoBias", + "notes": "ONNX quantized convolution requantization uses ORT's RoundHalfToEven helper; pointwise accumulators +/-1 and +/-5 with y_scale=2 produce exact +/-0.5 and +/-2.5 tie values. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 1, 1, 1], "data": { "kind": "values", "values": [1] } }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "int8", "shape": [4, 1, 1, 1], "data": { "kind": "values", "values": [1, -1, 5, -5] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 4, 1, 1], + "tolerance": 0, + "data": { "kind": "values", "values": [128, 128, 130, 126] } + } + }, + "attrs": {} + }, + { + "name": "requant_huge_finite_saturates_before_i32_overflow", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8S8_Pointwise", + "notes": "Finite requantized outputs far outside uint8 must saturate; the scalar WebGPU requant pass currently converts to i32 before clamping. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 1, 1, 1], "data": { "kind": "values", "values": [1] } }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "int8", "shape": [2, 1, 1, 1], "data": { "kind": "values", "values": [1, -1] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1e-20] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 2, 1, 1], + "tolerance": 0, + "data": { "kind": "values", "values": [255, 0] } + } + }, + "attrs": {} + }, + { + "name": "dp4a_pointwise_u8s8_c8_batched", + "inputs": { + "x": { + "dtype": "uint8", + "shape": [2, 8, 3, 5], + "data": { + "kind": "cycle", + "values": [0, 255, 128, 127, 56, 77, 3, 100, 200, 42, 5, 19, 64, 88, 33, 7, 125, 90, 211, 16] + } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [113] } }, + "w": { + "dtype": "int8", + "shape": [6, 8, 1, 1], + "data": { + "kind": "cycle", + "values": [-77, 3, 100, -100, 42, -5, 19, -64, 88, -33, 7, 125, -90, -128, 127, 0, -1, 56] + } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-7] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.4] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [2, 6, 3, 5], "tolerance": 0 } }, + "attrs": { "channels_last": 0 }, + "provenance": { + "notes": "Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider. The layout attribute is spelled explicitly so the explicit and default spellings are both covered." + } + }, + { + "name": "dp4a_im2col_u8s8_oc64_c16_3x3_24x24", + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 16, 24, 24], + "data": { "kind": "cycle", "values": [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 8] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "cycle", "values": [2] } }, + "w": { + "dtype": "int8", + "shape": [64, 16, 3, 3], + "data": { "kind": "cycle", "values": [2, -1, 3, -2, 1, 4, -3, 2, 0, -4] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "cycle", "values": [1] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.002] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "cycle", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 64, 22, 22] } }, + "attrs": {}, + "provenance": { + "notes": "The dot4 im2col route over 16 input channels. A ten-value weight cycle does not tile the nine taps of a 3x3 kernel, so every output channel carries its own filter, and the output scale resolves the accumulator instead of quantizing every position onto the zero point. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + } + }, + { + "name": "feature_independent_x4_group2_octile4_odd_width_compact", + "provenance": { + "notes": "Compact grouped 3x3 QLinearConv with four output channels per group and an odd output width checks exact quantized results at a spatial tail. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "group": 2, "strides": [1, 1], "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 4, 5, 5], + "data": { "kind": "cycle", "values": [0, 17, 63, 127, 128, 191, 255] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [8, 2, 3, 3], + "data": { "kind": "cycle", "values": [-127, -31, -1, 0, 7, 63, 126] } + }, + "w_scale": { + "dtype": "float32", + "shape": [8], + "data": { "kind": "values", "values": [0.01, 0.012, 0.014, 0.016, 0.018, 0.02, 0.022, 0.024] } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [8], + "data": { "kind": "values", "values": [-7, -3, -1, 0, 2, 4, 6, 9] } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [129] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 8, 5, 5], "tolerance": 0 } } + }, + { + "name": "dp4a_im2col_bias_tail_k27_baseline_exact", + "provenance": { + "notes": "Odd K=27 and int32 bias check exact quantized convolution through the final three reduction elements. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "strides": [1, 1], "pads": [0, 0, 0, 0] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 3, 5, 5], + "data": { "kind": "cycle", "values": [0, 17, 63, 127, 128, 191, 255] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [121] } }, + "w": { + "dtype": "int8", + "shape": [8, 3, 3, 3], + "data": { "kind": "cycle", "values": [-128, -77, -5, 0, 7, 42, 88, 127] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.03] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-4] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [4.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "B": { + "dtype": "int32", + "shape": [8], + "data": { "kind": "values", "values": [-4096, -31, -1, 0, 1, 29, 1024, 4096] } + } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 8, 3, 3], "tolerance": 0 } } + }, + { + "name": "dp4a_im2col_3d_u8s8_b1c4m8_4x8x8_k3", + "provenance": { + "source": "ONNX QLinearConv-10 volumetric convolution", + "notes": "A 3-D (volumetric) quantized convolution with a 3x3x3 kernel, zero-point-filled spatial padding and per-output-channel quantization checks 4 input and 8 output channels. Carried over from the ai.onnx QLinearConv-10 fixture of the same name; expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "pads": [1, 1, 1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 4, 4, 8, 8], + "data": { "kind": "cycle", "values": [0, 17, 63, 127, 128, 191, 255] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [8, 4, 3, 3, 3], + "data": { "kind": "cycle", "values": [-127, -31, -1, 0, 7, 63, 126] } + }, + "w_scale": { + "dtype": "float32", + "shape": [8], + "data": { "kind": "values", "values": [0.01, 0.012, 0.014, 0.016, 0.018, 0.02, 0.022, 0.024] } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [8], + "data": { "kind": "values", "values": [-7, -3, -1, 0, 2, 4, 6, 9] } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [129] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 8, 4, 8, 8], "tolerance": 0 } } + }, + { + "name": "empty_zero_dim", + "attrs": { "strides": [1, 1] }, + "inputs": { + "x": { "dtype": "uint8", "shape": [0, 4, 2, 2], "data": { "kind": "values", "values": [] } }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "uint8", "shape": [2, 4, 1, 1], "data": { "kind": "constant", "value": 128 } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [0, 2, 2, 2], "tolerance": 0 } }, + "provenance": { + "notes": "Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + } + }, + { + "name": "per_channel_grouped_requant_oc_indexing_g4_i8", + "attrs": { "group": 4, "strides": [1, 1], "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "int8", + "shape": [1, 8, 4, 4], + "data": { + "kind": "cycle", + "values": { "$ref": "#/fixtureArrays/per_channel_grouped_requant_oc_indexing_g4_i8_input_x" } + } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.05] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [4] } }, + "w": { + "dtype": "int8", + "shape": [8, 2, 3, 3], + "data": { + "kind": "cycle", + "values": { "$ref": "#/fixtureArrays/per_channel_grouped_requant_oc_indexing_g4_i8_input_w" } + } + }, + "w_scale": { + "dtype": "float32", + "shape": [8], + "data": { "kind": "values", "values": [0.1, 0.13, 0.16, 0.09, 0.2, 0.07, 0.11, 0.14] } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [8], + "data": { "kind": "values", "values": [-10, -4, 6, 0, 3, -7, 5, -2] } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-5] } } + }, + "outputs": { "y": { "dtype": "int8", "shape": [1, 8, 4, 4], "tolerance": 0 } }, + "provenance": { + "notes": "Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + } + }, + { + "name": "conv3d_depth_dilation2_compact", + "provenance": { + "source": "ONNX QLinearConv-10 volumetric dilation semantics", + "notes": "A three-dimensional quantized convolution uses a nondefault depth dilation. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "strides": [1, 1, 1], "dilations": [2, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 4, 2, 2], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/same_upper_stride2_autopad_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 2, 1, 1], "data": { "kind": "values", "values": [1, 2] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 1, 2, 2, 2], + "data": { "kind": "values", "values": [19, 22, 25, 28, 31, 34, 37, 40] } + } + } + }, + { + "name": "ort_u8s8_group2_small", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8S8_Groups", + "notes": "Adapts QLinearConvTest.Conv2D_U8S8_Groups with two groups and scalar weight quantization. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "group": 2 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 4, 3, 3], + "data": { "kind": "cycle", "values": [4, 17, 33, 65, 97, 129, 161, 193, 225, 255] } + }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.05] } }, + "x_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [4] } }, + "w": { + "dtype": "int8", + "shape": [4, 2, 2, 2], + "data": { "kind": "cycle", "values": [-63, -45, -18, -1, 0, 7, 23, 49, 63] } + }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "w_zero_point": { "dtype": "int8", "shape": [], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.76] } }, + "y_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [88] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 4, 2, 2], "tolerance": 0 } } + }, + { + "name": "mixed_u8_i8_uint8_output_dilated_pad1", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8S8_Dilations", + "notes": "Exercises the ORT-covered mixed uint8 activation / int8 weight quantization path with dilation. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "attrs": { "dilations": [2, 2], "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 5, 5], + "data": { "kind": "cycle", "values": [0, 32, 96, 127, 128, 160, 224, 255] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.04] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "int8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [-128, 127, -32, 96] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.01] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 5, 5], "tolerance": 0 } } + }, + { + "name": "dp4a_pointwise_per_channel_bias_compact", + "provenance": { + "source": "ONNX QLinearConv-10 per-output-channel quantization", + "notes": "Locks the common per-channel weight-scale/zero-point plus int32 bias combination on an aligned pointwise DP4A shape. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 4, 3, 3], + "data": { "kind": "cycle", "values": [0, 17, 128, 255, 63, 191] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { + "dtype": "int8", + "shape": [4, 4, 1, 1], + "data": { "kind": "cycle", "values": [-127, -13, 0, 11, 63, 126] } + }, + "w_scale": { + "dtype": "float32", + "shape": [4], + "data": { "kind": "values", "values": [0.01, 0.015, 0.02, 0.025] } + }, + "w_zero_point": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [-3, 0, 2, 5] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.5] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "B": { "dtype": "int32", "shape": [4], "data": { "kind": "values", "values": [-17, 0, 31, 4096] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 4, 3, 3], "tolerance": 0 } }, + "attrs": {} + }, + { + "name": "nhwc_same_upper_stride2_autopad", + "provenance": { + "source": "ONNX Runtime's CPU provider (QLinearConv-10)", + "notes": "QLinearConv inherits Conv auto_pad semantics. This fixture exercises the exact SAME_UPPER spelling and derived asymmetric bottom/right padding; unit scales and zero points make the expected requantized values equal the integer convolution sums. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. Automatic padding is derived from the spatial axes, which move under the layout attribute." + }, + "attrs": { "auto_pad": "SAME_UPPER", "kernel_shape": [3, 3], "strides": [2, 2], "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 4, 4, 1], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/same_upper_stride2_autopad_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 3, 3], "data": { "kind": "constant", "value": 1 } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 2, 2, 1], + "data": { "kind": "values", "values": [54, 45, 72, 54] }, + "tolerance": 0 + } + } + }, + { + "name": "nhwc_uint8_padding", + "attrs": { "strides": [1, 1], "pads": [1, 1, 1, 1], "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 3, 3, 1], + "data": { "kind": "values", "values": [128, 129, 130, 131, 132, 133, 134, 135, 136] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [127, 128, 129, 130] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 4, 4, 1] } }, + "provenance": { + "notes": "Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The activation generator fills the permuted shape, so the expected values come from the trusted CPU reference rather than being permuted from the channel-first spelling. Explicit padding with a wider output than input." + } + }, + { + "name": "nhwc_int8_output", + "inputs": { + "x": { + "dtype": "int8", + "shape": [1, 3, 3, 1], + "data": { "kind": "values", "values": [-4, 3, -2, 1, 0, -1, 2, -3, 4] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "int8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [1, -1, 2, -2] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } } + }, + "outputs": { "y": { "dtype": "int8", "shape": [1, 2, 2, 1] } }, + "attrs": { "channels_last": 1 }, + "provenance": { + "notes": "Signed output storage with a nonzero output zero point. The input is not a ramp, so the 2x2 kernel gives each output position its own response. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The activation generator fills the permuted shape, so the expected values come from the trusted CPU reference rather than being permuted from the channel-first spelling. Signed activation, weight and output." + } + }, + { + "name": "nhwc_dilated_stride2_padding", + "attrs": { "strides": [2, 2], "dilations": [2, 2], "pads": [1, 1, 1, 1], "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 5, 5, 1], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/dilated_stride2_padding_saturates_u8_input_x" } + } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.05] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [0, 255, 255, 0] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.04] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.001] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 3, 3, 1], "tolerance": 0 } }, + "provenance": { + "notes": "Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The activation generator fills the permuted shape, so the expected values come from the trusted CPU reference rather than being permuted from the channel-first spelling. Stride, dilation and padding together in the permuted index map." + } + }, + { + "name": "nhwc_multi_channel_four_outputs_pad1", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.WithBias_2D", + "notes": "Adapts the handwritten 2D multi-channel/multi-output QLinearConv shape without optional bias. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The activation generator fills the permuted shape, so the expected values come from the trusted CPU reference rather than being permuted from the channel-first spelling. Four output channels over two input channels make a wrong channel index visible." + }, + "attrs": { "pads": [1, 1, 1, 1], "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 4, 4, 2], + "data": { "kind": "cycle", "values": [135, 140, 128, 120, 150, 110, 160, 100] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { + "dtype": "uint8", + "shape": [4, 2, 3, 3], + "data": { "kind": "cycle", "values": [110, 115, 105, 130, 100, 125] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.03] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [110] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [121] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 4, 4, 4], "tolerance": 0 } } + }, + { + "name": "nhwc_group3_stride2_pad1", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.WithGroup_2D", + "notes": "Covers grouped convolution with group=3 and stride=2 using symmetric padding supported by the WebGPU manifest. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The activation generator fills the permuted shape, so the expected values come from the trusted CPU reference rather than being permuted from the channel-first spelling. Three groups make a wrong group index visible." + }, + "attrs": { "group": 3, "strides": [2, 2], "pads": [1, 1, 1, 1], "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 5, 5, 6], + "data": { "kind": "cycle", "values": [98, 166, 219, 195, 46, 97, 27, 211, 239, 1] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.01] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [135] } }, + "w": { + "dtype": "uint8", + "shape": [6, 2, 3, 3], + "data": { "kind": "cycle", "values": [220, 111, 73, 254, 235, 151, 6, 156, 129, 204, 234, 198] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [110] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.04] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [121] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 3, 3, 6], "tolerance": 0 } } + }, + { + "name": "nhwc_depthwise_pad1", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8S8_Depthwise_NoBias", + "notes": "Adapts ORT's depthwise no-bias coverage using scalar quantization and group=in_channels. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The activation generator fills the permuted shape, so the expected values come from the trusted CPU reference rather than being permuted from the channel-first spelling. Depthwise convolution over three channels." + }, + "attrs": { "group": 3, "pads": [1, 1, 1, 1], "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 3, 3, 3], + "data": { "kind": "cycle", "values": [4, 31, 63, 95, 127, 159, 191, 223, 255] } + }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.04] } }, + "x_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [4] } }, + "w": { "dtype": "int8", "shape": [3, 1, 2, 2], "data": { "kind": "cycle", "values": [-63, -17, 0, 23, 63] } }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "w_zero_point": { "dtype": "int8", "shape": [], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.5] } }, + "y_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [80] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 4, 4, 3], "tolerance": 0 } } + }, + { + "name": "nhwc_1d_pad1", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv1D_U8S8", + "notes": "Compact 1D convolution with symmetric padding. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. One spatial axis, so the layout moves a single dimension." + }, + "attrs": { "pads": [1, 1], "channels_last": 1 }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 5, 1], "data": { "kind": "values", "values": [10, 11, 12, 13, 14] } }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [10] } }, + "w": { "dtype": "int8", "shape": [1, 1, 3], "data": { "kind": "values", "values": [1, 2, 3] } }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "int8", "shape": [], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [100] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 5, 1], + "data": { "kind": "values", "values": [103, 108, 114, 120, 111] }, + "tolerance": 0 + } + } + }, + { + "name": "nhwc_1d_pointwise_signed", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv1D_S8S8_Pointwise", + "notes": "Compact signed 1D pointwise convolution. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. One spatial axis with a signed activation and output." + }, + "inputs": { + "x": { "dtype": "int8", "shape": [1, 4, 1], "data": { "kind": "values", "values": [-3, -2, -1, 0] } }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "int8", "shape": [], "data": { "kind": "values", "values": [-3] } }, + "w": { "dtype": "int8", "shape": [1, 1, 1], "data": { "kind": "values", "values": [4] } }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "int8", "shape": [], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "int8", "shape": [], "data": { "kind": "values", "values": [-10] } } + }, + "outputs": { + "y": { + "dtype": "int8", + "shape": [1, 4, 1], + "data": { "kind": "values", "values": [-10, -6, -2, 2] }, + "tolerance": 0 + } + }, + "attrs": { "channels_last": 1 } + }, + { + "name": "nhwc_1d_scalar_bias", + "provenance": { + "source": "ONNX Operators.md, QLinearConv", + "notes": "A one-dimensional quantized convolution carrying a bias, which is the ordinary audio form. The bias is non-zero so the case proves it is applied, not merely that a route exists. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. One spatial axis with a pre-quantized bias." + }, + "attrs": { "kernel_shape": [2], "pads": [0, 0], "channels_last": 1 }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 4, 1], "data": { "kind": "values", "values": [1, 2, 3, 4] } }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "int8", "shape": [1, 1, 2], "data": { "kind": "values", "values": [1, 1] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [10] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 3, 1], + "data": { "kind": "values", "values": [13, 15, 17] }, + "tolerance": 0 + } + } + }, + { + "name": "nhwc_1d_per_channel", + "provenance": { + "source": "ONNX Operators.md, QLinearConv", + "notes": "One-dimensional convolution uses weights quantized independently per output channel. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. One spatial axis with per-output-channel weight quantization." + }, + "attrs": { "kernel_shape": [2], "pads": [0, 0], "channels_last": 1 }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 4, 1], "data": { "kind": "values", "values": [1, 2, 3, 4] } }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "int8", "shape": [2, 1, 2], "data": { "kind": "values", "values": [1, 1, 2, -1] } }, + "w_scale": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1.0, 1.0] } }, + "w_zero_point": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [0, 0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 3, 2], + "data": { "kind": "values", "values": [3, 0, 5, 1, 7, 2] }, + "tolerance": 0 + } + } + }, + { + "name": "nhwc_3d_scalar_bias", + "provenance": { + "source": "ONNX Operators.md, QLinearConv", + "notes": "A three-dimensional quantized convolution includes a nonzero bias. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. Three spatial axes with a pre-quantized bias." + }, + "attrs": { "kernel_shape": [2, 2, 2], "pads": [0, 0, 0, 0, 0, 0], "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 2, 2, 2, 1], + "data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { + "dtype": "int8", + "shape": [1, 1, 2, 2, 2], + "data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1, 1, 1] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [4] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 1, 1, 1, 1], + "data": { "kind": "values", "values": [40] }, + "tolerance": 0 + } + } + }, + { + "name": "nhwc_3d_compact", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv3D_U8S8", + "notes": "Compact deterministic adaptation of ORT's 3D uint8-input/int8-weight QLinearConv coverage. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. Three spatial axes with two input channels." + }, + "attrs": { "strides": [1, 1, 1], "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 2, 2, 2, 2], + "data": { "kind": "values", "values": [4, 12, 5, 13, 6, 14, 7, 15, 8, 16, 9, 17, 10, 18, 11, 19] } + }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.05] } }, + "x_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [4] } }, + "w": { "dtype": "int8", "shape": [1, 2, 2, 1, 1], "data": { "kind": "values", "values": [2, -3, 4, 1] } }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "w_zero_point": { "dtype": "int8", "shape": [], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.025] } }, + "y_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [54] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 1, 2, 2, 1], + "tolerance": 0, + "data": { "kind": "values", "values": [62, 63, 64, 65] } + } + } + }, + { + "name": "nhwc_3d_depth_dilation2", + "provenance": { + "source": "ONNX QLinearConv-10 volumetric dilation semantics", + "notes": "A three-dimensional quantized convolution uses a nondefault depth dilation. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. Three spatial axes with dilation on the depth axis only." + }, + "attrs": { "strides": [1, 1, 1], "dilations": [2, 1, 1], "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 4, 2, 2, 1], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/same_upper_stride2_autopad_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 2, 1, 1], "data": { "kind": "values", "values": [1, 2] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 2, 2, 2, 1], + "data": { "kind": "values", "values": [19, 22, 25, 28, 31, 34, 37, 40] } + } + } + }, + { + "name": "nhwc_per_channel_weight_zero_points", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8S8_PerChannelZeroPoints", + "notes": "Compact mixed uint8 activation / int8 weight per-output-channel quantization case without optional bias. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. Per-output-channel weight zero points with a signed weight." + }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 2, 2, 2], + "data": { "kind": "values", "values": [120, 100, 128, 110, 136, 130, 144, 150] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.2] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "int8", "shape": [2, 2, 1, 1], "data": { "kind": "values", "values": [-8, 12, 16, -4] } }, + "w_scale": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [0.25, 0.5] } }, + "w_zero_point": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [-2, 6] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 2, 2, 2], + "data": { "kind": "values", "values": [59, 208, 78, 200, 124, 152, 170, 104] }, + "tolerance": 0 + } + }, + "attrs": { "channels_last": 1 } + }, + { + "name": "nhwc_grouped_per_channel_weight_zero_points", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8U8_Groups_PerChannelZeroPoints", + "notes": "Compact grouped 1x1 projection with per-output-channel weight scales and zero-points. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. Two groups with per-output-channel weight zero points." + }, + "attrs": { "group": 2, "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 2, 2, 4], + "data": { + "kind": "values", + "values": [120, 100, 126, 90, 128, 110, 130, 120, 136, 130, 134, 160, 144, 150, 138, 200] + } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { + "dtype": "uint8", + "shape": [4, 2, 1, 1], + "data": { "kind": "values", "values": [100, 120, 140, 160, 110, 130, 170, 90] } + }, + "w_scale": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.5, 0.25, 0.4, 0.3] } }, + "w_zero_point": { "dtype": "uint8", "shape": [4], "data": { "kind": "values", "values": [100, 150, 120, 80] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.5] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 2, 2, 4], + "data": { + "kind": "values", + "values": [0, 102, 55, 43, 37, 105, 107, 142, 137, 119, 179, 255, 237, 135, 251, 255] + }, + "tolerance": 0 + } + } + }, + { + "name": "nhwc_pointwise_with_bias", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.WithBias_2D", + "notes": "Compact ORT-valid pointwise adaptation that preserves optional int32 bias semantics. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. A 1x1 kernel with a pre-quantized bias." + }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 2, 2, 1], "data": { "kind": "values", "values": [10, 11, 12, 13] } }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [10] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 1, 1], "data": { "kind": "values", "values": [14] } }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [10] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [100] } }, + "B": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [-2] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 2, 2, 1], + "data": { "kind": "values", "values": [98, 102, 106, 110] }, + "tolerance": 0 + } + }, + "attrs": { "channels_last": 1 } + }, + { + "name": "nhwc_requant_exact_half_ties_to_even", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8S8_Requantize_NoBias", + "notes": "ONNX quantized convolution requantization uses ORT's RoundHalfToEven helper; pointwise accumulators +/-1 and +/-5 with y_scale=2 produce exact +/-0.5 and +/-2.5 tie values. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. Requantization ties land exactly on .5 and must round to even." + }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 1, 1, 1], "data": { "kind": "values", "values": [1] } }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "int8", "shape": [4, 1, 1, 1], "data": { "kind": "values", "values": [1, -1, 5, -5] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 1, 1, 4], + "tolerance": 0, + "data": { "kind": "values", "values": [128, 128, 130, 126] } + } + }, + "attrs": { "channels_last": 1 } + }, + { + "name": "nhwc_requant_huge_finite_saturates", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8S8_Pointwise", + "notes": "Finite requantized outputs far outside uint8 must saturate; the scalar WebGPU requant pass currently converts to i32 before clamping. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. A huge finite requantized value must saturate rather than wrap." + }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 1, 1, 1], "data": { "kind": "values", "values": [1] } }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "w": { "dtype": "int8", "shape": [2, 1, 1, 1], "data": { "kind": "values", "values": [1, -1] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1e-20] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 1, 1, 2], + "tolerance": 0, + "data": { "kind": "values", "values": [255, 0] } + } + }, + "attrs": { "channels_last": 1 } + }, + { + "name": "nhwc_per_channel_grouped_g4_i8", + "attrs": { "group": 4, "strides": [1, 1], "pads": [1, 1, 1, 1], "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "int8", + "shape": [1, 4, 4, 8], + "data": { + "kind": "cycle", + "values": { "$ref": "#/fixtureArrays/per_channel_grouped_requant_oc_indexing_g4_i8_input_x" } + } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.05] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [4] } }, + "w": { + "dtype": "int8", + "shape": [8, 2, 3, 3], + "data": { + "kind": "cycle", + "values": { "$ref": "#/fixtureArrays/per_channel_grouped_requant_oc_indexing_g4_i8_input_w" } + } + }, + "w_scale": { + "dtype": "float32", + "shape": [8], + "data": { "kind": "values", "values": [0.1, 0.13, 0.16, 0.09, 0.2, 0.07, 0.11, 0.14] } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [8], + "data": { "kind": "values", "values": [-10, -4, 6, 0, 3, -7, 5, -2] } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-5] } } + }, + "outputs": { "y": { "dtype": "int8", "shape": [1, 4, 4, 8], "tolerance": 0 } }, + "provenance": { + "notes": "Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The activation generator fills the permuted shape, so the expected values come from the trusted CPU reference rather than being permuted from the channel-first spelling. Four groups with per-output-channel scales exercise the channel index of the requantization pass." + } + }, + { + "name": "nhwc_group2_small", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8S8_Groups", + "notes": "Adapts QLinearConvTest.Conv2D_U8S8_Groups with two groups and scalar weight quantization. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The activation generator fills the permuted shape, so the expected values come from the trusted CPU reference rather than being permuted from the channel-first spelling. Two groups over a 2x2 kernel." + }, + "attrs": { "group": 2, "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 3, 3, 4], + "data": { "kind": "cycle", "values": [4, 17, 33, 65, 97, 129, 161, 193, 225, 255] } + }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.05] } }, + "x_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [4] } }, + "w": { + "dtype": "int8", + "shape": [4, 2, 2, 2], + "data": { "kind": "cycle", "values": [-63, -45, -18, -1, 0, 7, 23, 49, 63] } + }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "w_zero_point": { "dtype": "int8", "shape": [], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.76] } }, + "y_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [88] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 2, 2, 4], "tolerance": 0 } } + }, + { + "name": "nhwc_mixed_u8_i8_dilated_pad1", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8S8_Dilations", + "notes": "Exercises the ORT-covered mixed uint8 activation / int8 weight quantization path with dilation. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The activation generator fills the permuted shape, so the expected values come from the trusted CPU reference rather than being permuted from the channel-first spelling. Unsigned activation with a signed weight under dilation and padding." + }, + "attrs": { "dilations": [2, 2], "pads": [1, 1, 1, 1], "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 5, 5, 1], + "data": { "kind": "cycle", "values": [0, 32, 96, 127, 128, 160, 224, 255] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.04] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "int8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [-128, 127, -32, 96] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.01] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 5, 5, 1], "tolerance": 0 } } + }, + { + "name": "nhwc_empty_zero_dim", + "attrs": { "strides": [1, 1], "channels_last": 1 }, + "inputs": { + "x": { "dtype": "uint8", "shape": [0, 2, 2, 4], "data": { "kind": "values", "values": [] } }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "uint8", "shape": [2, 4, 1, 1], "data": { "kind": "constant", "value": 128 } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [0, 2, 2, 2], "tolerance": 0 } }, + "provenance": { + "notes": "Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The activation generator fills the permuted shape, so the expected values come from the trusted CPU reference rather than being permuted from the channel-first spelling. A zero-sized batch produces no output elements." + } + }, + { + "name": "nchw_dp4a_pointwise_c66_tail_oc32", + "provenance": { + "notes": "A 1x1 channel-first convolution whose 66 input channels leave a two-lane tail in the packed integer dot product, so the aligned word loop and the single guarded tail word both run." + }, + "attrs": {}, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 66, 16, 16], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { + "dtype": "int8", + "shape": [32, 66, 1, 1], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [1] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.0768] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [130] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 32, 16, 16], "tolerance": 0 } } + }, + { + "name": "nchw_dp4a_im2col_per_channel_3x3_c16_oc24", + "provenance": { + "notes": "A 3x3 channel-first convolution with per-output-channel weight scales and zero points, which drives the packed integer dot product's per-row requantization and per-row zero-point correction." + }, + "attrs": { "strides": [1, 1], "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 16, 24, 24], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [24, 16, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { + "dtype": "float32", + "shape": [24], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nchw_dp4a_im2col_per_channel_3x3_c16_oc24_input_w_scale" } + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [24], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nchw_dp4a_im2col_per_channel_3x3_c16_oc24_input_w_zero_point" } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.032] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 24, 24, 24], "tolerance": 0 } } + }, + { + "name": "nhwc_dp4a_pointwise_c64_oc96", + "provenance": { + "notes": "A 1x1 channels-last convolution whose activation is already the packed integer GEMM's row-major A operand, so only the weight is reordered into K-major columns." + }, + "attrs": { "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 16, 16, 64], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { + "dtype": "int8", + "shape": [96, 64, 1, 1], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [1] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.0768] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [130] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 16, 16, 96], "tolerance": 0 } } + }, + { + "name": "nhwc_dp4a_pointwise_c66_tail_oc32_s8x_u8w", + "provenance": { + "notes": "A 1x1 channels-last convolution with a signed activation, an unsigned weight and 66 input channels, so the packed dot product runs its guarded tail word on both operand signednesses." + }, + "attrs": { "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "int8", + "shape": [1, 16, 16, 66], + "data": { + "kind": "cycle", + "values": { "$ref": "#/fixtureArrays/nhwc_dp4a_pointwise_c66_tail_oc32_s8x_u8w_input_x" } + } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w": { + "dtype": "uint8", + "shape": [32, 66, 1, 1], + "data": { "kind": "cycle", "values": [140, 91, 216, 123, 181, 18, 152, 227, 57, 131, 108, 255, 32] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.0768] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [130] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 16, 16, 32], "tolerance": 0 } } + }, + { + "name": "nhwc_dp4a_pointwise_per_channel_bias_c32_oc16", + "provenance": { + "notes": "A 1x1 channels-last convolution with a pre-quantized bias and per-output-channel weight quantization, so the bias and the requantization scale are both indexed by the GEMM's output column." + }, + "attrs": { "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 8, 8, 32], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { + "dtype": "int8", + "shape": [16, 32, 1, 1], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { + "dtype": "float32", + "shape": [16], + "data": { + "kind": "values", + "values": [0.012, 0.0131, 0.0142, 0.0153, 0.0164, 0.0175, 0.0186, 0.0197, 0.0208, 0.0219, 0.023, 0.0241, 0.0252, 0.0263, 0.0274, 0.0285] + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [16], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nhwc_dp4a_pointwise_per_channel_bias_c32_oc16_input_w_zero_point" } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.102] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [129] } }, + "B": { + "dtype": "int32", + "shape": [16], + "data": { + "kind": "values", + "values": [-900, -640, -380, -120, 140, 400, 660, 920, 1180, -900, -640, -380, -120, 140, 400, 660] + } + } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 8, 8, 16], "tolerance": 0 } } + }, + { + "name": "nhwc_dp4a_im2col_per_channel_3x3_c32_oc32", + "provenance": { + "notes": "A 3x3 channels-last convolution: the column matrix is materialized in `(kh, kw, ic)` order so the input channel is the fastest axis of both the activation and the reduction, with per-output-channel weight quantization." + }, + "attrs": { "channels_last": 1, "strides": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 20, 20, 32], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [32, 32, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { + "dtype": "float32", + "shape": [32], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nhwc_dp4a_im2col_per_channel_3x3_c32_oc32_input_w_scale" } + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [32], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nhwc_dp4a_im2col_per_channel_3x3_c32_oc32_input_w_zero_point" } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.192] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 18, 18, 32], "tolerance": 0 } } + }, + { + "name": "nhwc_dp4a_im2col_k_tail_c9_oc32", + "provenance": { + "notes": "A 3x3 channels-last convolution whose 81-entry reduction is padded to 84 with the two zero points, so the padded lanes contribute exactly zero while the aligned vec4 path still runs." + }, + "attrs": { "channels_last": 1, "strides": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 20, 20, 9], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [32, 9, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [1] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.141] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 18, 18, 32], "tolerance": 0 } } + }, + { + "name": "nhwc_dp4a_im2col_bias_3x3_c8_oc16", + "provenance": { + "notes": "A small channels-last 3x3 quantized convolution with a pre-quantized bias verifies that bias is added at this size." + }, + "attrs": { "channels_last": 1, "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 6, 6, 8], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [16, 8, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [1] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.141] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "B": { + "dtype": "int32", + "shape": [16], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nhwc_dp4a_im2col_bias_3x3_c8_oc16_input_B" } + } + } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 6, 6, 16], "tolerance": 0 } } + }, + { + "name": "nhwc_dp4a_im2col_stride2_dilation2_pad1_c16_oc32", + "provenance": { + "notes": "A channels-last 3x3 convolution with stride 2, dilation 2 and one row and column of padding, so the column matrix's spatial addressing is exercised away from the unit-stride case." + }, + "attrs": { "channels_last": 1, "strides": [2, 2], "dilations": [2, 2], "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 40, 40, 16], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [32, 16, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [1] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.2231] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 19, 19, 32], "tolerance": 0 } } + }, + { + "name": "nhwc_channels_x4_group2_3x3", + "provenance": { + "notes": "A grouped channels-last convolution without integer dot-product support: four adjacent output channels share one group, so the vec4 accumulator's store is one contiguous run." + }, + "attrs": { "channels_last": 1, "group": 2, "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 10, 10, 8], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [16, 4, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { + "dtype": "float32", + "shape": [16], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nhwc_channels_x4_group2_3x3_input_w_scale" } + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [16], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nhwc_dp4a_pointwise_per_channel_bias_c32_oc16_input_w_zero_point" } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.1117] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 10, 10, 16], "tolerance": 0 } } + }, + { + "name": "nhwc_depthwise_x4_g8_3x3", + "provenance": { + "notes": "A depthwise channels-last convolution: one input and one output channel per group makes the activation gather of four adjacent channels the same contiguous run as the store." + }, + "attrs": { "channels_last": 1, "group": 8, "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 10, 10, 8], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [8, 1, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { + "dtype": "float32", + "shape": [8], + "data": { "kind": "values", "values": [0.01, 0.012, 0.014, 0.016, 0.018, 0.02, 0.022, 0.024] } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [8], + "data": { "kind": "values", "values": [-3, -2, -1, 0, 1, 2, 3, 4] } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.08] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 10, 10, 8], "tolerance": 0 } } + }, + { + "name": "ncw1d_per_channel_bias", + "provenance": { + "notes": "One spatial axis with per-output-channel weight quantization and a pre-quantized bias, the combination that makes the requantization pass read both the channel index and the bias." + }, + "attrs": { "kernel_shape": [3], "pads": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 3, 9], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [6, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { + "dtype": "float32", + "shape": [6], + "data": { "kind": "values", "values": [0.011, 0.014, 0.017, 0.02, 0.023, 0.026] } + }, + "w_zero_point": { "dtype": "int8", "shape": [6], "data": { "kind": "values", "values": [-3, -1, 0, 2, 4, 6] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.256] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "B": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [-450, -150, 0, 200, 400, 700] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 6, 9], "tolerance": 0 } } + }, + { + "name": "nhwc_1d_per_channel_bias", + "provenance": { "notes": "The one-spatial-axis per-output-channel and bias combination in channels-last order." }, + "attrs": { "channels_last": 1, "kernel_shape": [3], "pads": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 9, 3], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [6, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { + "dtype": "float32", + "shape": [6], + "data": { "kind": "values", "values": [0.011, 0.014, 0.017, 0.02, 0.023, 0.026] } + }, + "w_zero_point": { "dtype": "int8", "shape": [6], "data": { "kind": "values", "values": [-3, -1, 0, 2, 4, 6] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.256] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "B": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [-450, -150, 0, 200, 400, 700] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 9, 6], "tolerance": 0 } } + }, + { + "name": "ncdhw3d_per_channel_bias", + "provenance": { + "notes": "Three spatial axes with per-output-channel weight quantization and a pre-quantized bias." + }, + "attrs": { "kernel_shape": [2, 2, 2], "pads": [0, 0, 0, 0, 0, 0] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 3, 4, 4, 4], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [5, 3, 2, 2, 2], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { + "dtype": "float32", + "shape": [5], + "data": { "kind": "values", "values": [0.012, 0.015, 0.018, 0.021, 0.024] } + }, + "w_zero_point": { "dtype": "int8", "shape": [5], "data": { "kind": "values", "values": [-3, -1, 1, 3, 5] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.256] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "B": { "dtype": "int32", "shape": [5], "data": { "kind": "values", "values": [-380, -120, 0, 240, 560] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 5, 3, 3, 3], "tolerance": 0 } } + }, + { + "name": "nhwc_3d_per_channel_bias", + "provenance": { + "notes": "The three-spatial-axis per-output-channel and bias combination in channels-last order." + }, + "attrs": { "channels_last": 1, "kernel_shape": [2, 2, 2], "pads": [0, 0, 0, 0, 0, 0] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 4, 4, 4, 3], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [5, 3, 2, 2, 2], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { + "dtype": "float32", + "shape": [5], + "data": { "kind": "values", "values": [0.012, 0.015, 0.018, 0.021, 0.024] } + }, + "w_zero_point": { "dtype": "int8", "shape": [5], "data": { "kind": "values", "values": [-3, -1, 1, 3, 5] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.256] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "B": { "dtype": "int32", "shape": [5], "data": { "kind": "values", "values": [-380, -120, 0, 240, 560] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 3, 3, 3, 5], "tolerance": 0 } } + }, + { + "name": "nhwc_pointwise_small_generic_route", + "provenance": { + "notes": "A channels-last 1x1 convolution with a single output channel, below every vectorized and packed route's contract, so the portable accumulate-and-requantize pair runs." + }, + "attrs": { "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 3, 3, 5], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [1, 5, 1, 1], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [1] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.08] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 3, 3, 1], "tolerance": 0 } } + }, + { + "name": "nhwc_channels_x4_group2_3x3_signed", + "provenance": { + "notes": "The grouped channels-last portable route with a signed activation, weight and output, which is the signed spelling of the same vec4 accumulator and store." + }, + "attrs": { "channels_last": 1, "group": 2, "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "int8", + "shape": [1, 10, 10, 8], + "data": { + "kind": "cycle", + "values": { "$ref": "#/fixtureArrays/nhwc_dp4a_pointwise_c66_tail_oc32_s8x_u8w_input_x" } + } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w": { + "dtype": "int8", + "shape": [16, 4, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { + "dtype": "float32", + "shape": [16], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nhwc_channels_x4_group2_3x3_input_w_scale" } + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [16], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nhwc_dp4a_pointwise_per_channel_bias_c32_oc16_input_w_zero_point" } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.1117] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-8] } } + }, + "outputs": { "y": { "dtype": "int8", "shape": [1, 10, 10, 16], "tolerance": 0 } } + }, + { + "name": "nhwc_depthwise_x4_g8_3x3_signed", + "provenance": { + "notes": "The depthwise channels-last portable route with a signed activation, weight and output." + }, + "attrs": { "channels_last": 1, "group": 8, "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "int8", + "shape": [1, 10, 10, 8], + "data": { + "kind": "cycle", + "values": { "$ref": "#/fixtureArrays/nhwc_dp4a_pointwise_c66_tail_oc32_s8x_u8w_input_x" } + } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w": { + "dtype": "int8", + "shape": [8, 1, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { + "dtype": "float32", + "shape": [8], + "data": { "kind": "values", "values": [0.01, 0.012, 0.014, 0.016, 0.018, 0.02, 0.022, 0.024] } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [8], + "data": { "kind": "values", "values": [-3, -2, -1, 0, 1, 2, 3, 4] } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.08] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-8] } } + }, + "outputs": { "y": { "dtype": "int8", "shape": [1, 10, 10, 8], "tolerance": 0 } } + }, + { + "name": "qconv-nchw-grid-s511-oc256-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 64, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 64, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 256, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution with 64 input channels and 256 output channels (a multiple of four) verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-grid-s1024-oc127-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 64, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [127, 64, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 127, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution with 64 input channels and 127 output channels (one short of a multiple of four) verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-grid-s1024-oc128-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 64, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 64, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 128, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution with 64 input channels and 128 output channels (a multiple of four) verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-grid-s1024-oc129-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 64, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [129, 64, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 129, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution with 64 input channels and 129 output channels (one more than a multiple of four) verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-batch2-tail-k567-perchannel-bias-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [1, 1, 1, 1], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [2, 63, 5, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 63, 3, 3], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { + "dtype": "float32", + "shape": [128], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/qconv-nchw-batch2-tail-k567-perchannel-bias-fixture_input_w_scale" } + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [128], + "data": { + "kind": "values", + "values": { + "$ref": "#/fixtureArrays/qconv-nchw-batch2-tail-k567-perchannel-bias-fixture_input_w_zero_point" + } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "B": { "dtype": "int32", "shape": [128], "data": { "kind": "cycle", "values": [-12000, 3, 17000, -5, 71] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [2, 128, 5, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "Two batches of a 3x3 NCHW quantized convolution with 63 input channels, one short of a multiple of four, and padding 1 that preserves the 5x7 spatial size; per-channel weight quantization and a 128-element bias check the four-aligned 128-channel output exactly." + } + }, + { + "name": "qconv-nchw-batch3-dilated-asymmetric-stride2-u8-weights-s8-output-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [1, 2, 0, 1], "strides": [2, 2], "dilations": [2, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [2, 17, 5, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "uint8", + "shape": [257, 17, 3, 3], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "w_scale": { + "dtype": "float32", + "shape": [257], + "data": { + "kind": "values", + "values": { + "$ref": "#/fixtureArrays/qconv-nchw-batch3-dilated-asymmetric-stride2-u8-weights-s8-output-fixture_input_w_scale" + } + } + }, + "w_zero_point": { + "dtype": "uint8", + "shape": [257], + "data": { + "kind": "values", + "values": { + "$ref": "#/fixtureArrays/qconv-nchw-batch3-dilated-asymmetric-stride2-u8-weights-s8-output-fixture_input_w_zero_point" + } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { "dtype": "int32", "shape": [257], "data": { "kind": "cycle", "values": [-12000, 3, 17000, -5, 71] } } + }, + "outputs": { "y": { "dtype": "int8", "shape": [2, 257, 1, 4], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A 3x3 NCHW quantized convolution over batch 2 has 17 input and 257 output channels (neither a multiple of four), stride 2, height dilation 2 and asymmetric padding [1,2,0,1]. Uint8 x and weights, per-channel quantization and a bias produce the int8 output." + } + }, + { + "name": "qconv-nchw-signed-group2-control-fixture", + "attrs": { "channels_last": 0, "group": 2, "pads": [1, 1, 1, 1], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "int8", + "shape": [2, 16, 5, 7], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w": { + "dtype": "int8", + "shape": [32, 8, 3, 3], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { + "dtype": "float32", + "shape": [32], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/qconv-nchw-signed-group2-control-fixture_input_w_scale" } + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [32], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/qconv-nchw-signed-group2-control-fixture_input_w_zero_point" } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } } + }, + "outputs": { "y": { "dtype": "int8", "shape": [2, 32, 5, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A grouped (group=2) int8 quantized NCHW convolution splits 16 input and 32 output channels into two groups of 8 and 16; a nonzero input zero point (-3) and per-channel weight quantization check the padded 3x3 output exactly." + } + }, + { + "name": "qconv-nchw-depthwise-control-fixture", + "attrs": { "channels_last": 0, "group": 16, "pads": [1, 1, 1, 1], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [2, 16, 5, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [16, 1, 3, 3], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [2, 16, 5, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A depthwise (group=16) quantized NCHW convolution with 16 input and 16 output channels, one channel per group, and a padded 3x3 kernel checks per-tensor quantization exactly." + } + }, + { + "name": "qconv-nhwc-grid-s511-oc256-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 64], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 64, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 256], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution with 64 input channels and 256 output channels (a multiple of four) verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-grid-s1024-oc127-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 64], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [127, 64, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 127], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution with 64 input channels and 127 output channels (one short of a multiple of four) verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-grid-s1024-oc128-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 64], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 64, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 128], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution with 64 input channels and 128 output channels (a multiple of four) verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-grid-s1024-oc129-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 64], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [129, 64, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 129], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution with 64 input channels and 129 output channels (one more than a multiple of four) verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-batch2-tail-k567-perchannel-bias-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [1, 1, 1, 1], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [2, 5, 7, 63], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 63, 3, 3], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { + "dtype": "float32", + "shape": [128], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/qconv-nchw-batch2-tail-k567-perchannel-bias-fixture_input_w_scale" } + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [128], + "data": { + "kind": "values", + "values": { + "$ref": "#/fixtureArrays/qconv-nchw-batch2-tail-k567-perchannel-bias-fixture_input_w_zero_point" + } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "B": { "dtype": "int32", "shape": [128], "data": { "kind": "cycle", "values": [-12000, 3, 17000, -5, 71] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [2, 5, 7, 128], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "Two batches of a 3x3 NHWC quantized convolution with 63 input channels, one short of a multiple of four, and padding 1 that preserves the 5x7 spatial size; per-channel weight quantization and a 128-element bias check the four-aligned 128-channel output exactly." + } + }, + { + "name": "qconv-nhwc-batch3-dilated-asymmetric-stride2-u8-weights-s8-output-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [1, 2, 0, 1], "strides": [2, 2], "dilations": [2, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [2, 5, 7, 17], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "uint8", + "shape": [257, 17, 3, 3], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "w_scale": { + "dtype": "float32", + "shape": [257], + "data": { + "kind": "values", + "values": { + "$ref": "#/fixtureArrays/qconv-nchw-batch3-dilated-asymmetric-stride2-u8-weights-s8-output-fixture_input_w_scale" + } + } + }, + "w_zero_point": { + "dtype": "uint8", + "shape": [257], + "data": { + "kind": "values", + "values": { + "$ref": "#/fixtureArrays/qconv-nchw-batch3-dilated-asymmetric-stride2-u8-weights-s8-output-fixture_input_w_zero_point" + } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { "dtype": "int32", "shape": [257], "data": { "kind": "cycle", "values": [-12000, 3, 17000, -5, 71] } } + }, + "outputs": { "y": { "dtype": "int8", "shape": [2, 1, 4, 257], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A 3x3 NHWC quantized convolution over batch 2 has 17 input and 257 output channels (neither a multiple of four), stride 2, height dilation 2 and asymmetric padding [1,2,0,1]. Uint8 x and weights, per-channel quantization and a bias produce the int8 output." + } + }, + { + "name": "qconv-nhwc-signed-group2-control-fixture", + "attrs": { "channels_last": 1, "group": 2, "pads": [1, 1, 1, 1], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "int8", + "shape": [2, 5, 7, 16], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w": { + "dtype": "int8", + "shape": [32, 8, 3, 3], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { + "dtype": "float32", + "shape": [32], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/qconv-nchw-signed-group2-control-fixture_input_w_scale" } + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [32], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/qconv-nchw-signed-group2-control-fixture_input_w_zero_point" } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } } + }, + "outputs": { "y": { "dtype": "int8", "shape": [2, 5, 7, 32], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A grouped (group=2) int8 quantized NHWC convolution splits 16 input and 32 output channels into two groups of 8 and 16; a nonzero input zero point (-3) and per-channel weight quantization check the padded 3x3 output exactly." + } + }, + { + "name": "qconv-nhwc-depthwise-control-fixture", + "attrs": { "channels_last": 1, "group": 16, "pads": [1, 1, 1, 1], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [2, 5, 7, 16], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [16, 1, 3, 3], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [2, 5, 7, 16], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A depthwise (group=16) quantized NHWC convolution with 16 input and 16 output channels, one channel per group, and a padded 3x3 kernel checks per-tensor quantization exactly." + } + }, + { + "name": "qconv-nchw-contraction-k96-s512-oc256-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 96, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 96, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 256, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 96 input channels (a multiple of four) into 256 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-contraction-k96-s1024-oc128-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 96, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 96, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 128, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 96 input channels (a multiple of four) into 128 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-contraction-k128-s512-oc256-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 128, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 128, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 256, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 128 input channels (a multiple of four) into 256 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-contraction-k128-s1024-oc128-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 128, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 128, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 128, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 128 input channels (a multiple of four) into 128 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-contraction-k160-s512-oc256-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 160, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 160, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 256, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 160 input channels (a multiple of four) into 256 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-contraction-k160-s1024-oc128-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 160, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 160, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 128, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 160 input channels (a multiple of four) into 128 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-contraction-k192-s512-oc256-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 192, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 192, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 256, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 192 input channels (a multiple of four) into 256 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-contraction-k192-s1024-oc128-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 192, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 192, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 128, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 192 input channels (a multiple of four) into 128 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-contraction-k256-s512-oc256-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 256, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 256, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 256, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 256 input channels (a multiple of four) into 256 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-contraction-k256-s1024-oc128-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 256, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 256, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 128, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 256 input channels (a multiple of four) into 128 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-contraction-k384-s512-oc256-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 384, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 384, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 256, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 384 input channels (a multiple of four) into 256 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-contraction-k384-s1024-oc128-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 384, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 384, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 128, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 384 input channels (a multiple of four) into 128 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-contraction-k96-s512-oc256-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 96], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 96, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 256], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 96 input channels (a multiple of four) into 256 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-contraction-k96-s1024-oc128-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 96], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 96, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 128], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 96 input channels (a multiple of four) into 128 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-contraction-k128-s512-oc256-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 128], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 128, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 256], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 128 input channels (a multiple of four) into 256 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-contraction-k128-s1024-oc128-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 128], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 128, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 128], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 128 input channels (a multiple of four) into 128 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-contraction-k160-s512-oc256-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 160], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 160, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 256], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 160 input channels (a multiple of four) into 256 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-contraction-k160-s1024-oc128-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 160], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 160, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 128], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 160 input channels (a multiple of four) into 128 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-contraction-k192-s512-oc256-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 192], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 192, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 256], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 192 input channels (a multiple of four) into 256 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-contraction-k192-s1024-oc128-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 192], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 192, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 128], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 192 input channels (a multiple of four) into 128 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-contraction-k256-s512-oc256-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 256], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 256, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 256], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 256 input channels (a multiple of four) into 256 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-contraction-k256-s1024-oc128-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 256], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 256, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 128], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 256 input channels (a multiple of four) into 128 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-contraction-k384-s512-oc256-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 384], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 384, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 256], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 384 input channels (a multiple of four) into 256 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-contraction-k384-s1024-oc128-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 384], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [128, 384, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 128], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 384 input channels (a multiple of four) into 128 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-amortization-boundary-k64-grid79-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 64, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [64, 64, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 64, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 64 input channels (a multiple of four) into 64 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-amortization-boundary-k128-grid59-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 128, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [64, 128, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 64, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 128 input channels (a multiple of four) into 64 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-amortization-boundary-k256-grid49-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 256, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [64, 256, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 64, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 256 input channels (a multiple of four) into 64 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-amortization-boundary-k576-grid44-fixture", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 576, 1, 7], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [64, 576, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 64, 1, 7], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NCHW quantized convolution contracts 576 input channels (a multiple of four) into 64 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-amortization-boundary-k64-grid79-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 64], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [64, 64, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 64], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 64 input channels (a multiple of four) into 64 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-amortization-boundary-k128-grid59-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 128], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [64, 128, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 64], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 128 input channels (a multiple of four) into 64 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-amortization-boundary-k256-grid49-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 256], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [64, 256, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 64], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 256 input channels (a multiple of four) into 64 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nhwc-amortization-boundary-k576-grid44-fixture", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 7, 576], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [64, 576, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 7, 64], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A pointwise (1x1) NHWC quantized convolution contracts 576 input channels (a multiple of four) into 64 output channels (a multiple of four); per-tensor quantization verifies the uint8 output exactly." + } + }, + { + "name": "qconv-nchw-near-half-dot", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 16, 4, 8], + "data": { + "kind": "values", + "values": [0, 97, 194, 35, 132, 229, 70, 167, 8, 105, 202, 43, 140, 237, 78, 175, 16, 113, 210, 51, 148, 245, 86, 183, 24, 121, 218, 59, 156, 253, 94, 191, 0, 117, 217, 61, 161, 5, 105, 205, 49, 149, 249, 93, 193, 37, 137, 237, 81, 181, 25, 125, 225, 69, 169, 13, 113, 213, 57, 157, 1, 101, 201, 45, 0, 137, 240, 87, 190, 37, 140, 243, 90, 193, 40, 143, 246, 93, 196, 43, 146, 249, 96, 199, 46, 149, 252, 99, 202, 49, 152, 255, 102, 205, 52, 155, 0, 157, 7, 113, 219, 69, 175, 25, 131, 237, 87, 193, 43, 149, 255, 105, 211, 61, 167, 17, 123, 229, 79, 185, 35, 141, 247, 97, 203, 53, 159, 9, 0, 177, 30, 139, 248, 101, 210, 63, 172, 25, 134, 243, 96, 205, 58, 167, 20, 129, 238, 91, 200, 53, 162, 15, 124, 233, 86, 195, 48, 157, 10, 119, 0, 197, 53, 165, 21, 133, 245, 101, 213, 69, 181, 37, 149, 5, 117, 229, 85, 197, 53, 165, 21, 133, 245, 101, 213, 69, 181, 37, 149, 5, 117, 229, 0, 217, 76, 191, 50, 165, 24, 139, 254, 113, 228, 87, 202, 61, 176, 35, 150, 9, 124, 239, 98, 213, 72, 187, 46, 161, 20, 135, 250, 109, 224, 83, 0, 237, 99, 217, 79, 197, 59, 177, 39, 157, 19, 137, 255, 117, 235, 97, 215, 77, 195, 57, 175, 37, 155, 17, 135, 253, 115, 233, 95, 213, 75, 193, 0, 1, 122, 243, 108, 229, 94, 215, 80, 201, 66, 187, 52, 173, 38, 159, 24, 145, 10, 131, 252, 117, 238, 103, 224, 89, 210, 75, 196, 61, 182, 47, 0, 21, 145, 13, 137, 5, 129, 253, 121, 245, 113, 237, 105, 229, 97, 221, 89, 213, 81, 205, 73, 197, 65, 189, 57, 181, 49, 173, 41, 165, 33, 157, 0, 41, 168, 39, 166, 37, 164, 35, 162, 33, 160, 31, 158, 29, 156, 27, 154, 25, 152, 23, 150, 21, 148, 19, 146, 17, 144, 15, 142, 13, 140, 11, 0, 61, 191, 65, 195, 69, 199, 73, 203, 77, 207, 81, 211, 85, 215, 89, 219, 93, 223, 97, 227, 101, 231, 105, 235, 109, 239, 113, 243, 117, 247, 121, 0, 81, 214, 91, 224, 101, 234, 111, 244, 121, 254, 131, 8, 141, 18, 151, 28, 161, 38, 171, 48, 181, 58, 191, 68, 201, 78, 211, 88, 221, 98, 231, 0, 101, 237, 117, 253, 133, 13, 149, 29, 165, 45, 181, 61, 197, 77, 213, 93, 229, 109, 245, 125, 5, 141, 21, 157, 37, 173, 53, 189, 69, 205, 85, 0, 121, 4, 143, 26, 165, 48, 187, 70, 209, 92, 231, 114, 253, 136, 19, 158, 41, 180, 63, 202, 85, 224, 107, 246, 129, 12, 151, 34, 173, 56, 195, 181, 141, 27, 169, 55, 197, 83, 225, 111, 253, 139, 25, 167, 53, 195, 81, 223, 109, 251, 137, 23, 165, 51, 193, 79, 221, 107, 249, 135, 21, 163, 49] + } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { + "dtype": "int8", + "shape": [2, 16, 1, 1], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/qconv-nchw-near-half-dot_input_w" } } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 2, 4, 8], + "tolerance": 0, + "relTolerance": 0, + "data": { + "kind": "values", + "values": [165, 131, 125, 132, 122, 134, 128, 125, 129, 126, 125, 124, 126, 125, 127, 127, 134, 128, 130, 129, 123, 130, 119, 136, 125, 128, 127, 129, 128, 127, 129, 128, 127, 128, 128, 132, 128, 129, 130, 128, 130, 131, 128, 127, 128, 124, 132, 125, 131, 126, 124, 126, 129, 132, 129, 131, 128, 129, 132, 131, 132, 128, 131, 126] + } + } + }, + "provenance": { + "notes": "First pixel lands just below a requantization half: exact 250000 * f32(0.02) * f32(0.015) / 2 rounds to 37, while rounded intermediate products can produce the tie 37.5. Remaining pixels vary to exercise indexing and saturation. Every inline output was evaluated with rational arithmetic. ONNX Runtime's CPU provider produces 166 instead of 165 at the first pixel (and 90 instead of 91 for the negative-bias channel); its f32 intermediate lands on a tie. The ORT check records this provider divergence without changing the exact GPU tolerance.", + "source": "Exact rational requantization of integer dot products and stored float32 scales" + } + }, + { + "name": "qconv-nchw-near-half-bias", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 16, 4, 8], + "data": { + "kind": "values", + "values": [128, 97, 194, 35, 132, 229, 70, 167, 8, 105, 202, 43, 140, 237, 78, 175, 16, 113, 210, 51, 148, 245, 86, 183, 24, 121, 218, 59, 156, 253, 94, 191, 128, 117, 217, 61, 161, 5, 105, 205, 49, 149, 249, 93, 193, 37, 137, 237, 81, 181, 25, 125, 225, 69, 169, 13, 113, 213, 57, 157, 1, 101, 201, 45, 128, 137, 240, 87, 190, 37, 140, 243, 90, 193, 40, 143, 246, 93, 196, 43, 146, 249, 96, 199, 46, 149, 252, 99, 202, 49, 152, 255, 102, 205, 52, 155, 128, 157, 7, 113, 219, 69, 175, 25, 131, 237, 87, 193, 43, 149, 255, 105, 211, 61, 167, 17, 123, 229, 79, 185, 35, 141, 247, 97, 203, 53, 159, 9, 128, 177, 30, 139, 248, 101, 210, 63, 172, 25, 134, 243, 96, 205, 58, 167, 20, 129, 238, 91, 200, 53, 162, 15, 124, 233, 86, 195, 48, 157, 10, 119, 128, 197, 53, 165, 21, 133, 245, 101, 213, 69, 181, 37, 149, 5, 117, 229, 85, 197, 53, 165, 21, 133, 245, 101, 213, 69, 181, 37, 149, 5, 117, 229, 128, 217, 76, 191, 50, 165, 24, 139, 254, 113, 228, 87, 202, 61, 176, 35, 150, 9, 124, 239, 98, 213, 72, 187, 46, 161, 20, 135, 250, 109, 224, 83, 128, 237, 99, 217, 79, 197, 59, 177, 39, 157, 19, 137, 255, 117, 235, 97, 215, 77, 195, 57, 175, 37, 155, 17, 135, 253, 115, 233, 95, 213, 75, 193, 128, 1, 122, 243, 108, 229, 94, 215, 80, 201, 66, 187, 52, 173, 38, 159, 24, 145, 10, 131, 252, 117, 238, 103, 224, 89, 210, 75, 196, 61, 182, 47, 128, 21, 145, 13, 137, 5, 129, 253, 121, 245, 113, 237, 105, 229, 97, 221, 89, 213, 81, 205, 73, 197, 65, 189, 57, 181, 49, 173, 41, 165, 33, 157, 128, 41, 168, 39, 166, 37, 164, 35, 162, 33, 160, 31, 158, 29, 156, 27, 154, 25, 152, 23, 150, 21, 148, 19, 146, 17, 144, 15, 142, 13, 140, 11, 128, 61, 191, 65, 195, 69, 199, 73, 203, 77, 207, 81, 211, 85, 215, 89, 219, 93, 223, 97, 227, 101, 231, 105, 235, 109, 239, 113, 243, 117, 247, 121, 128, 81, 214, 91, 224, 101, 234, 111, 244, 121, 254, 131, 8, 141, 18, 151, 28, 161, 38, 171, 48, 181, 58, 191, 68, 201, 78, 211, 88, 221, 98, 231, 128, 101, 237, 117, 253, 133, 13, 149, 29, 165, 45, 181, 61, 197, 77, 213, 93, 229, 109, 245, 125, 5, 141, 21, 157, 37, 173, 53, 189, 69, 205, 85, 128, 121, 4, 143, 26, 165, 48, 187, 70, 209, 92, 231, 114, 253, 136, 19, 158, 41, 180, 63, 202, 85, 224, 107, 246, 129, 12, 151, 34, 173, 56, 195, 128, 141, 27, 169, 55, 197, 83, 225, 111, 253, 139, 25, 167, 53, 195, 81, 223, 109, 251, 137, 23, 165, 51, 193, 79, 221, 107, 249, 135, 21, 163, 49] + } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { + "dtype": "int8", + "shape": [2, 16, 1, 1], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/qconv-nchw-near-half-bias_input_w" } } + }, + "w_scale": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [0.015, 0.015] } }, + "w_zero_point": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [0, 0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "B": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [250000, -250000] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 2, 4, 8], + "tolerance": 0, + "relTolerance": 0, + "data": { + "kind": "values", + "values": [165, 168, 167, 166, 169, 163, 170, 158, 175, 159, 169, 165, 162, 162, 163, 167, 165, 167, 163, 172, 161, 165, 163, 167, 165, 161, 166, 161, 171, 161, 170, 166, 91, 91, 91, 94, 91, 91, 93, 90, 92, 93, 90, 89, 91, 87, 94, 87, 93, 88, 87, 88, 92, 94, 92, 93, 90, 92, 95, 93, 94, 91, 93, 88] + } + } + }, + "provenance": { + "notes": "First pixel lands just below a requantization half: exact 250000 * f32(0.02) * f32(0.015) / 2 rounds to 37, while rounded intermediate products can produce the tie 37.5. Remaining pixels vary to exercise indexing and saturation. Every inline output was evaluated with rational arithmetic. ONNX Runtime's CPU provider produces 166 instead of 165 at the first pixel (and 90 instead of 91 for the negative-bias channel); its f32 intermediate lands on a tie. The ORT check records this provider divergence without changing the exact GPU tolerance.", + "source": "Exact rational requantization of integer dot products and stored float32 scales" + } + }, + { + "name": "qconv-nhwc-near-half-dot", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 4, 8, 16], + "data": { + "kind": "values", + "values": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 181, 97, 117, 137, 157, 177, 197, 217, 237, 1, 21, 41, 61, 81, 101, 121, 141, 194, 217, 240, 7, 30, 53, 76, 99, 122, 145, 168, 191, 214, 237, 4, 27, 35, 61, 87, 113, 139, 165, 191, 217, 243, 13, 39, 65, 91, 117, 143, 169, 132, 161, 190, 219, 248, 21, 50, 79, 108, 137, 166, 195, 224, 253, 26, 55, 229, 5, 37, 69, 101, 133, 165, 197, 229, 5, 37, 69, 101, 133, 165, 197, 70, 105, 140, 175, 210, 245, 24, 59, 94, 129, 164, 199, 234, 13, 48, 83, 167, 205, 243, 25, 63, 101, 139, 177, 215, 253, 35, 73, 111, 149, 187, 225, 8, 49, 90, 131, 172, 213, 254, 39, 80, 121, 162, 203, 244, 29, 70, 111, 105, 149, 193, 237, 25, 69, 113, 157, 201, 245, 33, 77, 121, 165, 209, 253, 202, 249, 40, 87, 134, 181, 228, 19, 66, 113, 160, 207, 254, 45, 92, 139, 43, 93, 143, 193, 243, 37, 87, 137, 187, 237, 31, 81, 131, 181, 231, 25, 140, 193, 246, 43, 96, 149, 202, 255, 52, 105, 158, 211, 8, 61, 114, 167, 237, 37, 93, 149, 205, 5, 61, 117, 173, 229, 29, 85, 141, 197, 253, 53, 78, 137, 196, 255, 58, 117, 176, 235, 38, 97, 156, 215, 18, 77, 136, 195, 175, 237, 43, 105, 167, 229, 35, 97, 159, 221, 27, 89, 151, 213, 19, 81, 16, 81, 146, 211, 20, 85, 150, 215, 24, 89, 154, 219, 28, 93, 158, 223, 113, 181, 249, 61, 129, 197, 9, 77, 145, 213, 25, 93, 161, 229, 41, 109, 210, 25, 96, 167, 238, 53, 124, 195, 10, 81, 152, 223, 38, 109, 180, 251, 51, 125, 199, 17, 91, 165, 239, 57, 131, 205, 23, 97, 171, 245, 63, 137, 148, 225, 46, 123, 200, 21, 98, 175, 252, 73, 150, 227, 48, 125, 202, 23, 245, 69, 149, 229, 53, 133, 213, 37, 117, 197, 21, 101, 181, 5, 85, 165, 86, 169, 252, 79, 162, 245, 72, 155, 238, 65, 148, 231, 58, 141, 224, 51, 183, 13, 99, 185, 15, 101, 187, 17, 103, 189, 19, 105, 191, 21, 107, 193, 24, 113, 202, 35, 124, 213, 46, 135, 224, 57, 146, 235, 68, 157, 246, 79, 121, 213, 49, 141, 233, 69, 161, 253, 89, 181, 17, 109, 201, 37, 129, 221, 218, 57, 152, 247, 86, 181, 20, 115, 210, 49, 144, 239, 78, 173, 12, 107, 59, 157, 255, 97, 195, 37, 135, 233, 75, 173, 15, 113, 211, 53, 151, 249, 156, 1, 102, 203, 48, 149, 250, 95, 196, 41, 142, 243, 88, 189, 34, 135, 253, 101, 205, 53, 157, 5, 109, 213, 61, 165, 13, 117, 221, 69, 173, 21, 94, 201, 52, 159, 10, 117, 224, 75, 182, 33, 140, 247, 98, 205, 56, 163, 191, 45, 155, 9, 119, 229, 83, 193, 47, 157, 11, 121, 231, 85, 195, 49] + } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { + "dtype": "int8", + "shape": [2, 16, 1, 1], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/qconv-nchw-near-half-dot_input_w" } } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 4, 8, 2], + "tolerance": 0, + "relTolerance": 0, + "data": { + "kind": "values", + "values": [165, 127, 131, 128, 125, 128, 132, 132, 122, 128, 134, 129, 128, 130, 125, 128, 129, 130, 126, 131, 125, 128, 124, 127, 126, 128, 125, 124, 127, 132, 127, 125, 134, 131, 128, 126, 130, 124, 129, 126, 123, 129, 130, 132, 119, 129, 136, 131, 125, 128, 128, 129, 127, 132, 129, 131, 128, 132, 127, 128, 129, 131, 128, 126] + } + } + }, + "provenance": { + "notes": "First pixel lands just below a requantization half: exact 250000 * f32(0.02) * f32(0.015) / 2 rounds to 37, while rounded intermediate products can produce the tie 37.5. Remaining pixels vary to exercise indexing and saturation. Every inline output was evaluated with rational arithmetic. ONNX Runtime's CPU provider produces 166 instead of 165 at the first pixel (and 90 instead of 91 for the negative-bias channel); its f32 intermediate lands on a tie. The ORT check records this provider divergence without changing the exact GPU tolerance.", + "source": "Exact rational requantization of integer dot products and stored float32 scales" + } + }, + { + "name": "qconv-nhwc-near-half-bias", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 4, 8, 16], + "data": { + "kind": "values", + "values": [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 97, 117, 137, 157, 177, 197, 217, 237, 1, 21, 41, 61, 81, 101, 121, 141, 194, 217, 240, 7, 30, 53, 76, 99, 122, 145, 168, 191, 214, 237, 4, 27, 35, 61, 87, 113, 139, 165, 191, 217, 243, 13, 39, 65, 91, 117, 143, 169, 132, 161, 190, 219, 248, 21, 50, 79, 108, 137, 166, 195, 224, 253, 26, 55, 229, 5, 37, 69, 101, 133, 165, 197, 229, 5, 37, 69, 101, 133, 165, 197, 70, 105, 140, 175, 210, 245, 24, 59, 94, 129, 164, 199, 234, 13, 48, 83, 167, 205, 243, 25, 63, 101, 139, 177, 215, 253, 35, 73, 111, 149, 187, 225, 8, 49, 90, 131, 172, 213, 254, 39, 80, 121, 162, 203, 244, 29, 70, 111, 105, 149, 193, 237, 25, 69, 113, 157, 201, 245, 33, 77, 121, 165, 209, 253, 202, 249, 40, 87, 134, 181, 228, 19, 66, 113, 160, 207, 254, 45, 92, 139, 43, 93, 143, 193, 243, 37, 87, 137, 187, 237, 31, 81, 131, 181, 231, 25, 140, 193, 246, 43, 96, 149, 202, 255, 52, 105, 158, 211, 8, 61, 114, 167, 237, 37, 93, 149, 205, 5, 61, 117, 173, 229, 29, 85, 141, 197, 253, 53, 78, 137, 196, 255, 58, 117, 176, 235, 38, 97, 156, 215, 18, 77, 136, 195, 175, 237, 43, 105, 167, 229, 35, 97, 159, 221, 27, 89, 151, 213, 19, 81, 16, 81, 146, 211, 20, 85, 150, 215, 24, 89, 154, 219, 28, 93, 158, 223, 113, 181, 249, 61, 129, 197, 9, 77, 145, 213, 25, 93, 161, 229, 41, 109, 210, 25, 96, 167, 238, 53, 124, 195, 10, 81, 152, 223, 38, 109, 180, 251, 51, 125, 199, 17, 91, 165, 239, 57, 131, 205, 23, 97, 171, 245, 63, 137, 148, 225, 46, 123, 200, 21, 98, 175, 252, 73, 150, 227, 48, 125, 202, 23, 245, 69, 149, 229, 53, 133, 213, 37, 117, 197, 21, 101, 181, 5, 85, 165, 86, 169, 252, 79, 162, 245, 72, 155, 238, 65, 148, 231, 58, 141, 224, 51, 183, 13, 99, 185, 15, 101, 187, 17, 103, 189, 19, 105, 191, 21, 107, 193, 24, 113, 202, 35, 124, 213, 46, 135, 224, 57, 146, 235, 68, 157, 246, 79, 121, 213, 49, 141, 233, 69, 161, 253, 89, 181, 17, 109, 201, 37, 129, 221, 218, 57, 152, 247, 86, 181, 20, 115, 210, 49, 144, 239, 78, 173, 12, 107, 59, 157, 255, 97, 195, 37, 135, 233, 75, 173, 15, 113, 211, 53, 151, 249, 156, 1, 102, 203, 48, 149, 250, 95, 196, 41, 142, 243, 88, 189, 34, 135, 253, 101, 205, 53, 157, 5, 109, 213, 61, 165, 13, 117, 221, 69, 173, 21, 94, 201, 52, 159, 10, 117, 224, 75, 182, 33, 140, 247, 98, 205, 56, 163, 191, 45, 155, 9, 119, 229, 83, 193, 47, 157, 11, 121, 231, 85, 195, 49] + } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { + "dtype": "int8", + "shape": [2, 16, 1, 1], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/qconv-nchw-near-half-bias_input_w" } } + }, + "w_scale": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [0.015, 0.015] } }, + "w_zero_point": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [0, 0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "B": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [250000, -250000] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 4, 8, 2], + "tolerance": 0, + "relTolerance": 0, + "data": { + "kind": "values", + "values": [165, 91, 168, 91, 167, 91, 166, 94, 169, 91, 163, 91, 170, 93, 158, 90, 175, 92, 159, 93, 169, 90, 165, 89, 162, 91, 162, 87, 163, 94, 167, 87, 165, 93, 167, 88, 163, 87, 172, 88, 161, 92, 165, 94, 163, 92, 167, 93, 165, 90, 161, 92, 166, 95, 161, 93, 171, 94, 161, 91, 170, 93, 166, 88] + } + } + }, + "provenance": { + "notes": "First pixel lands just below a requantization half: exact 250000 * f32(0.02) * f32(0.015) / 2 rounds to 37, while rounded intermediate products can produce the tie 37.5. Remaining pixels vary to exercise indexing and saturation. Every inline output was evaluated with rational arithmetic. ONNX Runtime's CPU provider produces 166 instead of 165 at the first pixel (and 90 instead of 91 for the negative-bias channel); its f32 intermediate lands on a tie. The ORT check records this provider divergence without changing the exact GPU tolerance.", + "source": "Exact rational requantization of integer dot products and stored float32 scales" + } + }, + { + "name": "precast-selection-im2col_nchw_bias_tensor", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.WithBias_2D", + "notes": "Compact ORT-valid pointwise adaptation that preserves optional int32 bias semantics. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [10, 11, 12, 13] } }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [10] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 1, 1], "data": { "kind": "values", "values": [14] } }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [10] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [100] } }, + "B": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [-2] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 1, 2, 2], + "data": { "kind": "values", "values": [98, 102, 106, 110] }, + "tolerance": 0 + } + }, + "attrs": {}, + "tunables": { "EXACT_MATRIX_MIN_INVOCATIONS": 0 } + }, + { + "name": "precast-selection-im2col_nchw_row", + "provenance": { + "notes": "A 3x3 channel-first convolution with per-output-channel weight scales and zero points, which drives the packed integer dot product's per-row requantization and per-row zero-point correction." + }, + "attrs": { "strides": [1, 1], "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 16, 24, 24], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [24, 16, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { + "dtype": "float32", + "shape": [24], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nchw_dp4a_im2col_per_channel_3x3_c16_oc24_input_w_scale" } + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [24], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nchw_dp4a_im2col_per_channel_3x3_c16_oc24_input_w_zero_point" } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.032] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 24, 24, 24], "tolerance": 0 } }, + "tunables": { "EXACT_MATRIX_MIN_INVOCATIONS": 0 } + }, + { + "name": "precast-selection-im2col_nhwc_bias_tensor", + "provenance": { + "notes": "A small channels-last 3x3 quantized convolution with a pre-quantized bias verifies that bias is added at this size." + }, + "attrs": { "channels_last": 1, "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 6, 6, 8], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [16, 8, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [1] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.141] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "B": { + "dtype": "int32", + "shape": [16], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nhwc_dp4a_im2col_bias_3x3_c8_oc16_input_B" } + } + } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 6, 6, 16], "tolerance": 0 } }, + "tunables": { "EXACT_MATRIX_MIN_INVOCATIONS": 0 } + }, + { + "name": "precast-selection-im2col_nhwc_column", + "attrs": { "strides": [1, 1], "pads": [1, 1, 1, 1], "channels_last": 1 }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 3, 3, 1], + "data": { "kind": "values", "values": [128, 129, 130, 131, 132, 133, 134, 135, 136] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [127, 128, 129, 130] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 4, 4, 1] } }, + "provenance": { + "notes": "Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The activation generator fills the permuted shape, so the expected values come from the trusted CPU reference rather than being permuted from the channel-first spelling. Explicit padding with a wider output than input." + }, + "tunables": { "EXACT_MATRIX_MIN_INVOCATIONS": 0 } + }, + { + "name": "precast-selection-pointwise_nchw_row", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8S8_PerChannelZeroPoints", + "notes": "Compact mixed uint8 activation / int8 weight per-output-channel quantization case without optional bias. Channel-first layout, carried over from the ai.onnx QLinearConv-10 fixture of the same name, whose expected values come from ONNX Runtime's CPU provider." + }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 2, 2, 2], + "data": { "kind": "values", "values": [120, 128, 136, 144, 100, 110, 130, 150] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.2] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "int8", "shape": [2, 2, 1, 1], "data": { "kind": "values", "values": [-8, 12, 16, -4] } }, + "w_scale": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [0.25, 0.5] } }, + "w_zero_point": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [-2, 6] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 2, 2, 2], + "data": { "kind": "values", "values": [59, 78, 124, 170, 208, 200, 152, 104] }, + "tolerance": 0 + } + }, + "attrs": {}, + "tunables": { "EXACT_MATRIX_MIN_INVOCATIONS": 0 } + }, + { + "name": "precast-selection-pointwise_nhwc_bias_tensor", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.WithBias_2D", + "notes": "Compact ORT-valid pointwise adaptation that preserves optional int32 bias semantics. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. A 1x1 kernel with a pre-quantized bias." + }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 2, 2, 1], "data": { "kind": "values", "values": [10, 11, 12, 13] } }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [10] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 1, 1], "data": { "kind": "values", "values": [14] } }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [10] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [100] } }, + "B": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [-2] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 2, 2, 1], + "data": { "kind": "values", "values": [98, 102, 106, 110] }, + "tolerance": 0 + } + }, + "attrs": { "channels_last": 1 }, + "tunables": { "EXACT_MATRIX_MIN_INVOCATIONS": 0 } + }, + { + "name": "precast-selection-pointwise_nhwc_column", + "provenance": { + "source": "onnxruntime/test/providers/cpu/nn/qlinearconv_op_test.cc", + "test": "QLinearConvTest.Conv2D_U8S8_PerChannelZeroPoints", + "notes": "Compact mixed uint8 activation / int8 weight per-output-channel quantization case without optional bias. Channels-last re-expression of the ai.onnx QLinearConv-10 fixture of the same geometry: the activation and the result are permuted into `(N, D..., C)` order while the weight keeps its `(M, C/group, k...)` layout. The expected values are the permuted ones ONNX Runtime's CPU provider produced for the channel-first spelling. Per-output-channel weight zero points with a signed weight." + }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 2, 2, 2], + "data": { "kind": "values", "values": [120, 100, 128, 110, 136, 130, 144, 150] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.2] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "int8", "shape": [2, 2, 1, 1], "data": { "kind": "values", "values": [-8, 12, 16, -4] } }, + "w_scale": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [0.25, 0.5] } }, + "w_zero_point": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [-2, 6] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 2, 2, 2], + "data": { "kind": "values", "values": [59, 208, 78, 200, 124, 152, 170, 104] }, + "tolerance": 0 + } + }, + "attrs": { "channels_last": 1 }, + "tunables": { "EXACT_MATRIX_MIN_INVOCATIONS": 0 } + }, + { + "name": "portable-selection-pointwise_nchw_row", + "provenance": { + "source": "Independent integer convolution and float64 requantization reference", + "notes": "Compact channel and reduction tails across supported layouts; integer outputs are checked exactly." + }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 2, 2, 2], + "data": { "kind": "values", "values": [120, 128, 136, 144, 100, 110, 130, 150] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.2] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "int8", "shape": [33, 2, 1, 1], "data": { "kind": "cycle", "values": [-8, 12, 16, -4] } }, + "w_scale": { "dtype": "float32", "shape": [33], "data": { "kind": "cycle", "values": [0.25, 0.5] } }, + "w_zero_point": { "dtype": "int8", "shape": [33], "data": { "kind": "cycle", "values": [-2, 6] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 33, 2, 2], + "data": { + "kind": "values", + "values": [59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170, 208, 200, 152, 104, 59, 78, 124, 170] + }, + "tolerance": 0 + } + }, + "attrs": {}, + "tunables": { "EXACT_MATRIX_MIN_INVOCATIONS": 0 } + }, + { + "name": "portable-selection-im2col_nchw_row", + "provenance": { + "source": "Independent integer convolution and float64 requantization reference", + "notes": "A 3x3 NCHW quantized convolution with 33 output channels, one more than a multiple of four, reduces a four-aligned 144-element window (16 channels x 3x3); integer outputs are checked exactly." + }, + "attrs": { "strides": [1, 1], "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 16, 6, 7], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [33, 16, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { + "dtype": "float32", + "shape": [33], + "data": { + "kind": "cycle", + "values": { "$ref": "#/fixtureArrays/nchw_dp4a_im2col_per_channel_3x3_c16_oc24_input_w_scale" } + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [33], + "data": { + "kind": "cycle", + "values": { "$ref": "#/fixtureArrays/nchw_dp4a_im2col_per_channel_3x3_c16_oc24_input_w_zero_point" } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.032] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 33, 6, 7], + "tolerance": 0, + "data": { + "kind": "values", + "values": [232, 13, 0, 47, 112, 0, 255, 0, 44, 255, 0, 255, 0, 0, 0, 35, 0, 184, 0, 90, 0, 234, 0, 255, 0, 44, 255, 0, 168, 0, 0, 41, 35, 0, 149, 163, 0, 255, 0, 89, 189, 0, 0, 175, 0, 121, 0, 255, 0, 233, 0, 0, 222, 14, 0, 118, 2, 0, 77, 0, 0, 173, 0, 0, 255, 0, 255, 0, 0, 255, 255, 0, 75, 28, 0, 77, 0, 0, 255, 0, 255, 0, 95, 49, 198, 0, 203, 0, 255, 0, 255, 0, 0, 153, 0, 0, 255, 0, 0, 69, 0, 26, 105, 0, 255, 255, 0, 255, 0, 0, 153, 0, 0, 255, 0, 0, 69, 0, 39, 35, 0, 255, 0, 255, 0, 141, 143, 0, 140, 193, 0, 255, 0, 34, 87, 0, 251, 0, 0, 255, 255, 0, 255, 0, 0, 239, 0, 0, 255, 0, 102, 87, 0, 255, 111, 0, 255, 0, 0, 255, 0, 242, 23, 0, 0, 255, 0, 102, 0, 255, 0, 0, 255, 0, 255, 39, 0, 255, 0, 91, 1, 0, 0, 255, 0, 200, 168, 0, 211, 255, 0, 255, 0, 0, 255, 0, 0, 1, 0, 0, 255, 0, 255, 255, 0, 62, 255, 0, 255, 0, 50, 0, 255, 255, 0, 255, 195, 255, 50, 0, 116, 242, 0, 59, 255, 0, 255, 7, 0, 255, 0, 0, 255, 0, 255, 50, 0, 255, 255, 0, 10, 255, 0, 255, 0, 0, 255, 0, 41, 255, 0, 255, 255, 0, 180, 0, 255, 0, 143, 41, 253, 0, 255, 0, 255, 0, 0, 255, 0, 0, 255, 0, 255, 255, 0, 223, 0, 253, 0, 63, 0, 255, 0, 0, 255, 0, 228, 255, 0, 255, 0, 0, 7, 0, 73, 237, 0, 255, 0, 255, 0, 0, 255, 0, 0, 255, 0, 255, 218, 0, 255, 59, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 206, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 0, 255, 5, 0, 255, 0, 255, 255, 0, 255, 255, 0, 255, 233, 0, 255, 32, 0, 255, 0, 247, 255, 0, 255, 255, 0, 255, 0, 0, 255, 255, 0, 255, 32, 170, 159, 0, 17, 255, 0, 255, 81, 255, 87, 255, 120, 0, 255, 154, 0, 255, 0, 0, 255, 0, 0, 251, 0, 156, 255, 0, 255, 0, 0, 255, 0, 0, 255, 0, 249, 255, 0, 0, 255, 0, 156, 145, 0, 0, 255, 0, 255, 0, 255, 0, 0, 255, 0, 220, 255, 0, 0, 0, 135, 255, 0, 255, 206, 0, 255, 185, 0, 178, 255, 12, 255, 0, 255, 0, 0, 135, 255, 0, 255, 255, 0, 255, 185, 134, 255, 0, 0, 255, 0, 255, 0, 107, 0, 0, 255, 0, 0, 255, 255, 0, 255, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 255, 49, 0, 255, 0, 255, 0, 248, 0, 48, 255, 0, 0, 255, 0, 255, 187, 106, 205, 0, 255, 0, 0, 191, 0, 255, 37, 0, 221, 255, 0, 255, 0, 77, 125, 207, 255, 0, 0, 255, 0, 0, 0, 255, 0, 0, 255, 0, 255, 0, 77, 0, 0, 255, 0, 0, 255, 0, 0, 57, 255, 0, 0, 255, 0, 0, 0, 104, 0, 255, 0, 0, 255, 0, 255, 0, 0, 0, 0, 0, 255, 0, 57, 0, 255, 0, 255, 0, 0, 255, 0, 255, 0, 0, 0, 0, 0, 208, 237, 0, 255, 0, 44, 255, 0, 0, 255, 0, 137, 0, 255, 0, 255, 0, 0, 255, 0, 0, 129, 0, 0, 34, 0, 0, 255, 0, 0, 255, 0, 255, 0, 0, 255, 255, 0, 31, 0, 0, 34, 0, 0, 255, 0, 255, 0, 70, 0, 255, 0, 255, 0, 255, 0, 255, 0, 0, 221, 0, 0, 255, 0, 0, 25, 0, 0, 108, 0, 255, 255, 0, 255, 0, 0, 221, 0, 0, 255, 0, 0, 25, 0, 0, 0, 0, 255, 0, 255, 0, 178, 143, 24, 144, 184, 0, 255, 0, 66, 110, 0, 229, 17, 0, 255, 255, 0, 255, 0, 0, 220, 0, 0, 243, 0, 121, 110, 0, 255, 124, 0, 255, 2, 0, 255, 0, 215, 61, 39, 0, 249, 7, 116, 0, 255, 0, 31, 255, 0, 255, 69, 0, 255, 0, 113, 49, 0, 0, 255, 0, 195, 171, 0, 200, 255, 0, 255, 0, 0, 255, 0, 0, 49, 8, 0, 255, 0, 255, 255, 0, 89, 255, 0, 255, 0, 74, 0, 241, 255, 0, 240, 187, 255, 83, 0, 135, 229, 0, 87, 255, 0, 255, 51, 0, 255, 0, 0, 255, 0, 255, 83, 0, 255, 255, 0, 54, 255, 0, 255, 0, 0, 255, 0, 71, 255, 0, 255, 255, 0, 178, 0, 255, 0, 148, 68, 242, 0, 255, 0, 255, 0, 30, 255, 0, 0, 255, 0, 255, 255, 0, 219, 0, 242, 0, 90, 0, 255, 0, 0, 255, 0, 219, 255, 0, 255, 0, 34, 45, 0, 90, 227, 0, 255, 0, 255, 0, 0, 255, 22, 0, 255, 0, 255, 209, 3, 255, 92, 0, 255, 0, 0, 255, 0, 0, 255, 22, 5, 255, 0, 210, 0, 3, 255, 0, 0, 255, 0, 0, 255, 28, 0, 20, 255, 41, 0, 255, 0, 255, 255, 0, 255, 255, 0, 255, 228, 0, 255, 70, 0, 255, 0, 240, 255, 0, 255, 255, 0, 255, 0, 0, 255, 255, 0, 255, 70, 178, 162, 12, 53, 255, 0, 255, 101, 255, 109, 255, 138, 0, 255, 160, 0, 255, 0, 0, 255, 0, 0, 240, 0, 172, 255, 0, 255, 0, 0, 255, 0, 0, 255, 0, 243, 255, 0, 0, 255, 0, 172, 158, 0, 0, 255, 0, 255, 0, 255, 2, 20, 255, 0, 218, 255, 0, 0, 0, 155, 255, 0, 255, 210, 0, 255, 198, 0, 192, 255, 49, 255, 0, 255, 11, 0, 155, 255, 0, 255, 255, 0, 255, 198, 150, 255, 30, 0, 255, 0, 255, 0, 75, 0, 0, 255, 0, 0, 151, 211, 0, 85, 0, 211, 0, 0, 255, 0, 0, 255, 0, 0, 255, 132, 0, 0, 255, 0, 85, 0, 91, 0, 0, 255, 0, 0, 90, 0, 177, 54, 37, 73, 0, 171, 0, 0, 164, 0, 232, 98, 0, 176, 243, 0, 255, 0, 120, 137, 170, 200, 22, 0, 255, 0, 0, 0, 255, 0, 66, 243, 0, 234, 0, 120, 0, 0, 200, 22, 0, 255, 16, 0, 105, 234, 0, 76, 255, 4, 0, 49, 126, 0, 255, 0, 51, 255, 0, 255, 0, 0, 0, 40, 0, 229, 0, 110, 0, 255, 0, 255, 0, 51, 255, 0, 198, 0, 0, 47, 40, 0, 177, 186, 0, 255, 0, 99, 225, 0, 0, 208, 0, 145, 0, 255, 0, 255, 0, 0, 255, 19, 0, 141, 0, 0, 98, 0, 0, 217, 0, 0, 255, 0, 255, 0, 0, 255, 255, 0, 98, 36, 0, 98, 0, 0, 255, 0, 255, 0, 111, 49, 224, 0, 240, 0, 255, 0, 255, 0, 0, 194, 0, 0, 255, 0, 0, 93, 0, 42, 135, 0, 255, 255, 0, 255, 0, 0, 194, 0, 0, 255, 0, 0, 93, 0, 48, 33, 0, 255, 0, 255, 0, 164, 159, 0, 167, 235, 0, 255, 0, 35, 117, 0, 255, 0, 0, 255, 255, 0, 255, 0, 0, 255, 0, 0, 255, 0, 136, 117, 0, 255, 134, 0, 255, 0, 0, 255, 0, 255, 33, 0, 0, 255, 0, 118, 0, 255, 0, 0, 255, 0, 255, 45, 0, 255, 0, 124, 26, 0, 0, 255, 0, 255, 216, 0, 255, 255, 0, 255, 0, 0, 255, 0, 0, 26, 0, 0, 255, 0, 255, 255, 0, 83, 255, 0, 255, 0, 53, 0, 255, 255, 0, 255, 229, 255, 82, 0, 164, 255, 0, 84, 255, 0, 255, 34, 0, 255, 0, 0, 255, 0, 255, 82, 0, 255, 255, 0, 41, 255, 0, 255, 0, 0, 255, 0, 56, 255, 0, 255, 255, 0, 217, 0, 255, 0, 170, 52, 255, 0, 255, 0, 255, 0, 0, 255, 0, 0, 255, 0, 255, 255, 0, 255, 0, 255, 0, 91, 0, 255, 0, 0, 255, 0, 255, 255, 0, 255, 0, 6, 23, 0] + } + } + }, + "tunables": { "EXACT_MATRIX_MIN_INVOCATIONS": 0 } + }, + { + "name": "portable-selection-im2col_nchw_bias_tensor", + "provenance": { + "source": "Independent integer convolution and float64 requantization reference", + "notes": "Compact channel and reduction tails across supported layouts; integer outputs are checked exactly." + }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 1, 2, 2], "data": { "kind": "values", "values": [10, 11, 12, 13] } }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [10] } }, + "w": { "dtype": "uint8", "shape": [33, 1, 1, 1], "data": { "kind": "cycle", "values": [14] } }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [10] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [100] } }, + "B": { "dtype": "int32", "shape": [33], "data": { "kind": "cycle", "values": [-2] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 33, 2, 2], + "data": { + "kind": "values", + "values": [98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110] + }, + "tolerance": 0 + } + }, + "attrs": {}, + "tunables": { "EXACT_MATRIX_MIN_INVOCATIONS": 0 } + }, + { + "name": "portable-selection-pointwise_nhwc_column", + "provenance": { + "source": "Independent integer convolution and float64 requantization reference", + "notes": "Compact channel and reduction tails across supported layouts; integer outputs are checked exactly." + }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 6, 7, 2], + "data": { "kind": "cycle", "values": [120, 100, 128, 110, 136, 130, 144, 150] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.2] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "w": { "dtype": "int8", "shape": [2, 2, 1, 1], "data": { "kind": "values", "values": [-8, 12, 16, -4] } }, + "w_scale": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [0.25, 0.5] } }, + "w_zero_point": { "dtype": "int8", "shape": [2], "data": { "kind": "values", "values": [-2, 6] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 6, 7, 2], + "data": { + "kind": "values", + "values": [59, 208, 78, 200, 124, 152, 170, 104, 59, 208, 78, 200, 124, 152, 170, 104, 59, 208, 78, 200, 124, 152, 170, 104, 59, 208, 78, 200, 124, 152, 170, 104, 59, 208, 78, 200, 124, 152, 170, 104, 59, 208, 78, 200, 124, 152, 170, 104, 59, 208, 78, 200, 124, 152, 170, 104, 59, 208, 78, 200, 124, 152, 170, 104, 59, 208, 78, 200, 124, 152, 170, 104, 59, 208, 78, 200, 124, 152, 170, 104, 59, 208, 78, 200] + }, + "tolerance": 0 + } + }, + "attrs": { "channels_last": 1 }, + "tunables": { "EXACT_MATRIX_MIN_INVOCATIONS": 0 } + }, + { + "name": "portable-selection-pointwise_nhwc_bias_tensor", + "provenance": { + "source": "Independent integer convolution and float64 requantization reference", + "notes": "Compact channel and reduction tails across supported layouts; integer outputs are checked exactly." + }, + "inputs": { + "x": { "dtype": "uint8", "shape": [1, 6, 7, 1], "data": { "kind": "cycle", "values": [10, 11, 12, 13] } }, + "x_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.5] } }, + "x_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [10] } }, + "w": { "dtype": "uint8", "shape": [1, 1, 1, 1], "data": { "kind": "values", "values": [14] } }, + "w_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.25] } }, + "w_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [10] } }, + "y_scale": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.125] } }, + "y_zero_point": { "dtype": "uint8", "shape": [], "data": { "kind": "values", "values": [100] } }, + "B": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [-2] } } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 6, 7, 1], + "data": { + "kind": "values", + "values": [98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102, 106, 110, 98, 102] + }, + "tolerance": 0 + } + }, + "attrs": { "channels_last": 1 }, + "tunables": { "EXACT_MATRIX_MIN_INVOCATIONS": 0 } + }, + { + "name": "portable-selection-im2col_nhwc_column", + "provenance": { + "notes": "A 3x3 NHWC quantized convolution materializes the column matrix in (kh, kw, ic) order, with per-output-channel weight quantization, over 32 four-aligned input and output channels reducing a 20x20 input to an 18x18 output." + }, + "attrs": { "channels_last": 1, "strides": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 20, 20, 32], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [32, 32, 3, 3], + "data": { "kind": "cycle", "values": [12, -37, 88, -5, 61, -110, 24, 99, -71, 3, -20, 127, -96] } + }, + "w_scale": { + "dtype": "float32", + "shape": [32], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nhwc_dp4a_im2col_per_channel_3x3_c32_oc32_input_w_scale" } + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [32], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/nhwc_dp4a_im2col_per_channel_3x3_c32_oc32_input_w_zero_point" } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.192] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 18, 18, 32], "tolerance": 0 } }, + "tunables": { "EXACT_MATRIX_MIN_INVOCATIONS": 0 } + }, + { + "name": "qconv-nchw-prepared-boundary-k96", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 96, 1, 512], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 96, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 256, 1, 512], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "Exact integer output parity for adjacent contraction sizes sharing the same output grid." + } + }, + { + "name": "qconv-nchw-prepared-boundary-k128", + "attrs": { "channels_last": 0, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 128, 1, 512], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 128, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 256, 1, 512], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "Exact integer output parity for adjacent contraction sizes sharing the same output grid." + } + }, + { + "name": "qconv-nhwc-prepared-boundary-k96", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 512, 96], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 96, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 512, 256], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "Exact integer output parity for adjacent contraction sizes sharing the same output grid." + } + }, + { + "name": "qconv-nhwc-prepared-boundary-k128", + "attrs": { "channels_last": 1, "group": 1, "pads": [0, 0, 0, 0], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 1, 512, 128], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [256, 128, 1, 1], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [1, 1, 512, 256], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "Exact integer output parity for adjacent contraction sizes sharing the same output grid." + } + }, + { + "name": "requant_i32_bias_low_bits", + "attrs": { "channels_last": 1, "group": 2, "strides": [1, 1], "dilations": [1, 1], "pads": [0, 0, 0, 0] }, + "inputs": { + "x": { "dtype": "int8", "shape": [1, 3, 5, 8], "data": { "kind": "constant", "value": -3 } }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w": { "dtype": "int8", "shape": [8, 4, 1, 1], "data": { "kind": "constant", "value": 0 } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [33554432.0] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { + "dtype": "int32", + "shape": [8], + "data": { + "kind": "values", + "values": [16777215, 16777217, -16777215, -16777217, 16777213, 16777219, -16777213, -16777219] + } + } + }, + "outputs": { + "y": { + "dtype": "int8", + "shape": [1, 3, 5, 8], + "tolerance": 0, + "relTolerance": 0, + "data": { "kind": "cycle", "values": [0, 1, 0, -1, 0, 1, 0, -1] } + } + }, + "provenance": { + "notes": "Zero centered contraction isolates i32 bias requantization. Inline values independently evaluate the specified binary64 scale division, accumulator product and nearest-even integer rounding; no float32 conversion of the accumulator is permitted to erase its low bits." + } + }, + { + "name": "requant_i32_bias_endpoints", + "attrs": { "channels_last": 1, "group": 2, "strides": [1, 1], "dilations": [1, 1], "pads": [0, 0, 0, 0] }, + "inputs": { + "x": { "dtype": "int8", "shape": [1, 3, 5, 8], "data": { "kind": "constant", "value": -3 } }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w": { "dtype": "int8", "shape": [8, 4, 1, 1], "data": { "kind": "constant", "value": 0 } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2147483648.0] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { + "dtype": "int32", + "shape": [8], + "data": { + "kind": "values", + "values": [2147483647, 2147483646, -2147483648, -2147483647, 1073741823, 1073741825, -1073741823, -1073741825] + } + } + }, + "outputs": { + "y": { + "dtype": "int8", + "shape": [1, 3, 5, 8], + "tolerance": 0, + "relTolerance": 0, + "data": { "kind": "cycle", "values": [1, 1, -1, -1, 0, 1, 0, -1] } + } + }, + "provenance": { + "notes": "Zero centered contraction isolates i32 bias requantization. Inline values independently evaluate the specified binary64 scale division, accumulator product and nearest-even integer rounding; no float32 conversion of the accumulator is permitted to erase its low bits." + } + }, + { + "name": "requant_equal_scales_i32_bias_low_bits", + "attrs": { "channels_last": 1, "group": 2, "strides": [1, 1], "dilations": [1, 1], "pads": [0, 0, 0, 0] }, + "inputs": { + "x": { "dtype": "int8", "shape": [1, 3, 5, 8], "data": { "kind": "constant", "value": -3 } }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.9802322387695312e-8] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w": { "dtype": "int8", "shape": [8, 4, 1, 1], "data": { "kind": "constant", "value": 0 } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.123] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.123] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { + "dtype": "int32", + "shape": [8], + "data": { + "kind": "values", + "values": [16777215, 16777217, -16777215, -16777217, 16777213, 16777219, -16777213, -16777219] + } + } + }, + "outputs": { + "y": { + "dtype": "int8", + "shape": [1, 3, 5, 8], + "tolerance": 0, + "relTolerance": 0, + "data": { "kind": "cycle", "values": [0, 1, 0, -1, 0, 1, 0, -1] } + } + }, + "provenance": { + "notes": "Zero centered contraction isolates i32 bias requantization. Inline values independently evaluate the specified binary64 scale division, accumulator product and nearest-even integer rounding; no float32 conversion of the accumulator is permitted to erase its low bits." + } + }, + { + "name": "requant_binary64_bias_midpoint", + "attrs": { "channels_last": 1, "group": 2, "strides": [1, 1], "dilations": [1, 1], "pads": [0, 0, 0, 0] }, + "inputs": { + "x": { "dtype": "int8", "shape": [1, 3, 5, 8], "data": { "kind": "constant", "value": -3 } }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.00006103515625] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w": { "dtype": "int8", "shape": [8, 4, 1, 1], "data": { "kind": "constant", "value": 0 } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.99993896484375] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [536870912.0] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { + "dtype": "int32", + "shape": [8], + "data": { + "kind": "values", + "values": [805306371, -805306371, 805306370, -805306370, 805306372, -805306372, 805306369, -805306369] + } + } + }, + "outputs": { + "y": { + "dtype": "int8", + "shape": [1, 3, 5, 8], + "tolerance": 0, + "relTolerance": 0, + "data": { "kind": "cycle", "values": [2, -2, 1, -1, 2, -2, 1, -1] } + } + }, + "provenance": { + "notes": "Zero centered contraction isolates i32 bias requantization. Inline values independently evaluate the specified binary64 scale division, accumulator product and nearest-even integer rounding; no float32 conversion of the accumulator is permitted to erase its low bits. The ±805306371 channels round to an exact half in the binary64 product; neighboring accumulators remain on either side." + } + }, + { + "name": "requant_midpoint_product_overflow", + "attrs": { "channels_last": 1, "group": 2, "strides": [1, 1], "dilations": [1, 1], "pads": [0, 0, 0, 0] }, + "inputs": { + "x": { "dtype": "int8", "shape": [1, 3, 5, 8], "data": { "kind": "constant", "value": -3 } }, + "x_scale": { + "dtype": "float32", + "shape": [1], + "data": { "kind": "values", "values": [3.4028234663852886e+38] } + }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w": { "dtype": "int8", "shape": [8, 4, 1, 1], "data": { "kind": "constant", "value": 0 } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [6.380294379767596e+37] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [1, -1, 1, -1, 1, -1, 1, -1] } } + }, + "outputs": { + "y": { + "dtype": "int8", + "shape": [1, 3, 5, 8], + "tolerance": 0, + "relTolerance": 0, + "data": { "kind": "cycle", "values": [5, -5, 5, -5, 5, -5, 5, -5] } + } + }, + "provenance": { + "notes": "Zero centered contraction isolates i32 bias requantization. Inline values independently evaluate the specified binary64 scale division, accumulator product and nearest-even integer rounding; no float32 conversion of the accumulator is permitted to erase its low bits." + } + }, + { + "name": "requant_reciprocal_subnormal", + "attrs": { "channels_last": 1, "group": 2, "strides": [1, 1], "dilations": [1, 1], "pads": [0, 0, 0, 0] }, + "inputs": { + "x": { "dtype": "int8", "shape": [1, 3, 5, 8], "data": { "kind": "constant", "value": -3 } }, + "x_scale": { + "dtype": "float32", + "shape": [1], + "data": { "kind": "values", "values": [18446744073709552000.0] } + }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w": { "dtype": "int8", "shape": [8, 4, 1, 1], "data": { "kind": "constant", "value": 0 } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [76954664960.0] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { + "dtype": "float32", + "shape": [1], + "data": { "kind": "values", "values": [1.7014118346046923e+38] } + }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { + "dtype": "int32", + "shape": [8], + "data": { + "kind": "values", + "values": [-179781933, 179781933, -608706486, 608706486, -144870425, 144870425, -1, 1] + } + } + }, + "outputs": { + "y": { + "dtype": "int8", + "shape": [1, 3, 5, 8], + "tolerance": 0, + "relTolerance": 0, + "data": { "kind": "cycle", "values": [-2, 2, -5, 5, -1, 1, 0, 0] } + } + }, + "provenance": { + "notes": "Zero centered contraction isolates i32 bias requantization. Inline values independently evaluate the specified binary64 scale division, accumulator product and nearest-even integer rounding; no float32 conversion of the accumulator is permitted to erase its low bits." + } + }, + { + "name": "requant_scale_product_overflow", + "attrs": { "channels_last": 1, "group": 2, "strides": [1, 1], "dilations": [1, 1], "pads": [0, 0, 0, 0] }, + "inputs": { + "x": { "dtype": "int8", "shape": [1, 3, 5, 8], "data": { "kind": "constant", "value": -3 } }, + "x_scale": { + "dtype": "float32", + "shape": [1], + "data": { "kind": "values", "values": [1.2676506002282294e+30] } + }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w": { "dtype": "int8", "shape": [8, 4, 1, 1], "data": { "kind": "constant", "value": 0 } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.901475900342344e+30] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [8.507059173023462e+37] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [1, -1, 1, -1, 1, -1, 1, -1] } } + }, + "outputs": { + "y": { + "dtype": "int8", + "shape": [1, 3, 5, 8], + "tolerance": 0, + "relTolerance": 0, + "data": { "kind": "cycle", "values": [127, -128, 127, -128, 127, -128, 127, -128] } + } + }, + "provenance": { + "notes": "The finite scales overflow a binary32 intermediate but their binary64 quotient is well defined and saturates. Bit-derived pre-operation range guards must reject this path even on an implementation that returns a finite overflow result." + } + }, + { + "name": "nhwc_bias_group2_scalar_u8s8_narrow", + "attrs": { "channels_last": 1, "group": 2, "strides": [1, 1], "dilations": [1, 1], "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [2, 7, 3, 8], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nhwc_bias_x_uint8_67" } } + }, + "w": { + "dtype": "int8", + "shape": [8, 4, 3, 3], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nhwc_bias_w_int8_71" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { + "dtype": "int32", + "shape": [8], + "data": { "kind": "values", "values": [-16384, -8465, -546, 7373, 15292, -9557, -1638, 6281] } + } + }, + "outputs": { "y": { "dtype": "int8", "shape": [2, 7, 3, 8], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "Small grouped convolution with scalar quantization, unsigned activation, signed weights and output, nonperiodic bias, batch two and width three." + } + }, + { + "name": "nhwc_bias_group2_per_channel_tile2_tail", + "attrs": { "channels_last": 1, "group": 2, "pads": [1, 1, 1, 1], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "int8", + "shape": [2, 5, 7, 16], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w": { + "dtype": "int8", + "shape": [32, 8, 3, 3], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { + "dtype": "float32", + "shape": [32], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/qconv-nchw-signed-group2-control-fixture_input_w_scale" } + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [32], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/qconv-nchw-signed-group2-control-fixture_input_w_zero_point" } + } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { + "dtype": "int32", + "shape": [32], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/nhwc_bias_nonperiodic_B_int32_32" } } + } + }, + "outputs": { "y": { "dtype": "int8", "shape": [2, 5, 7, 32], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "Compact signed grouped/per-channel route with batch two. Width seven exercises a partial spatial tile. Distinct channel-block bias values expose accidental reuse of the first bias quadruple." + }, + "tunables": { "NHWC_BIAS_TARGET_WORKGROUPS": 1 } + }, + { + "name": "nhwc_bias_depthwise_per_channel_tile3_tail", + "provenance": { + "notes": "Per-channel unit-depthwise quantization. Width ten leaves a one-column output tail. Distinct channel-block bias values expose accidental reuse of the first bias quadruple. Independent integer convolution and explicit binary64 nearest-even rounding pin all 800 output bytes. At NHWC[0,0,3,7], accumulator 4750 times 6442451/2^30 is 28.5 + 133/2^29, requiring output 157; ORT rounds a float32 intermediate onto 28.5 and returns 156." + }, + "attrs": { "channels_last": 1, "group": 8, "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [1, 10, 10, 8], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nchw_dp4a_pointwise_c66_tail_oc32_input_x" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [8, 1, 3, 3], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nhwc_bias_w_int8_13" } } + }, + "w_scale": { + "dtype": "float32", + "shape": [8], + "data": { "kind": "values", "values": [0.01, 0.012, 0.014, 0.016, 0.018, 0.02, 0.022, 0.024] } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [8], + "data": { "kind": "values", "values": [-3, -2, -1, 0, 1, 2, 3, 4] } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.08] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "B": { + "dtype": "int32", + "shape": [8], + "data": { "kind": "values", "values": [-16384, -8465, -546, 7373, 15292, -9557, -1638, 6281] } + } + }, + "outputs": { + "y": { + "dtype": "uint8", + "shape": [1, 10, 10, 8], + "tolerance": 0, + "relTolerance": 0, + "data": { + "kind": "values", + "values": [35, 100, 171, 140, 213, 66, 56, 174, 80, 93, 56, 166, 152, 118, 227, 255, 145, 87, 201, 196, 255, 33, 208, 4, 61, 147, 140, 121, 163, 76, 76, 157, 81, 77, 124, 136, 85, 201, 51, 255, 109, 100, 136, 192, 255, 0, 135, 66, 61, 127, 80, 214, 197, 41, 248, 159, 56, 51, 192, 77, 169, 187, 60, 199, 110, 113, 154, 142, 224, 11, 10, 90, 84, 133, 28, 250, 184, 66, 199, 255, 72, 97, 67, 148, 245, 178, 98, 253, 84, 57, 236, 185, 241, 117, 0, 0, 109, 155, 68, 174, 36, 62, 119, 255, 73, 61, 76, 81, 255, 69, 253, 161, 35, 93, 173, 148, 255, 0, 51, 0, 115, 110, 124, 189, 27, 179, 115, 255, 151, 44, 151, 146, 255, 169, 144, 114, 25, 135, 120, 143, 252, 0, 28, 215, 73, 144, 49, 156, 55, 146, 243, 247, 118, 83, 163, 184, 255, 54, 166, 0, 61, 109, 179, 211, 189, 0, 94, 150, 102, 59, 183, 87, 16, 220, 47, 255, 81, 106, 77, 171, 255, 18, 153, 0, 45, 167, 47, 255, 170, 0, 186, 216, 80, 12, 206, 70, 69, 255, 70, 255, 96, 73, 212, 125, 255, 2, 35, 0, 84, 175, 10, 244, 151, 0, 166, 255, 71, 26, 86, 107, 245, 186, 157, 185, 84, 57, 236, 185, 241, 117, 0, 0, 84, 117, 71, 161, 161, 66, 78, 255, 82, 65, 83, 99, 255, 126, 97, 251, 35, 93, 173, 148, 255, 0, 51, 0, 115, 110, 124, 189, 27, 179, 115, 255, 151, 44, 151, 146, 255, 169, 144, 114, 25, 135, 120, 143, 252, 0, 28, 215, 73, 144, 49, 156, 55, 146, 243, 247, 138, 90, 127, 173, 255, 79, 197, 0, 67, 132, 217, 160, 182, 0, 13, 255, 102, 59, 183, 87, 16, 220, 47, 255, 71, 133, 86, 186, 255, 29, 138, 0, 36, 173, 69, 255, 187, 0, 186, 148, 80, 12, 206, 70, 69, 255, 70, 255, 96, 73, 212, 125, 255, 2, 35, 0, 84, 175, 10, 244, 151, 0, 166, 255, 71, 26, 86, 107, 245, 186, 157, 185, 84, 57, 236, 185, 241, 117, 0, 0, 109, 155, 68, 174, 36, 62, 119, 255, 73, 61, 76, 81, 255, 69, 253, 161, 35, 93, 173, 148, 255, 0, 51, 0, 127, 44, 138, 192, 79, 207, 56, 255, 153, 48, 143, 155, 244, 193, 94, 105, 25, 135, 120, 143, 252, 0, 28, 215, 73, 144, 49, 156, 55, 146, 243, 247, 138, 90, 127, 173, 255, 79, 197, 0, 67, 132, 217, 160, 182, 0, 13, 255, 102, 59, 183, 87, 16, 220, 47, 255, 81, 106, 77, 171, 255, 18, 153, 0, 45, 167, 47, 255, 170, 0, 186, 216, 80, 12, 206, 70, 69, 255, 70, 255, 88, 156, 164, 131, 255, 0, 88, 0, 77, 152, 85, 197, 167, 0, 102, 255, 71, 26, 86, 107, 245, 186, 157, 185, 84, 57, 236, 185, 241, 117, 0, 0, 109, 155, 68, 174, 36, 62, 119, 255, 73, 61, 76, 81, 255, 69, 253, 161, 35, 93, 173, 148, 255, 0, 51, 0, 115, 110, 124, 189, 27, 179, 115, 255, 151, 44, 151, 146, 255, 169, 144, 114, 25, 135, 120, 143, 252, 0, 28, 215, 99, 93, 91, 164, 118, 164, 200, 227, 136, 98, 72, 190, 255, 102, 169, 0, 67, 132, 217, 160, 182, 0, 13, 255, 102, 59, 183, 87, 16, 220, 47, 255, 81, 106, 77, 171, 255, 18, 153, 0, 45, 167, 47, 255, 170, 0, 186, 216, 80, 12, 206, 70, 69, 255, 70, 255, 96, 73, 212, 125, 255, 2, 35, 0, 84, 175, 10, 244, 151, 0, 166, 255, 71, 26, 86, 107, 245, 186, 157, 185, 95, 112, 209, 193, 155, 126, 13, 0, 102, 146, 109, 188, 31, 64, 140, 240, 73, 61, 76, 81, 255, 69, 253, 161, 35, 93, 173, 148, 255, 0, 51, 0, 115, 110, 124, 189, 27, 179, 115, 255, 151, 44, 151, 146, 255, 169, 144, 114, 25, 135, 120, 143, 252, 0, 28, 215, 73, 144, 49, 156, 55, 146, 243, 247, 138, 90, 127, 173, 255, 79, 197, 0, 67, 132, 217, 160, 182, 0, 13, 255, 61, 89, 176, 87, 158, 131, 106, 255, 67, 98, 116, 115, 255, 35, 144, 138, 23, 175, 82, 255, 146, 0, 146, 199, 123, 48, 135, 92, 55, 209, 89, 215, 87, 77, 208, 152, 255, 54, 6, 48, 70, 166, 87, 179, 200, 0, 129, 255, 101, 61, 54, 106, 174, 172, 203, 140, 49, 52, 198, 253, 208, 111, 0, 25, 115, 141, 145, 143, 102, 45, 105, 255, 127, 99, 49, 51, 255, 103, 245, 131, 60, 105, 130, 218, 150, 70, 95, 0] + } + } + }, + "tunables": { "WORKGROUP_SIZE": 64, "NHWC_BIAS_TARGET_WORKGROUPS": 1 } + }, + { + "name": "nhwc_bias_multiplier4_u8_weights_tile4_tail", + "attrs": { "channels_last": 1, "group": 8, "strides": [1, 1], "dilations": [1, 1], "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "int8", + "shape": [2, 17, 19, 8], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nhwc_bias_x_int8_67" } } + }, + "w": { + "dtype": "uint8", + "shape": [32, 1, 3, 3], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nhwc_bias_w_uint8_71" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w_scale": { + "dtype": "float32", + "shape": [32], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/qconv-nchw-signed-group2-control-fixture_input_w_scale" } + } + }, + "w_zero_point": { + "dtype": "uint8", + "shape": [32], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/nhwc_bias_w_zero_point_uint8_32" } } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "B": { + "dtype": "int32", + "shape": [32], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/nhwc_bias_B_int32_32_2" } } + } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [2, 17, 19, 32], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "Depthwise multiplier four with signed activation, unsigned weights and output, and nonperiodic bias; width 19 leaves three columns after four-wide groups." + }, + "tunables": { "NHWC_BIAS_TARGET_WORKGROUPS": 1 } + }, + { + "name": "nhwc_bias_depthwise_scalar_zero_bias", + "attrs": { "channels_last": 1, "group": 16, "pads": [1, 1, 1, 1], "strides": [1, 1], "dilations": [1, 1] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [2, 5, 7, 16], + "data": { "kind": "cycle", "values": [0, 17, 129, 255, 43, 88, 201] } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w": { + "dtype": "int8", + "shape": [16, 1, 3, 3], + "data": { "kind": "cycle", "values": [-128, 17, 99, -45, 127, -2, 31] } + }, + "w_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }, + "B": { + "dtype": "int32", + "shape": [16], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/nhwc_bias_B_int32_16" } } + } + }, + "outputs": { "y": { "dtype": "uint8", "shape": [2, 5, 7, 16], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "An explicit zero bias is neutral but must still be applied as a present bias. Scalar quantization, batch two and unsigned output; the bias-absent sibling already exists." + } + }, + { + "name": "nhwc_bias_group_width2_fallback", + "attrs": { "channels_last": 1, "group": 2, "strides": [1, 1], "dilations": [1, 1], "pads": [1, 1, 1, 1] }, + "inputs": { + "x": { + "dtype": "int8", + "shape": [1, 7, 5, 8], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nhwc_bias_x_int8_67" } } + }, + "w": { + "dtype": "int8", + "shape": [4, 4, 3, 3], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nhwc_bias_w_int8_71" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w_scale": { + "dtype": "float32", + "shape": [4], + "data": { "kind": "values", "values": [0.015625, 0.0078125, 0.01171875, 0.015625] } + }, + "w_zero_point": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [0, -3, 5, 0] } }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { "dtype": "int32", "shape": [4], "data": { "kind": "values", "values": [-16384, -8465, -546, 7373] } } + }, + "outputs": { "y": { "dtype": "int8", "shape": [1, 7, 5, 4], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A grouped (group=2) NHWC quantized convolution with a 3x3 kernel and padding 1 produces 4 output channels, 2 per group, so a four-channel output block spans two groups; a per-channel bias is applied." + } + }, + { + "name": "nhwc_bias_count24_fallback", + "attrs": { "channels_last": 1, "group": 2, "strides": [1, 1], "dilations": [1, 1], "pads": [0, 0, 0, 0] }, + "inputs": { + "x": { + "dtype": "int8", + "shape": [1, 1, 3, 8], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nhwc_bias_x_int8_67" } } + }, + "w": { + "dtype": "int8", + "shape": [8, 4, 1, 1], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nhwc_bias_w_int8_71" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w_scale": { + "dtype": "float32", + "shape": [8], + "data": { + "kind": "values", + "values": [0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125] + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [8], + "data": { "kind": "values", "values": [0, -3, 5, 0, -3, 5, 0, -3] } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { + "dtype": "int32", + "shape": [8], + "data": { "kind": "values", "values": [-16384, -8465, -546, 7373, 15292, -9557, -1638, 6281] } + } + }, + "outputs": { "y": { "dtype": "int8", "shape": [1, 1, 3, 8], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A grouped (group=2) NHWC pointwise quantized convolution with 8 output channels (4 per group) and a per-channel bias produces a 24-element (1x1x3x8) output." + } + }, + { + "name": "nhwc_bias_count32", + "attrs": { "channels_last": 1, "group": 2, "strides": [1, 1], "dilations": [1, 1], "pads": [0, 0, 0, 0] }, + "inputs": { + "x": { + "dtype": "int8", + "shape": [1, 1, 4, 8], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nhwc_bias_x_int8_67" } } + }, + "w": { + "dtype": "int8", + "shape": [8, 4, 1, 1], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nhwc_bias_w_int8_71" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [-3] } }, + "w_scale": { + "dtype": "float32", + "shape": [8], + "data": { + "kind": "values", + "values": [0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125, 0.01171875, 0.015625, 0.0078125] + } + }, + "w_zero_point": { + "dtype": "int8", + "shape": [8], + "data": { "kind": "values", "values": [0, -3, 5, 0, -3, 5, 0, -3] } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { + "dtype": "int32", + "shape": [8], + "data": { "kind": "values", "values": [-16384, -8465, -546, 7373, 15292, -9557, -1638, 6281] } + } + }, + "outputs": { "y": { "dtype": "int8", "shape": [1, 1, 4, 8], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "A grouped (group=2) NHWC pointwise quantized convolution with 8 output channels (4 per group) and a per-channel bias produces a 32-element (1x1x4x8) output, one row taller than its 24-element sibling." + } + }, + { + "name": "nhwc_bias_group4_dilated_asymmetric_u8_weights", + "attrs": { "channels_last": 1, "group": 4, "strides": [2, 1], "dilations": [2, 2], "pads": [1, 3, 2, 0] }, + "inputs": { + "x": { + "dtype": "uint8", + "shape": [2, 35, 39, 16], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nhwc_bias_x_uint8_67" } } + }, + "w": { + "dtype": "uint8", + "shape": [32, 4, 3, 3], + "data": { "kind": "cycle", "values": { "$ref": "#/fixtureArrays/nhwc_bias_w_uint8_71" } } + }, + "x_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.015625] } }, + "x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [127] } }, + "w_scale": { + "dtype": "float32", + "shape": [32], + "data": { + "kind": "values", + "values": { "$ref": "#/fixtureArrays/qconv-nchw-signed-group2-control-fixture_input_w_scale" } + } + }, + "w_zero_point": { + "dtype": "uint8", + "shape": [32], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/nhwc_bias_w_zero_point_uint8_32" } } + }, + "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } }, + "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }, + "B": { + "dtype": "int32", + "shape": [32], + "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/nhwc_bias_B_int32_32_2" } } + } + }, + "outputs": { "y": { "dtype": "int8", "shape": [2, 17, 38, 32], "tolerance": 0, "relTolerance": 0 } }, + "provenance": { + "notes": "Grouped biased convolution with unsigned activation/weights, signed output, per-channel scales/zero points, stride two, dilation two and asymmetric padding." + } + } + ] +}