onnxruntime/test/contrib_ops/quantize_linear_test.cc
TEST(DequantizeLinearOpTest, DequantizeLinear_3) {
  OpTester test("DequantizeLinear", 1, onnxruntime::kMSDomain);
  std::vector<int64_t> dims{3, 4};
  test.AddInput<int8_t>("X", dims,
                        {0, 1, 2, 3,
                         0, 2, 4, 6,
                         0, 10, 20, 30});
  test.AddAttribute<int64_t>("axis", 1);
  test.AddInput<float>("scale", {4}, {1, 2, 4, 8});
  test.AddInput<int8_t>("zero_point", {4}, {0, -10, -20, -30});
  test.AddOutput<float>("Y", dims,
                        {0, 22, 88, 264,
                         0, 24, 96, 288,
                         0, 40, 160, 480});
  test.Run();
}
// 1d zero & scale with int8 broadcast axis 1
1d zero & scale with int8 broadcast axis 1
1d zero & scale with int8 broadcast axis 1
TEST(DequantizeLinearOpTest, DequantizeLinear_3) {
  OpTester test("DequantizeLinear", 1, onnxruntime::kMSDomain);
  std::vector<int64_t> dims{3, 4};
  test.AddInput<int8_t>("X", dims,
                        {0, 1, 2, 3,
                         0, 2, 4, 6,
                         0, 10, 20, 30});
  test.AddAttribute<int64_t>("axis", 1);
  test.AddInput<float>("scale", {4}, {1, 2, 4, 8});
  test.AddInput<int8_t>("zero_point", {4}, {0, -10, -20, -30});
  test.AddOutput<float>("Y", dims,
                        {0, 22, 88, 264,
                         0, 24, 96, 288,
                         0, 40, 160, 480});
  test.Run();
}
TEST ( DequantizeLinearOpTest , DequantizeLinear_3 ) { OpTester test ( " " , 1 , onnxruntime :: kMSDomain ) ; std :: vector < int64_t > dims { 3 , 4 } ; test . AddInput < int8_t > ( " " , dims , { 0 , 1 , 2 , 3 , 0 , 2 , 4 , 6 , 0 , 10 , 20 , 30 } ) ; test . AddAttribute < int64_t > ( " " , 1 ) ; test . AddInput < float > ( " " , { 4 } , { 1 , 2 , 4 , 8 } ) ; test . AddInput < int8_t > ( " " , { 4 } , { 0 , -10 , -20 , -30 } ) ; test . AddOutput < float > ( " " , dims , { 0 , 22 , 88 , 264 , 0 , 24 , 96 , 288 , 0 , 40 , 160 , 480 } ) ; test . Run ( ) ; }
1d zero & scale with int8 broadcast axis 1
1d zero & scale with int8 broadcast axis 1