File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -477,12 +477,10 @@ void removeShapeTensorCasts(IImporterContext* ctx)
477477 nvinfer1::ILayer* layer = ctx->network ()->getLayer (i);
478478 if (layer->getNbOutputs () > 0 && layer->getOutput (0 )->isShapeTensor ())
479479 {
480- layer->resetPrecision ();
481480 layer->resetOutputType (0 );
482481 nvinfer1::ITensor& t = *layer->getOutput (0 );
483482 // Assume that boolean tensors were not cast, and thus have their type correctly set.
484483 const nvinfer1::DataType shapeTensorType = t.getType () == nvinfer1::DataType::kBOOL ? nvinfer1::DataType::kBOOL : nvinfer1::DataType::kINT32 ;
485- layer->setPrecision (shapeTensorType);
486484 layer->setOutputType (0 , shapeTensorType);
487485 // Set type only if necessary, to avoid TensorRT warnings
488486 // about setting type of non-input/output tensors.
You can’t perform that action at this time.
0 commit comments