File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -627,6 +627,10 @@ def save(
627
627
raise ValueError (
628
628
f"Provided output_format { output_format } is not supported. Supported options are exported_program | torchscript"
629
629
)
630
+ if output_format == "aot_inductor" and platform .system () != "Linux" :
631
+ raise ValueError (
632
+ f"The AOT Inductor format is only supported on Linux, { platform .system ()} is not a supported platform for this format"
633
+ )
630
634
if not file_path :
631
635
raise ValueError ("File path cannot be empty. Please provide a valid file path" )
632
636
Original file line number Diff line number Diff line change 1
1
import importlib
2
2
import os
3
+ import platform
3
4
import tempfile
4
5
import unittest
5
6
@@ -645,6 +646,10 @@ def forward(self, x):
645
646
646
647
647
648
@pytest .mark .unit
649
+ @unittest .skipIf (
650
+ platform .system () != "Linux" ,
651
+ "Save and load in AOT Inductor format is only supported on Linux" ,
652
+ )
648
653
def test_save_load_aoti (ir , tmp_path ):
649
654
"""
650
655
This tests save/load API on the AOTI format
You can’t perform that action at this time.
0 commit comments