From 05ac6d9f8d13a0ca4e13c716a81b52ad497e40bb Mon Sep 17 00:00:00 2001 From: Iman Tabrizian Date: Fri, 27 May 2022 14:12:00 -0400 Subject: [PATCH] Fix implicit state for models that have more than one state (#34) --- src/tensorrt.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tensorrt.cc b/src/tensorrt.cc index 65f62d3e..bfdf1af3 100644 --- a/src/tensorrt.cc +++ b/src/tensorrt.cc @@ -2440,10 +2440,13 @@ ModelInstanceState::Run( } if (io_binding_info.is_state_output_) { - payload_->seq_states_ = payload_->responder_->ProcessStateTensor( + auto updated_states = payload_->responder_->ProcessStateTensor( name, dt, batchn_shape, static_cast(io_binding_info.buffer_), io_binding_info.memory_type_, io_binding_info.memory_type_id_); + payload_->seq_states_.insert( + payload_->seq_states_.end(), updated_states.begin(), + updated_states.end()); } } }