mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-04 23:59:56 +00:00
fix: handle setBindingDimensions return value in TensorRT EP (#11929)
This commit is contained in:
parent
5646410f65
commit
8c8a781cdb
1 changed files with 5 additions and 1 deletions
|
|
@ -1626,7 +1626,11 @@ common::Status TensorrtExecutionProvider::Compile(const std::vector<FusedNodeAnd
|
|||
for (int j = 0, end = nb_dims; j < end; ++j) {
|
||||
dimensions.d[j] = static_cast<int32_t>(tensor_shapes[j]);
|
||||
}
|
||||
trt_context->setBindingDimensions(binding_index, dimensions);
|
||||
const bool status = trt_context->setBindingDimensions(binding_index, dimensions);
|
||||
if (!status) {
|
||||
ORT_THROW_IF_ERROR(ORT_MAKE_STATUS(ONNXRUNTIME, EP_FAIL,
|
||||
"TensorRT EP cannot set the dynamic dimensions of a binding"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue