Skip to content

Commit

Permalink
make output path absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekgfb authored and malfet committed Jul 17, 2024
1 parent cc2be00 commit 50825da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion export.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# LICENSE file in the root directory of this source tree.

import time
import os
from pathlib import Path

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

with torch.no_grad():
if output_pte_path:
output_pte_path = str(os.path.abspath(output_pte_path))
print(f">{output_pte_path}<")
if executorch_export_available:
print(f"Exporting model using Executorch to {output_pte_path}")
export_model_et(model, device, args.output_pte_path, args)
else:
print(f"Export with executorch requested but Executorch could not be loaded")
if output_dso_path:
# diverges from AOTI
output_dso_path = str(os.path.abspath(output_dso_path))
print(f"Exporting model using AOT Inductor to {output_pte_path}")
export_model_aoti(model, device, output_dso_path, args)

Expand Down

0 comments on commit 50825da

Please sign in to comment.