@@ -180,22 +180,7 @@ void MarkOutputs(ConversionCtx* ctx, at::ArrayRef<const torch::jit::Value*> outp
180
180
if (it == ctx->value_tensor_map .end ()) {
181
181
if (ctx->evaluated_value_map .find (out) != ctx->evaluated_value_map .end ()) {
182
182
auto out_ivalue = ctx->evaluated_value_map [out];
183
- if (out_ivalue.isList ()) {
184
- auto output_list = out_ivalue.toList ();
185
- LOG_DEBUG (" One of the outputs is a TensorList. output_list size: " << output_list.size ());
186
-
187
- for (int i = 0 ; i < output_list.size (); i++) {
188
- std::string name = std::string (" output_" ) + std::to_string (ctx->num_outputs );
189
- auto output_container = output_list.get (i).toCustomClass <TensorContainer>();
190
- nvinfer1::ITensor* out_tensor = output_container.get ()->tensor ();
191
- out_tensor->setName (name.c_str ());
192
- ctx->net ->markOutput (*out_tensor);
193
- LOG_INFO (
194
- ctx->logger ,
195
- " Marking Output " << out->debugName () << " named " << name << " in engine (ctx.MarkOutput)" );
196
- ctx->num_outputs += 1 ;
197
- }
198
- } else if (out_ivalue.isCustomClass ()) {
183
+ if (out_ivalue.isCustomClass ()) {
199
184
std::string name = std::string (" output_" ) + std::to_string (ctx->num_outputs );
200
185
auto output_container = out_ivalue.toCustomClass <TensorContainer>();
201
186
nvinfer1::ITensor* out_tensor = output_container.get ()->tensor ();
@@ -374,8 +359,8 @@ void ConvertBlockToNetDef(
374
359
auto eval_list = eval.value ().toTuple ();
375
360
TRTORCH_CHECK (
376
361
eval_list->elements ().size () == n->outputs ().size (),
377
- " Size of evaluated results: " << eval_list->elements ().size () << " and node outputs size: " << n-> outputs (). size ()
378
- << " must match." );
362
+ " Size of evaluated results: " << eval_list->elements ().size ()
363
+ << " and node outputs size: " << n-> outputs (). size () << " must match." );
379
364
for (int i = 0 ; i < eval_list->elements ().size (); i++) {
380
365
auto eval_output = eval_list.get ()->elements ()[i];
381
366
LOG_DEBUG (
@@ -384,8 +369,7 @@ void ConvertBlockToNetDef(
384
369
ctx->AssociateValueAndIValue (n->output (i), eval_output);
385
370
}
386
371
} else {
387
- TRTORCH_THROW_ERROR (
388
- " Unsupported return type for evaluated node" );
372
+ TRTORCH_THROW_ERROR (" Unsupported return type for evaluated node" );
389
373
}
390
374
} else if (!eval.value ().isTensor ()) {
391
375
LOG_DEBUG (ctx->logger , " Found the value to be: " << eval.value ());
0 commit comments