Skip to content

Commit

Permalink
Fix handling of bs 1 with batching enabled in implicit mode (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayv25 authored Jul 12, 2022
1 parent bf54265 commit 23d320f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tensorrt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ ModelState::AutoCompleteConfigHelper(const std::string& model_path)
if (engine->hasImplicitBatchDimension()) {
// If engine has implicit batch dimension then retrieve the value and exit
max_batch_size = engine->getMaxBatchSize();
has_implicit_batch_dim = (max_batch_size != 1);
has_implicit_batch_dim = (max_batch_size != 1) || (MaxBatchSize() != 0);
} else {
// Assuming the first dimension to be batch dimension, until and unless
// proven the batching is not supported.
Expand Down

0 comments on commit 23d320f

Please sign in to comment.