Skip to content

Commit bf4474d

Browse files
authored
fix: Repair index used to access tensor bindings (#1998)
1 parent 11e91d6 commit bf4474d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/runtime/TRTEngine.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ TRTEngine::TRTEngine(
111111
for (size_t pyt_idx = 0; pyt_idx < inputs_size; pyt_idx++) {
112112
auto binding_name = _in_binding_names[pyt_idx];
113113
auto trt_idx = cuda_engine->getBindingIndex(binding_name.c_str());
114-
std::string engine_binded_name = cuda_engine->getIOTensorName(pyt_idx);
114+
std::string engine_binded_name = cuda_engine->getIOTensorName(trt_idx);
115115
TORCHTRT_CHECK(
116116
(binding_name == engine_binded_name),
117117
"Could not find a TensorRT engine binding for input named " << binding_name);

0 commit comments

Comments
 (0)