Store an empty engine in the case that dynamic engine creation fails. The next time the same input shape appears, we will retrieve the empty engine which tells us to not rebuild the same failing engine again.
This commit is contained in:
parent
df3a9e555f
commit
fe020fccbb
@ -633,6 +633,9 @@ EngineContext* TRTEngineOp::GetEngine(
|
||||
}
|
||||
LOG(WARNING) << "Engine creation for batch size " << batch_size
|
||||
<< " failed " << status;
|
||||
// Store an empty engine here so we don't try to build the same engine
|
||||
// again.
|
||||
cache.emplace(engine_input_shapes, empty_context);
|
||||
return &empty_context;
|
||||
}
|
||||
VLOG(1) << "Conversion is done";
|
||||
|
Loading…
Reference in New Issue
Block a user