Skip to content

Commit

Permalink
Try to limit the white-space changes made by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianlizarraga committed Sep 20, 2023
1 parent 3b0cd7e commit 6694aae
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions onnxruntime/test/optimizer/qdq_transformer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2497,39 +2497,39 @@ TEST(QDQTransformerTests, Clip) {
epsilon);
};

constexpr int16_t int16_min = std::numeric_limits<int16_t>::min();
constexpr uint16_t uint16_min = std::numeric_limits<uint16_t>::min();

std::vector<int> opsets{12, 18, 19};
for (auto opset : opsets) {
test_case(.0235294122248888f, static_cast<int8_t>(-128), 0, opset); // [0, 6]
test_case(.0235294122248888f, static_cast<int8_t>(-128), 0, opset, true); // [0, 6] contrib qdq
test_case(9.15541313801785e-5f, static_cast<int16_t>(std::numeric_limits<int16_t>::min()), 0,
opset, true); // [0, 6] contrib 16-bit qdq
test_case(0.0009f, static_cast<int16_t>(std::numeric_limits<int16_t>::min()), 1,
opset, true); // [0, 58.98] contrib 16-bit qdq
test_case(.02f, static_cast<int8_t>(-128), 0, opset); // [0, 5.1]
test_case(.02f, static_cast<int8_t>(-128), 0, opset, true); // [0, 5.1] contrib qdq
test_case(.03f, static_cast<int8_t>(-128), 1, opset); // [0, 7.65]
test_case(.03f, static_cast<int8_t>(-128), 1, opset, true); // [0, 7.65] contrib qdq
test_case(.02f, static_cast<int8_t>(127), 1, opset); // [-5.1 , 0]
test_case(.02f, static_cast<int8_t>(127), 1, opset, true); // [-5.1 , 0] contrib qdq
test_case(.02f, static_cast<int8_t>(0), 1, opset); // [-2.56, 2.54]
test_case(.02f, static_cast<int8_t>(0), 1, opset, true); // [-2.56, 2.54] contrib qdq
test_case(.04f, static_cast<int8_t>(-97), 1, opset); // [-1.24, 8.96]
test_case(.04f, static_cast<int8_t>(-97), 1, opset, true); // [-1.24, 8.96] contrib qdq
test_case(.02352941176f, static_cast<uint8_t>(0), 0, opset); // [0, 6]
test_case(.02352941176f, static_cast<uint8_t>(0), 0, opset, true); // [0, 6] contrib qdq
test_case(9.15541313801785e-5f, static_cast<uint16_t>(0),
0, opset, true); // [0, 6] contrib 16-bit qdq
test_case(0.0009f, static_cast<uint16_t>(0), 1, opset, true); // [0, 58.98] contrib 16-bit qdq
test_case(.02f, static_cast<uint8_t>(0), 0, opset); // [0, 5.1]
test_case(.02f, static_cast<uint8_t>(0), 0, opset, true); // [0, 5.1] contrib qdq
test_case(.03f, static_cast<uint8_t>(0), 1, opset); // [0, 7.65]
test_case(.03f, static_cast<uint8_t>(0), 1, opset, true); // [0, 7.65] contrib qdq
test_case(.02f, static_cast<uint8_t>(255), 1, opset); // [-5.1, 0]
test_case(.02f, static_cast<uint8_t>(255), 1, opset, true); // [-5.1, 0] contrib qdq
test_case(.02f, static_cast<uint8_t>(128), 1, opset); // [-2.56, 2.54]
test_case(.02f, static_cast<uint8_t>(128), 1, opset, true); // [-2.56, 2.54] contrib qdq
test_case(.04f, static_cast<uint8_t>(31), 1, opset); // [-1.24, 8.96]
test_case(.04f, static_cast<uint8_t>(31), 1, opset, true); // [-1.24, 8.96] contrib qdq
test_case(9.15541313801785e-5f, int16_min, 0, opset, true); // [0, 6] contrib 16-bit qdq
test_case(0.0009f, int16_min, 1, opset, true); // [0, 58.98] contrib 16-bit qdq
test_case(.02f, static_cast<int8_t>(-128), 0, opset); // [0, 5.1]
test_case(.02f, static_cast<int8_t>(-128), 0, opset, true); // [0, 5.1] contrib qdq
test_case(.03f, static_cast<int8_t>(-128), 1, opset); // [0, 7.65]
test_case(.03f, static_cast<int8_t>(-128), 1, opset, true); // [0, 7.65] contrib qdq
test_case(.02f, static_cast<int8_t>(127), 1, opset); // [-5.1 , 0]
test_case(.02f, static_cast<int8_t>(127), 1, opset, true); // [-5.1 , 0] contrib qdq
test_case(.02f, static_cast<int8_t>(0), 1, opset); // [-2.56, 2.54]
test_case(.02f, static_cast<int8_t>(0), 1, opset, true); // [-2.56, 2.54] contrib qdq
test_case(.04f, static_cast<int8_t>(-97), 1, opset); // [-1.24, 8.96]
test_case(.04f, static_cast<int8_t>(-97), 1, opset, true); // [-1.24, 8.96] contrib qdq
test_case(.02352941176f, static_cast<uint8_t>(0), 0, opset); // [0, 6]
test_case(.02352941176f, static_cast<uint8_t>(0), 0, opset, true); // [0, 6] contrib qdq
test_case(9.15541313801785e-5f, uint16_min, 0, opset, true); // [0, 6] contrib 16-bit qdq
test_case(0.0009f, uint16_min, 1, opset, true); // [0, 58.98] contrib 16-bit qdq
test_case(.02f, static_cast<uint8_t>(0), 0, opset); // [0, 5.1]
test_case(.02f, static_cast<uint8_t>(0), 0, opset, true); // [0, 5.1] contrib qdq
test_case(.03f, static_cast<uint8_t>(0), 1, opset); // [0, 7.65]
test_case(.03f, static_cast<uint8_t>(0), 1, opset, true); // [0, 7.65] contrib qdq
test_case(.02f, static_cast<uint8_t>(255), 1, opset); // [-5.1, 0]
test_case(.02f, static_cast<uint8_t>(255), 1, opset, true); // [-5.1, 0] contrib qdq
test_case(.02f, static_cast<uint8_t>(128), 1, opset); // [-2.56, 2.54]
test_case(.02f, static_cast<uint8_t>(128), 1, opset, true); // [-2.56, 2.54] contrib qdq
test_case(.04f, static_cast<uint8_t>(31), 1, opset); // [-1.24, 8.96]
test_case(.04f, static_cast<uint8_t>(31), 1, opset, true); // [-1.24, 8.96] contrib qdq
}

// opset_version = 10
Expand Down

0 comments on commit 6694aae

Please sign in to comment.