Skip to content

Commit 806d641

Browse files
committed
gelu layer setName using util::node_info(n).c_str()
Signed-off-by: itsliupeng <[email protected]>
1 parent 34e7b21 commit 806d641

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/conversion/converters/impl/activation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ auto acthardtanh TRTORCH_UNUSED =
161161
TRTORCH_CHECK(new_layer, "Unable to create layer for aten::elu");
162162
new_layer->setAlpha(alpha);
163163

164-
new_layer->setName(trtorch::core::util::node_info(n).c_str());
164+
new_layer->setName(util::node_info(n).c_str());
165165

166166
auto out_tensor = ctx->AssociateValueAndTensor(n->outputs()[0], new_layer->getOutput(0));
167167
LOG_DEBUG("Output shape: " << out_tensor->getDimensions());
@@ -190,7 +190,7 @@ auto acthardtanh TRTORCH_UNUSED =
190190
TRTORCH_CHECK(gelu_plugin, "Unable to create gelu plugin from TensorRT plugin registry" << *n);
191191
auto new_layer =
192192
ctx->net->addPluginV2(reinterpret_cast<nvinfer1::ITensor* const*>(&in), 1, *gelu_plugin);
193-
new_layer->setName("gelu");
193+
new_layer->setName(util::node_info(n).c_str());
194194
auto out_tensor = new_layer->getOutput(0);
195195
out_tensor = ctx->AssociateValueAndTensor(n->outputs()[0], out_tensor);
196196
LOG_DEBUG("Output shape: " << out_tensor->getDimensions());

0 commit comments

Comments
 (0)