Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tpboudreau committed Mar 19, 2024
1 parent f202de6 commit 25920cb
Showing 1 changed file with 42 additions and 46 deletions.
88 changes: 42 additions & 46 deletions onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1546,19 +1546,19 @@ TEST(MathOpTest, Min_12_Double) {
TEST(MathOpTest, Min_12_Double_Nan) {
OpTester test("Min", 12);
test.AddInput<double>("data_2", {3, 3},
{std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(),
-0.5, 0.0, -2.0,
0.5, 0.0, 2.0});
test.AddInput<double>("data_1", {3, 1},
{0.0, -1.0, 1.0});
test.AddOutput<double>("min", {3, 3},
{std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(),
-1.0, -1.0, -2.0,
0.5, 0.0, 1.0});
-0.5, 0.0, -2.0,
0.5, 0.0, 2.0});
test.AddInput<double>("data_1", {3, 1},
{0.0, -1.0, 1.0});
test.AddOutput<double>("min", {3, 3},
{std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(),
-1.0, -1.0, -2.0,
0.5, 0.0, 1.0});
test.Run(OpTester::ExpectResult::kExpectSuccess, "", {kTensorrtExecutionProvider, kOpenVINOExecutionProvider}); // TensorRT: Input batch size is inconsistent
}

Check warning on line 1564 in onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc

View workflow job for this annotation

GitHub Actions / Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:1564: Lines should be <= 120 characters long [whitespace/line_length] [2]
Expand Down Expand Up @@ -1672,21 +1672,19 @@ TEST(MathOpTest, Min_12_MLFLoat16_Scalar1) {
TEST(MathOpTest, Min_12_MLFloat16_Nan) {
OpTester test("Min", 12);
test.AddInput<MLFloat16>("data_0", {3, 3},
MakeMLFloat16({
std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
-0.5f, 0.0f, -2.0f,
0.5f, 0.0f, 2.0f}));
MakeMLFloat16({std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
-0.5f, 0.0f, -2.0f,
0.5f, 0.0f, 2.0f}));
test.AddInput<MLFloat16>("data_1", {3, 1},
MakeMLFloat16({0.0f, -1.0f, 1.0f}));
MakeMLFloat16({0.0f, -1.0f, 1.0f}));
test.AddOutput<MLFloat16>("min", {3, 3},
MakeMLFloat16({
std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
-1.0f, -1.0f, -2.0f,
0.5f, 0.0f, 1.0f}));
MakeMLFloat16({std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
-1.0f, -1.0f, -2.0f,
0.5f, 0.0f, 1.0f}));
test.Run(OpTester::ExpectResult::kExpectSuccess, "", {kTensorrtExecutionProvider, kOpenVINOExecutionProvider}); // TensorRT: Input batch size is inconsistent
}

Check warning on line 1690 in onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc

View workflow job for this annotation

GitHub Actions / Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:1690: Lines should be <= 120 characters long [whitespace/line_length] [2]
Expand Down Expand Up @@ -1817,19 +1815,19 @@ TEST(MathOpTest, Max_12_Double) {
TEST(MathOpTest, Max_12_Double_Nan) {
OpTester test("Max", 12);
test.AddInput<double>("data_2", {3, 3},
{std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(),
-0.5, 0.0, -2.0,
0.5, 0.0, 2.0});
test.AddInput<double>("data_1", {3, 1},
{0.0, -1.0, 1.0});
test.AddOutput<double>("max", {3, 3},
{std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(),
-0.5, 0.0, -1.0,
1.0, 1.0, 2.0});
-0.5, 0.0, -2.0,
0.5, 0.0, 2.0});
test.AddInput<double>("data_1", {3, 1},
{0.0, -1.0, 1.0});
test.AddOutput<double>("max", {3, 3},
{std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(),
-0.5, 0.0, -1.0,
1.0, 1.0, 2.0});
test.Run(OpTester::ExpectResult::kExpectSuccess, "", {kTensorrtExecutionProvider, kOpenVINOExecutionProvider}); // TensorRT: Input batch size is inconsistent
}

Check warning on line 1833 in onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc

View workflow job for this annotation

GitHub Actions / Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:1833: Lines should be <= 120 characters long [whitespace/line_length] [2]
Expand Down Expand Up @@ -1943,21 +1941,19 @@ TEST(MathOpTest, Max_12_MLFLoat16_Scalar1) {
TEST(MathOpTest, Max_12_MLFloat16_Nan) {
OpTester test("Max", 12);
test.AddInput<MLFloat16>("data_0", {3, 3},
MakeMLFloat16({
std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
-0.5f, 0.0f, -2.0f,
0.5f, 0.0f, 2.0f}));
MakeMLFloat16({std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
-0.5f, 0.0f, -2.0f,
0.5f, 0.0f, 2.0f}));
test.AddInput<MLFloat16>("data_1", {3, 1},
MakeMLFloat16({0.0f, -1.0f, 1.0f}));
MakeMLFloat16({0.0f, -1.0f, 1.0f}));
test.AddOutput<MLFloat16>("max", {3, 3},
MakeMLFloat16({
std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
-0.5f, 0.0f, -1.0f,
1.0f, 1.0f, 2.0f}));
MakeMLFloat16({std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
std::numeric_limits<float>::quiet_NaN(),
-0.5f, 0.0f, -1.0f,
1.0f, 1.0f, 2.0f}));
test.Run(OpTester::ExpectResult::kExpectSuccess, "", {kTensorrtExecutionProvider, kOpenVINOExecutionProvider}); // TensorRT: Input batch size is inconsistent
}

Check warning on line 1959 in onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc

View workflow job for this annotation

GitHub Actions / Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc:1959: Lines should be <= 120 characters long [whitespace/line_length] [2]
Expand Down

0 comments on commit 25920cb

Please sign in to comment.