From 28985c47b7092a88b73e4a91d2cb1291857f0954 Mon Sep 17 00:00:00 2001 From: yf711 <109183385+yf711@users.noreply.github.com> Date: Wed, 26 Apr 2023 11:44:19 -0700 Subject: [PATCH] [TensorRT EP] Unleash opset16-17 onnx model tests (#15657) ### Description In 2021 we restricted onnx node test CI execution in range of opset 14-15 for ORT-TRT, which was the latest opset that TRT EP could support Update this range to opset 14-17 to improve the ORT-TRT unit test coverage, as [Nvidia announced that TRT 8.6 supported opset17](https://github.com/onnx/onnx-tensorrt/blob/main/docs/operators.md) --- onnxruntime/test/providers/cpu/model_tests.cc | 20 +++++++++++++++++-- ...kerfile.manylinux2014_cuda11_8_tensorrt8_6 | 3 ++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/onnxruntime/test/providers/cpu/model_tests.cc b/onnxruntime/test/providers/cpu/model_tests.cc index 9886d9fdd7..de992a5ee8 100644 --- a/onnxruntime/test/providers/cpu/model_tests.cc +++ b/onnxruntime/test/providers/cpu/model_tests.cc @@ -108,13 +108,13 @@ TEST_P(ModelTest, Run) { } std::unique_ptr model_info = std::make_unique(model_path.c_str()); - if (model_info->GetONNXOpSetVersion() != 14 && model_info->GetONNXOpSetVersion() != 15 && + if ((model_info->GetONNXOpSetVersion() < 14 || model_info->GetONNXOpSetVersion() > 17) && provider_name == "tensorrt") { // TensorRT can run most of the model tests, but only part of // them is enabled here to save CI build time. // Besides saving CI build time, TRT isn’t able to support full ONNX ops spec and therefore some testcases will // fail. That's one of reasons we skip those testcases and only test latest ONNX opsets. - SkipTest(" tensorrt only support opset 14 or 15"); + SkipTest(" tensorrt: only enable opset 14 to 17 of onnx tests"); return; } @@ -452,6 +452,22 @@ TEST_P(ModelTest, Run) { broken_tests.insert({"conv_with_autopad_same", "Internal Error (node_of_y: Cannot set more than one input unless network has Q/DQ layers.)"}); + // unsupported tests since opset16 + broken_tests.insert({"sequence_map_add_2_sequences", "not supported by TensorRT EP"}); + broken_tests.insert({"sequence_map_extract_shapes", "not supported by TensorRT EP."}); + broken_tests.insert({"sequence_map_add_1_sequence_1_tensor", "not supported by TensorRT EP."}); + broken_tests.insert({"sequence_map_identity_1_sequence", "not supported by TensorRT EP."}); + broken_tests.insert({"sequence_map_identity_2_sequences", "not supported by TensorRT EP."}); + broken_tests.insert({"sequence_map_identity_1_sequence_1_tensor", "not supported by TensorRT EP."}); + broken_tests.insert({"leakyrelu_expanded", "not supported by TensorRT EP."}); + broken_tests.insert({"leakyrelu_default_expanded", "not supported by TensorRT EP."}); + broken_tests.insert({"leakyrelu_example_expanded", "not supported by TensorRT EP."}); + broken_tests.insert({"prelu_broadcast_expanded", "not supported by TensorRT EP."}); + broken_tests.insert({"prelu_example_expanded", "not supported by TensorRT EP."}); + broken_tests_keyword_set.insert({"scatternd_add"}); + broken_tests_keyword_set.insert({"scatternd_multiply"}); + broken_tests_keyword_set.insert({"scatter_elements_with_duplicate_indices"}); + // sce op is not supported broken_tests_keyword_set.insert({"sce"}); diff --git a/tools/ci_build/github/linux/docker/Dockerfile.manylinux2014_cuda11_8_tensorrt8_6 b/tools/ci_build/github/linux/docker/Dockerfile.manylinux2014_cuda11_8_tensorrt8_6 index 6f12da4497..c7ff302128 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.manylinux2014_cuda11_8_tensorrt8_6 +++ b/tools/ci_build/github/linux/docker/Dockerfile.manylinux2014_cuda11_8_tensorrt8_6 @@ -181,4 +181,5 @@ ARG BUILD_USER=onnxruntimedev RUN adduser --uid $BUILD_UID $BUILD_USER WORKDIR /home/$BUILD_USER USER $BUILD_USER -ENV PATH /usr/local/dotnet:$PATH \ No newline at end of file +ENV PATH /usr/local/dotnet:$PATH +ENV CUDA_MODULE_LOADING "LAZY" \ No newline at end of file