Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Jan 31, 2023
1 parent 89bbc3b commit dd70c88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions onnxruntime/python/tools/transformers/convert_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,7 @@ def t5_to_onnx(args: argparse.Namespace):
Path(args.output).parent,
use_gpu=args.use_gpu,
use_external_data_format=args.use_external_data_format,
optimize_onnx=True
if not args.precision == Precision.FLOAT16
else False, # Enable the fp32 optimizations for now.
optimize_onnx=(args.precision != Precision.FLOAT16),
precision=args.precision,
verbose=False,
use_decoder_start_token=False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def optimize_onnx(
model_type="t5",
num_heads=num_attention_heads,
hidden_size=hidden_size,
opt_level=2 if not is_float16 else 0,
opt_level=2 if not is_float16 and not use_external_data_format else 0,
optimization_options=optimization_options,
use_gpu=False,
)
Expand Down

0 comments on commit dd70c88

Please sign in to comment.