ELS-RD / transformer-deploy

Efficient, scalable and enterprise-grade CPU/GPU inference server for 🤗 Hugging Face transformer models 🚀
https://els-rd.github.io/transformer-deploy/
Apache License 2.0
1.64k stars 150 forks source link

unable to do tensorrt inference #176

Open riyaj8888 opened 1 year ago

riyaj8888 commented 1 year ago

i am following this tutorial https://els-rd.github.io/transformer-deploy/python/

but unable to run it . below is error during build_engine i am getting follwoing error [07/12/2023-10:46:47] [TRT] [E] 3: [builderConfig.cpp::validatePool::334] Error Code 3: API Usage Error (Parameter check failed at: optimizer/api/builderConfig.cpp::validatePool::334, condition: false. Setting DLA memory pool size on TensorRT build with DLA disabled. ) [libprotobuf WARNING google/protobuf/io/coded_stream.cc:604] Reading dangerously large protocol message. If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING google/protobuf/io/coded_stream.cc:81] The total number of bytes read was 1110085751

during doing inference i am getting output as well as following error is printed

[07/12/2023-10:53:32] [TRT] [E] 3: [executionContext.cpp::validateInputBindings::1839] Error Code 3: API Usage Error (Parameter check failed at: runtime/api/executionContext.cpp::validateInputBindings::1839, condition: profileMinDims.d[i] <= dimensions.d[i]. Supplied binding dimension [1,8] for bindings[0] exceed min ~ max range at index 1, maximum dimension in profile is 512, minimum dimension in profile is 512, but supplied dimension is 8. ) [07/12/2023-10:53:32] [TRT] [E] 3: [executionContext.cpp::validateInputBindings::1839] Error Code 3: API Usage Error (Parameter check failed at: runtime/api/executionContext.cpp::validateInputBindings::1839, condition: profileMinDims.d[i] <= dimensions.d[i]. Supplied binding dimension [1,8] for bindings[1] exceed min ~ max range at index 1, maximum dimension in profile is 512, minimum dimension in profile is 512, but supplied dimension is 8. )