Skip to content

Commit e74cedb

Browse files
committed
Call ReleaseTensorTypeAndShape after running onnx model with batching
1 parent dfaed79 commit e74cedb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/backends/onnxruntime.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ int RAI_ModelRunORT(RAI_ModelRunCtx **mctxs, RAI_Error *error) {
571571
ONNX_VALIDATE_STATUS(ort->GetDimensionsCount(info, &ndims))
572572
int64_t dims[ndims];
573573
ONNX_VALIDATE_STATUS(ort->GetDimensions(info, dims, ndims))
574+
ort->ReleaseTensorTypeAndShapeInfo(info);
574575
if (dims[0] != total_batch_size) {
575576
RAI_SetError(error, RAI_EMODELRUN,
576577
"ERR Model did not generate the expected batch size");

0 commit comments

Comments
 (0)