How to handle 3 dimensional layers in TensorRT?

According to this thread https://devtalk.nvidia.com/default/topic/1047285/tensorrt/does-conv2d-support-format-nchw-order-size-is-not-matching-the-number-dimensions-of-tensorrt/ (see developer “NVES” response) you have to “[…] remember to register your input blob with NCHW format”. It sounds like TensorRT is expecting a 4 dimensional input. However, the official tensorrt sample code for uff seems to use a 3-dimensional input. (https://github.com/NVIDIA/TensorRT/blob/release/5.1/samples/opensource/sampleUffMNIST/sampleUffMNIST.cpp line 170 nvinfer1::Dims3(1, 28, 28)).

Does TensorRT automatically append the fourth dimension, like converting 1,28,28 to 1,1,28,28 or how does it work?