Skip to content

Commit

Permalink
Fix fp16 log info print
Browse files Browse the repository at this point in the history
  • Loading branch information
Song Lin committed May 9, 2022
1 parent ad2dfe0 commit fd22bfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion export.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fd22bfa

Please sign in to comment.