Check device supports FP16

I need to check if the device supports FP16, and if not log a message and fall back to FP32. How can this be checked?


If we want manually, we can verify in the support matrix doc here,

TensorRT will automatically change precision to FP32 if given layers do not support FP16.
We can mention FP16 precision using --fp16 option in the trtexec

Thank you.