onnxruntime/test/contrib_ops/quantize_linear_test.cc
TEST(DequantizeLinearOpTest, DequantizeLinear_1) {
  OpTester test("DequantizeLinear", 1, onnxruntime::kMSDomain);
  std::vector<int64_t> dims{4};
  test.AddInput<int8_t>("x", dims, {-30, -3, 100, 127});
  test.AddInput<float>("x_scale", {}, {2.0f});
  test.AddInput<int8_t>("x_zero_point", {}, {-10});
  test.AddOutput<float>("y", dims, {-40.0f, 14.0f, 220.0f, 274.0f});
  test.Run();
}
// scalar zero & scale with int8
scalar zero & scale with int8
scalar zero & scale with int8
TEST(DequantizeLinearOpTest, DequantizeLinear_1) {
  OpTester test("DequantizeLinear", 1, onnxruntime::kMSDomain);
  std::vector<int64_t> dims{4};
  test.AddInput<int8_t>("x", dims, {-30, -3, 100, 127});
  test.AddInput<float>("x_scale", {}, {2.0f});
  test.AddInput<int8_t>("x_zero_point", {}, {-10});
  test.AddOutput<float>("y", dims, {-40.0f, 14.0f, 220.0f, 274.0f});
  test.Run();
}
TEST ( DequantizeLinearOpTest , DequantizeLinear_1 ) { OpTester test ( " " , 1 , onnxruntime :: kMSDomain ) ; std :: vector < int64_t > dims { 4 } ; test . AddInput < int8_t > ( " " , dims , { -30 , -3 , 100 , 127 } ) ; test . AddInput < float > ( " " , { } , { 2.0f } ) ; test . AddInput < int8_t > ( " " , { } , { -10 } ) ; test . AddOutput < float > ( " " , dims , { -40.0f , 14.0f , 220.0f , 274.0f } ) ; test . Run ( ) ; }
scalar zero & scale with int8
scalar zero & scale with int8