NVIDIA / trt-samples-for-hackathon-cn

Simple samples for TensorRT programming
Apache License 2.0
1.47k stars 337 forks source link

build network with fp16 why network output datatype is fp32? #71

Closed jackzhou121 closed 1 year ago

jackzhou121 commented 1 year ago

hi I build network with onnx model and build network with "config.set_flag(trt.BuilderFlag.FP16)", however when print the network, some layers are still have float input and output, but sometimes it's become HALF input and output, how can I set all layers input and output datatype to HALF?

jackzhou121 commented 1 year ago

my plugin is surely support fp16 output, but when finish build, the output was set to float, that make me confused

jackzhou121 commented 1 year ago

all that I know, tensorRT will take control layer output and input data types, currently it is difficult to find the rules why our customer plugin output data type are set to float.