You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/04/27 22:40:40 UTC

[GitHub] [tvm] apivovarov commented on a diff in pull request #8461: [BYOC][TensorRT] Fix dynamic batching when use_implicit_batch=False

apivovarov commented on code in PR #8461:
URL: https://github.com/apache/tvm/pull/8461#discussion_r860296500


##########
src/runtime/contrib/tensorrt/tensorrt_runtime.cc:
##########
@@ -140,6 +140,12 @@ class TensorRTRuntime : public JSONRuntimeBase {
           const std::string name = nodes_[nid].GetOpName() + "_" + std::to_string(j);
           int binding_index = engine->getBindingIndex(name.c_str());
           ICHECK_NE(binding_index, -1);
+          if (!use_implicit_batch_) {
+            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));

Review Comment:
   `setBindingDimensions` is not available in JP 4.2 TRT 5.0.6
   ```
   error: ‘class nvinfer1::IExecutionContext’ has no member named ‘setBindingDimensions’
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org