Skip to content

Commit

Permalink
handle device settings for ET export (#732)
Browse files Browse the repository at this point in the history
* handle device settings for ET export

* tab/spc
  • Loading branch information
mikekgfb authored and malfet committed Jul 17, 2024
1 parent b217d4b commit 706a5a1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion export.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ def main(args):
output_pte_path = args.output_pte_path
output_dso_path = args.output_dso_path

if output_dso_path and "mps" in builder_args.device:
if output_pte_path and builder_args.device != "cpu":
print(
f"Warning! ExecuTorch export target is controlled by export recipe, not device setting. Ignoring device={builder_args.device} setting."
)
builder_args.device = "cpu"
elif "mps" in builder_args.device:
print("Warning! Device MPS not supported for export. Exporting for device CPU.")
builder_args.device = "cpu"

Expand Down

0 comments on commit 706a5a1

Please sign in to comment.