Skip to content

Commit

Permalink
Unit test modification for TensorRT EP (#14339)
Browse files Browse the repository at this point in the history
Two modifications:

- After [TRT 8.5](#13867)
being merged, we can manually set timeout and make TRT EP only run small
portion of unit tests
(`onnxruntime_SKIP_AND_PERFORM_FILTERED_TENSORRT_TESTS=ON`) due to
additional TRT kernel overhead introduced by TRT 8.5 which increases
test time a lot. This PR modifies the checking condition and make
TensorRT CIs (can enable builder placeholder) still run most of the unit
tests.
- Exclude TRT EP from [Resize Opset
18](#13890) unit tests
since TensorRT 8.5 supports operators up to Opset 17.
  • Loading branch information
chilo-ms authored Jan 19, 2023
1 parent a491f33 commit 80d6198
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 2 additions & 1 deletion onnxruntime/test/providers/cpu/tensor/resize_op_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,8 @@ void TestAntialiasing(std::map<std::string, std::string> attributes,
}

test.AddOutput<T>("Y", output_shape, output_data);
test.Run(OpTester::ExpectResult::kExpectSuccess);
// TensorRT 8.5 supports operators up to Opset 17. Temporarily exclude TensorRT EP due to accurarcy issue.
test.Run(OpTester::ExpectResult::kExpectSuccess, "", {kTensorrtExecutionProvider});
}

TEST(ResizeOpTest, Antialias_Bilinear_No_ExcludeOutside) {
Expand Down
7 changes: 1 addition & 6 deletions tools/ci_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,6 @@ def convert_arg_line_to_args(self, arg_line):
)
parser.add_argument("--tensorrt_home", help="Path to TensorRT installation dir")
parser.add_argument("--test_all_timeout", default="10800", help="Set timeout for onnxruntime_test_all")
parser.add_argument(
"--skip_and_perform_filtered_tests",
action="store_true",
help="Skip time-consuming and only perform filtered tests for TensorRT EP",
)
parser.add_argument("--use_migraphx", action="store_true", help="Build with MIGraphX")
parser.add_argument("--migraphx_home", help="Path to MIGraphX installation dir")
parser.add_argument("--use_full_protobuf", action="store_true", help="Use the full protobuf library")
Expand Down Expand Up @@ -894,7 +889,7 @@ def generate_build_tree(
"-Donnxruntime_USE_VITISAI=" + ("ON" if args.use_vitisai else "OFF"),
"-Donnxruntime_USE_TENSORRT=" + ("ON" if args.use_tensorrt else "OFF"),
"-Donnxruntime_SKIP_AND_PERFORM_FILTERED_TENSORRT_TESTS="
+ ("ON" if args.test_all_timeout == "10800" else "OFF"),
+ ("ON" if not args.tensorrt_placeholder_builder else "OFF"),
"-Donnxruntime_USE_TENSORRT_BUILTIN_PARSER=" + ("ON" if args.use_tensorrt_builtin_parser else "OFF"),
"-Donnxruntime_TENSORRT_PLACEHOLDER_BUILDER=" + ("ON" if args.tensorrt_placeholder_builder else "OFF"),
# set vars for TVM
Expand Down

0 comments on commit 80d6198

Please sign in to comment.