From 6579f74af0c160f2d6090fbf12d1366a2cc305ef Mon Sep 17 00:00:00 2001 From: George Wu Date: Tue, 12 Mar 2024 23:35:05 -0700 Subject: [PATCH] skip onnx node_tests for tensorrt ep (#19880) fix build break caused by image update. tensorrt isn't expected to pass all onnx node tests. --- onnxruntime/test/providers/cpu/model_tests.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/onnxruntime/test/providers/cpu/model_tests.cc b/onnxruntime/test/providers/cpu/model_tests.cc index 7461717377..af71fe5cf7 100644 --- a/onnxruntime/test/providers/cpu/model_tests.cc +++ b/onnxruntime/test/providers/cpu/model_tests.cc @@ -620,6 +620,7 @@ static constexpr ORT_STRING_VIEW provider_name_dml = ORT_TSTR("dml"); std::vector paths; for (std::pair> kvp : provider_names) { + const ORT_STRING_VIEW provider_name = kvp.first; // Setup ONNX node tests. The test data is preloaded on our CI build machines. #if !defined(_WIN32) ORT_STRING_VIEW node_test_root_path = ORT_TSTR("/data/onnx"); @@ -627,7 +628,10 @@ static constexpr ORT_STRING_VIEW provider_name_dml = ORT_TSTR("dml"); ORT_STRING_VIEW node_test_root_path = ORT_TSTR("c:\\local\\data\\onnx"); #endif for (auto p : kvp.second) { - paths.push_back(ConcatPathComponent(node_test_root_path, p)); + // tensorrt ep isn't expected to pass all onnx node tests. exclude and run model tests only. + if (provider_name != provider_name_tensorrt) { + paths.push_back(ConcatPathComponent(node_test_root_path, p)); + } } // Same as the above, except this one is for large models @@ -646,7 +650,6 @@ static constexpr ORT_STRING_VIEW provider_name_dml = ORT_TSTR("dml"); } #endif - const ORT_STRING_VIEW provider_name = kvp.first; std::unordered_set> all_disabled_tests(std::begin(immutable_broken_tests), std::end(immutable_broken_tests)); if (provider_name == provider_name_cuda) {