Skip to content

Commit

Permalink
Removed optional optimize_for_inference (#6933)
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com>
  • Loading branch information
borisfom authored Jun 28, 2023
1 parent 92c4a2a commit e9b0b11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nemo/core/classes/exportable.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _export(
check_trace=check_trace,
check_tolerance=check_tolerance,
)
jitted_model = torch.jit.optimize_for_inference(torch.jit.freeze(jitted_model))
jitted_model = torch.jit.freeze(jitted_model)
if verbose:
logging.info(f"JIT code:\n{jitted_model.code}")
jitted_model.save(output)
Expand Down
2 changes: 1 addition & 1 deletion scripts/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def nemo_export(argv):
check_trace=check_trace,
check_tolerance=args.check_tolerance,
onnx_opset_version=args.onnx_opset,
verbose=args.verbose,
verbose=bool(args.verbose),
)

except Exception as e:
Expand Down

0 comments on commit e9b0b11

Please sign in to comment.