Skip to content

Commit

Permalink
Merge branch 'main' into rama/simple-multi-output
Browse files Browse the repository at this point in the history
  • Loading branch information
gramalingam authored Jul 25, 2024
2 parents 9d9db37 + 937558f commit 27e29b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 0 additions & 4 deletions onnxscript/function_libs/torch_lib/ops/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3622,10 +3622,6 @@ def aten_full(

if dtype != -1:
fill_value = op.Cast(fill_value, to=dtype)
if isinstance(size, list) and size == []:
# TODO(justinchuby): Handle empty list better than using isinstance
# size can be empty, meaning a scalar
return fill_value

size = op.Cast(size, to=INT64.dtype)
return op.Expand(fill_value, size)
Expand Down
3 changes: 2 additions & 1 deletion onnxscript/tools/transformers_models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def export_to_onnx(
prog = torch.onnx.export(model, args, dynamo=True) # pylint: disable=no-value-for-parameter
else:
prog = torch.onnx.dynamo_export(model, *args)
model_proto = prog.model_proto # type: ignore[union-attr]
assert prog is not None
model_proto = prog.model_proto
if optimize:
model_proto = onnxscript.optimizer.optimize(
model_proto,
Expand Down

0 comments on commit 27e29b8

Please sign in to comment.