Skip to content

Commit 50825da

Browse files
Michael Gschwindmalfet
Michael Gschwind
authored andcommitted
make output path absolute
1 parent cc2be00 commit 50825da

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

export.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# LICENSE file in the root directory of this source tree.
66

77
import time
8+
import os
89
from pathlib import Path
910

1011
import torch
@@ -57,14 +58,15 @@ def main(checkpoint_path, device, quantize = "{ }", args = None):
5758

5859
with torch.no_grad():
5960
if output_pte_path:
61+
output_pte_path = str(os.path.abspath(output_pte_path))
6062
print(f">{output_pte_path}<")
6163
if executorch_export_available:
6264
print(f"Exporting model using Executorch to {output_pte_path}")
6365
export_model_et(model, device, args.output_pte_path, args)
6466
else:
6567
print(f"Export with executorch requested but Executorch could not be loaded")
6668
if output_dso_path:
67-
# diverges from AOTI
69+
output_dso_path = str(os.path.abspath(output_dso_path))
6870
print(f"Exporting model using AOT Inductor to {output_pte_path}")
6971
export_model_aoti(model, device, output_dso_path, args)
7072

0 commit comments

Comments
 (0)