Reformat error for plugin with input format kHWC

Hello,
I have a Jetson Xavier AGX with Jetpack 4.5 with TensorRT 7.1.3.0.
I have a convolution that wants to output nhwc followed by an activation that doesn’t care about dimension layout.
I have a custom plugin for my activation with the following configurePlugin:

bool supportsFormatCombination(int32_t pos, const nvinfer1::PluginTensorDesc* inOut, int32_t nbInputs, int32_t nbOutputs) const
{
    const bool valid_dtype = (inOut[pos].type == nvinfer1::DataType::kHALF);
    const bool valid_format = (inOut[pos].format == nvinfer1::TensorFormat::kHWC8) || (inOut[pos].format == nvinfer1::TensorFormat::kLINEAR);
    return valid_dtype && valid_format;
}

I have a convolution prior to this operation that wants to use:
trt_volta_h884cudnn_128x128_ldg8_relu_exp_small_nhwc_tn_v1, if I allow kHWC8, then I get the following error during conversion:

[TensorRT] ERROR: ../rtSafe/cuda/cudaReformatRunner.cpp (251) - Assertion Error in combineDHtoH: 0 (nbSpatialDims == 3 && nbDims >= 5)

If I set my format to kLINEAR then everything works correctly, but I have a reformat operation before and after each activation. If I accept any input format, then I get the same error as above.

Hi,

Similar issues have been fixed in the latest TensorRT versions. Looks like you’re using an old version of TensorRT. We recommend you to upgrade TensorRT version and try on latest.
As you’re using Jetson platform, you may need to upgrade your Jetpack version to get latest TensorRT or you can use NGC container.
https://ngc.nvidia.com/containers/nvidia:tensorrt

Thank you.

Thank you for your response,
As per my original post, I am stuck with Jetpack 4.5. I’ve tested using debs extracted from a Jetpack 4.6 install and this issue is indeed fixed, however we have other issues with this install. Is there a TensorRT 7.2 build for AGX somewhere that I can test?

Hi,

Thank you for the confirmation. As you’re facing an issue related to the installation, we recommend you to move this post to Jetson AGX related forum to get better help.
You can click on edit post and change the category.

Thank you.