-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce test time for TensorRT EP CI #10408
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
ed344c7
expand model tests name
chilo-ms f3d9772
skip cpu/cuda for trt when running onnxruntime_test_all
chilo-ms 3e5267b
only run trt ep for c++ unit test
chilo-ms 0034c55
Update CMAKE_CUDA_ARCHITECTURES for T4
chilo-ms ed5e28c
Use new t4 agent pool
chilo-ms dd70a4b
Update YAML for run T4 on Windows
chilo-ms 8ac7ef6
revert code
chilo-ms 0c897b2
Update CMAKE_CUDA_ARCHITECTURES
chilo-ms 0dfab8e
fix wrong value
chilo-ms 333568a
Remove cpu/cuda directly in model tests
chilo-ms e9f48a2
add only CMAKE_CUDA_ARCHITECTURES=75
chilo-ms efe6d31
remove expanding model test name to see difference
chilo-ms e069b3c
revert code
chilo-ms 29c1f52
Add fallback execution provider for unit test
chilo-ms 2c6ccd9
Add fallback execution provider for unit test (cont)
chilo-ms 6d22886
add conditional to add fackback cuda ep
chilo-ms a5e6a82
Reduction op takes much longer time for TRT 8.2, so we test smaller r…
chilo-ms 3b5a998
use M60
chilo-ms f0e643c
revert code
chilo-ms c04ef19
Merge branch 'master' into update_trt_ci
chilo-ms daa6a1c
revert code
chilo-ms 18c5dd8
add comments
chilo-ms 93013ec
Modify code and add comment
chilo-ms 2a75eb8
modify comment
chilo-ms 8880456
update comment
chilo-ms 42dc63c
add comment
chilo-ms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -994,6 +994,12 @@ void OpTester::Run( | |
std::vector<std::string> output_names; | ||
FillFeedsAndOutputNames(feeds, output_names); | ||
// Run the model | ||
#ifdef USE_TENSORRT | ||
// only run trt ep to reduce test time | ||
static const std::string all_provider_types[] = { | ||
kTensorrtExecutionProvider, | ||
}; | ||
#else | ||
static const std::string all_provider_types[] = { | ||
kCpuExecutionProvider, | ||
kCudaExecutionProvider, | ||
|
@@ -1008,6 +1014,7 @@ void OpTester::Run( | |
kRocmExecutionProvider, | ||
kCoreMLExecutionProvider, | ||
}; | ||
#endif | ||
|
||
bool has_run = false; | ||
|
||
|
@@ -1168,8 +1175,14 @@ void OpTester::Run( | |
cur_provider = "not set"; | ||
} | ||
|
||
#ifdef USE_TENSORRT | ||
// We are allowing tests to be run with only TensorRT EP, but TensorRT EP may not support all tests and may be in excluded providers list. | ||
// So, no registered EPs were able to run the model is okay for this situation. | ||
ORT_UNUSED_PARAMETER(has_run); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add a comment here to explain this case here. |
||
#else | ||
EXPECT_TRUE(has_run) | ||
<< "No registered execution providers were able to run the model."; | ||
#endif | ||
} | ||
} | ||
ORT_CATCH(const std::exception& ex) { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment on what we want to exclude here would be helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments are added here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know where the "cpu__" and "cuda__" in the test names come from - I didn't see them in the code. Explaining that would be helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the comment more clear.