Hi,
Currently couldn’t find a sample.
To use dynamic slice, we need to set start/size/stride with ISliceLayer::setInput().
Hope this link will help you.
https://docs.nvidia.com/deeplearning/tensorrt/api/c_api/classnvinfer1_1_1_i_slice_layer.html
https://docs.nvidia.com/deeplearning/tensorrt/api/python_api/infer/Graph/Layers.html#islicelayer
Thank you.