From fd22bfa8bbbde508d6ea7038ef54e1dec37ba3f0 Mon Sep 17 00:00:00 2001 From: Song Lin <865626@163.com> Date: Mon, 9 May 2022 16:43:03 +0800 Subject: [PATCH] Fix fp16 log info print --- export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/export.py b/export.py index e1c0ea90decc..9503958e9264 100644 --- a/export.py +++ b/export.py @@ -278,7 +278,7 @@ def export_engine(model, for out in outputs: LOGGER.info(f'{prefix}\toutput "{out.name}" with shape {out.shape} and dtype {out.dtype}') - LOGGER.info(f'{prefix} building FP{16 if builder.platform_has_fast_fp16 else 32} engine in {f}') + LOGGER.info(f'{prefix} building FP{16 if half and builder.platform_has_fast_fp16 else 32} engine in {f}') if half and builder.platform_has_fast_fp16: config.set_flag(trt.BuilderFlag.FP16) with builder.build_engine(network, config) as engine, open(f, 'wb') as t: