| 157 | } |
| 158 | |
| 159 | void TensorRTRuntimeOpr::scn_do_execute() { |
| 160 | auto batch = this->input(0)->shape()[0]; |
| 161 | if (m_trt_engine_has_batch) |
| 162 | m_manager.exec( |
| 163 | this, m_gpu_allocator ? m_gpu_allocator->comp_node() : CompNode{}, |
| 164 | m_engine.get()); |
| 165 | else |
| 166 | m_manager.exec( |
| 167 | this, m_gpu_allocator ? m_gpu_allocator->comp_node() : CompNode{}, |
| 168 | m_engine.get(), batch); |
| 169 | } |
| 170 | |
| 171 | void TensorRTRuntimeOpr::init_output_dtype() { |
| 172 | DType dt_trt, dt_input; |