Description
Could not able to process or set the batch size to TRT engine.
Environment
TensorRT Version: 8.0.1
GPU Type: GeForce
Nvidia Driver Version: 470.57.02
CUDA Version: 11.4
CUDNN Version: 8.2.*
Operating System + Version: Ubuntu 18.04 LST
Python Version (if applicable): NO
TensorFlow Version (if applicable): NO
PyTorch Version (if applicable): 1.8.1
Baremetal or Container (if container which image + tag): NO
Relevant Files
trt_v8_cpp_batch_processing.zip (20.6 KB)
Steps To Reproduce
- Run the
model.py
to generate a dummy model [Used ] - Run the
CMake
build command to build thetensorrt_model
-
./tensorrt_model 0
→ To serialize the TRT engine from ONNX model -
./tensorrt_model 1
→ To deserialize the TRT engine and check the CMD output
LOG
================= Engine Info =================
batch_size_engine : 2
num_bindings : 2
================= Input =================
Name : input
Shape : [1, 3, 20, 40, ]
================= Output =================
Name : output
Shape : [1, 8, 5, 10, ]
================= Context Info =================
Dimension Specified 1
Input Shape : [1, 3, 20, 40, ]
Output Shape : [1, 8, 5, 10, ]
================= After setting binding dimension to Context Info =================
3: [executionContext.cpp::setBindingDimensions::969] Error Code 3: Internal Error (Parameter check failed at: runtime/api/executionContext.cpp::setBindingDimensions::969, condition: profileMaxDims.d[i] >= dimensions.d[i]. Supplied binding dimension [2,3,20,40] for bindings[0] exceed min ~ max range at index 0, maximum dimension in profile is 1, minimum dimension in profile is 1, but supplied dimension is 2.
)
Output Shape : [1, 3, 20, 40, ]
Please include:
- Exact steps/commands to build your repro
- Exact steps/commands to run your repro
- Full traceback of errors encountered