mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-29 23:06:41 +00:00
[TensorRT EP] reduce CI pipelines test execution time (#11440)
* add global builder placeholder to improve CI test time for TRT EP * fix build error * rename var, put in unnamed namespace * fix build error * fix
This commit is contained in:
parent
3f3c5fcd68
commit
8d6ade9e08
1 changed files with 10 additions and 0 deletions
|
|
@ -37,9 +37,19 @@
|
|||
? common::Status::OK() \
|
||||
: ORT_MAKE_STATUS(ONNXRUNTIME, FAIL, "CUDA error executing ", #expr))
|
||||
|
||||
namespace onnxruntime {
|
||||
TensorrtLogger& GetTensorrtLogger();
|
||||
}
|
||||
|
||||
using namespace ONNX_NAMESPACE;
|
||||
using namespace ::onnxruntime::logging;
|
||||
namespace {
|
||||
#ifdef ORT_RUN_EXTERNAL_ONNX_TESTS
|
||||
// instantiate global unused builder object which keeps the TRT kernel library in memory
|
||||
// so that subsequent builders avoid the expensive load / unload process.
|
||||
auto const trt_builder_placeholder =
|
||||
tensorrt_ptr::unique_pointer<nvinfer1::IBuilder>(nvinfer1::createInferBuilder(GetTensorrtLogger()));
|
||||
#endif
|
||||
// Check if cycle exists in the graph after partitioning
|
||||
bool FindCycleHelper(size_t i, const std::list<size_t>* adjacency_map, bool visited[], bool* st, std::vector<size_t>& cycles) {
|
||||
if (!visited[i]) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue