Skip to content

Commit

Permalink
[TRT] Fix TRT PadV2 LayerBuilder empty param->pads bug
Browse files Browse the repository at this point in the history
  • Loading branch information
doxutx committed Aug 2, 2024
1 parent debcb38 commit 1d535ec
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ nvinfer1::DataType PadV2TRTPluginLayerBuilder::getOutputDataType(int index, cons

ILayer* PadV2TRTPluginLayerBuilder::AddToNetwork(INetworkDefinition* network) noexcept {
auto paramlist = dynamic_cast<PadLayerParam*>(param_);
if (paramlist->pads.empty()) {
LOGE("Error: PadV2 Layer got Empty params->pads.\n");
return nullptr;
}

if (!UseTRTPaddingND(paramlist)) {
return TensorRTPluginLayerBuilder::AddToNetwork(network);
Expand Down

0 comments on commit 1d535ec

Please sign in to comment.