@@ -118,19 +118,26 @@ auto interpolate_registrations TRTORCH_UNUSED = RegisterNodeConversionPatterns()
118
118
119
119
TRTORCH_ASSERT (out_size.size () == 1 , " aten::upsample_linear1d input Tensor and output size dimension mismatch" );
120
120
121
- auto out_shape = in_shape;
121
+ auto out_shape = in_shape;
122
122
std::copy (out_size.begin (), out_size.end (), out_shape.begin () + (in_shape.size () - out_size.size ()));
123
123
124
124
if (!align_corners) {
125
- // auto creator = getPluginRegistry()->getPluginCreator("interpolate", "1");
126
- // auto* plugin = creator->createPlugin(util::node_info(n).c_str(), in_shape, out_shape, out_size, std::string("linear"), align_corners);
127
- auto creator = new plugins::InterpolatePluginCreator ();
125
+ // auto plugin = creator->createPlugin(util::node_info(n).c_str(), in_shape, out_shape, out_size, std::string("linear"), align_corners);
126
+ std::raise (SIGINT);
128
127
129
- auto plugin = creator->createPlugin (util::node_info (n).c_str (), in_shape, out_shape, out_size, std::string (" linear" ), align_corners);
128
+ // auto creator_auto = getPluginRegistry()->getPluginCreator("interpolate", "1");
129
+ // auto plugin_auto = creator_auto->createPlugin(util::node_info(n).c_str(), nullptr);
130
130
131
- auto resize_layer = ctx->net ->addPluginV2 (reinterpret_cast <nvinfer1::ITensor* const *>(in), 1 , *plugin);
131
+ // auto creator = getPluginRegistry()->getPluginCreator("interpolate", "1");
132
+
133
+ auto creator = new plugins::InterpolatePluginCreator ();
134
+ auto plugin = creator->createPlugin (" interpolate_plugin" , in_shape, out_shape, out_size, std::string (" linear" ), align_corners);
135
+
136
+ auto resize_layer = ctx->net ->addPluginV2 (reinterpret_cast <nvinfer1::ITensor* const *>(&in), 1 , *plugin);
137
+ resize_layer->setName (util::node_info (n).c_str ());
132
138
133
139
auto layer_output = ctx->AssociateValueAndTensor (n->outputs ()[0 ], resize_layer->getOutput (0 ));
140
+
134
141
LOG_DEBUG (" Output tensor shape: " << layer_output->getDimensions ());
135
142
} else {
136
143
auto resize_layer = ctx->net ->addResize (*in);
0 commit comments