diff --git a/tools/infer/utility.py b/tools/infer/utility.py index 538f55c42b223f9741c5c7006dd7d1478ce1920b..8ac5743b7275b9d699c7792d4236da9cb319884a 100755 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -268,10 +268,11 @@ def create_predictor(args, mode, logger): # cache 10 different shapes for mkldnn to avoid memory leak config.set_mkldnn_cache_capacity(10) config.enable_mkldnn() - + if args.precision == "fp16": + config.enable_mkldnn_bfloat16() # enable memory optim config.enable_memory_optim() - #config.disable_glog_info() + config.disable_glog_info() config.delete_pass("conv_transpose_eltwiseadd_bn_fuse_pass") if mode == 'table':