File tree 3 files changed +13
-2
lines changed
3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ For more details on quantization and what settings to use for your use
216
216
case visit our [ Quanitization documentation] ( docs/quantization.md ) or
217
217
run ` python3 torchchat.py export `
218
218
219
- [ end default] :
219
+ [ end default ] : end
220
220
221
221
### Deploy and run on iOS
222
222
Original file line number Diff line number Diff line change @@ -330,6 +330,14 @@ def arg_init(args):
330
330
args .quantize .get ("executor" , {}).get ("accelerator" , args .device )
331
331
)
332
332
333
+ if "mps" in args .device :
334
+ if args .compile or args .compile_prefill :
335
+ print (
336
+ "Warning: compilation is not available with device MPS, ignoring option to engage compilation"
337
+ )
338
+ args .compile = False
339
+ args .compile_prefill = False
340
+
333
341
if hasattr (args , "seed" ) and args .seed :
334
342
torch .manual_seed (args .seed )
335
343
return args
Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ def main(args):
48
48
output_pte_path = args .output_pte_path
49
49
output_dso_path = args .output_dso_path
50
50
51
+ if output_dso_path and "mps" in builder_args .device :
52
+ print ("Warning! Device MPS not supported for export. Exporting for device CPU." )
53
+ builder_args .device = "cpu"
54
+
51
55
# TODO: clean this up
52
56
# This mess is because ET does not support _weight_int4pack_mm right now
53
57
if not builder_args .gguf_path :
@@ -85,7 +89,6 @@ def main(args):
85
89
with torch .no_grad ():
86
90
if output_pte_path :
87
91
output_pte_path = str (os .path .abspath (output_pte_path ))
88
- print (f">{ output_pte_path } <" )
89
92
if executorch_export_available :
90
93
print (f"Exporting model using ExecuTorch to { output_pte_path } " )
91
94
export_model_et (
You can’t perform that action at this time.
0 commit comments