Skip to content

Commit

Permalink
[torch api] Enable _TORCH_ONNX_SAVE_EXTERNAL_DATA_WITH_IR (#1866)
Browse files Browse the repository at this point in the history
Enable the `_TORCH_ONNX_SAVE_EXTERNAL_DATA_WITH_IR` flag to use the new
external data logic. This will

- Reduce peak memory usage
- Align external data to 64k

for the torch exporter.
  • Loading branch information
justinchuby authored Sep 13, 2024
1 parent a99e443 commit 377869a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onnxscript/_framework_apis/torch_2_5.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# Internal flag. Will go away.
_TORCH_ONNX_SAVE_EXTERNAL_DATA_WITH_IR = (
os.getenv("TORCH_ONNX_OFFLOAD_EXTERNAL_DATA_WITH_IR") == "1"
os.getenv("TORCH_ONNX_OFFLOAD_EXTERNAL_DATA_WITH_IR") != "0"
)


Expand Down

0 comments on commit 377869a

Please sign in to comment.