File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,9 @@ void registerSegmentInOutIValues(
106
106
// set inputs ivalues, now supports Tensor/Int to pass argumentes between different segments
107
107
for (auto & input : seg_block.raw_inputs ()) {
108
108
TRTORCH_CHECK (ivalues_maps.count (input), " Could not find mini graph input IValue " << input->debugName ());
109
- if (input->type ()->isSubtypeOf (torch::jit::TensorType::get ())) {
109
+ if (input->node ()->kind () == torch::jit::prim::Param) {
110
+ jit_inputs_ivalues.push_back (ivalues_maps[input]);
111
+ } else if (input->type ()->isSubtypeOf (torch::jit::TensorType::get ())) {
110
112
jit_inputs_ivalues.push_back (ivalues_maps[input].toTensor ());
111
113
} else if (input->type ()->isSubtypeOf (torch::jit::IntType::get ())) {
112
114
jit_inputs_ivalues.push_back (ivalues_maps[input].toInt ());
You can’t perform that action at this time.
0 commit comments