Skip to content

Commit

Permalink
[TRT] Add TRT Layer delete when layer creation return non-zero
Browse files Browse the repository at this point in the history
  • Loading branch information
doxutx committed Jun 18, 2024
1 parent baff1f6 commit debcb38
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/tnn/network/tensorrt/tensorrt_network.cc
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ Status TensorRTNetwork_::InitLayers(NetStructure *net_structure, NetResource *ne
if (ret != TNN_OK) {
LOGE("Error Init layer: %s layer type: %d (err: %d or 0x%X)\n", cur_layer->GetLayerName().c_str(),
type, (int)ret, (int)ret);
delete cur_layer;
return ret;
}

Expand Down

0 comments on commit debcb38

Please sign in to comment.