Add Shuffle layer failed, [removeDeadLayers.cpp::markLive::92] Error Code 2: Internal Error (Assertion x != nullptr failed.)

CODE

import tensorrt as trt
def test_shuffle():
TRT_LOGGER = trt.Logger(trt.Logger.VERBOSE)
trt.init_libnvinfer_plugins(TRT_LOGGER, ‘’)
builder = trt.Builder(TRT_LOGGER)
builder.max_batch_size = 10
network = builder.create_network()
config = builder.create_builder_config()
config.max_workspace_size = 1 << 20
dtype = trt.float32
input_shape = (1, 9, 1, 48, 2, 48, 2)
input_name = “input”
network_input = network.add_input(
name=input_name, dtype=dtype, shape=input_shape)
# permute
# (N, C, D//bs, bs, H//bs, bs, W//bs, bs) → (N, bs, bs, bs, C, D//bs, H//bs, W//bs)
SpaceToDepthModule = network.add_shuffle(network_input)
SpaceToDepthModule.second_transpose = (2, 4, 6, 0, 1, 3, 5)
print(SpaceToDepthModule.get_output(0).shape)
network.mark_output(tensor=SpaceToDepthModule.get_output(0))
engine = builder.build_engine(network, config)

Environment

TensorRT Version: 8.0.1.6 (8.2.1.8 have some problem)
GPU Type: 3060

Hi,

Could you please share issue repro ONNX model and complete verbose logs for better debugging.

Thank you.