Skip to content

[BYOC][TensorRT] Fix dynamic batching when use_implicit_batch=False#8461

Merged
comaniac merged 1 commit intoapache:mainfrom
trevor-m:trt-explict-batch-mode-dynamic-batching
Jul 17, 2021
Merged

[BYOC][TensorRT] Fix dynamic batching when use_implicit_batch=False#8461
comaniac merged 1 commit intoapache:mainfrom
trevor-m:trt-explict-batch-mode-dynamic-batching

Conversation

@trevor-m
Copy link
Copy Markdown
Contributor

Fixes error for subgraphs with dynamic batch size when use_implicit_batch=False. Added test case.

Also fixes deserialization of cached engine when batch size is not 1.

Copy link
Copy Markdown
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@comaniac comaniac merged commit d3db5d6 into apache:main Jul 17, 2021
@comaniac
Copy link
Copy Markdown
Contributor

Thanks @trevor-m

std::vector<int64_t> shape(data_entry_[eid]->shape,
data_entry_[eid]->shape + data_entry_[eid]->ndim);
auto dims = VectorToTrtDims(shape);
ICHECK(context->setBindingDimensions(binding_index, dims));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setBindingDimensions is not available in JP 4.2 TRT 5.0.6

error: ‘class nvinfer1::IExecutionContext’ has no member named ‘setBindingDimensions’

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants