Skip to content

Commit a662411

Browse files
disable aoti format in windows (#3632)
1 parent d9f612f commit a662411

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

py/torch_tensorrt/_compile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,10 @@ def save(
627627
raise ValueError(
628628
f"Provided output_format {output_format} is not supported. Supported options are exported_program | torchscript"
629629
)
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+
)
630634
if not file_path:
631635
raise ValueError("File path cannot be empty. Please provide a valid file path")
632636

tests/py/dynamo/models/test_export_serde.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import importlib
22
import os
3+
import platform
34
import tempfile
45
import unittest
56

@@ -645,6 +646,10 @@ def forward(self, x):
645646

646647

647648
@pytest.mark.unit
649+
@unittest.skipIf(
650+
platform.system() != "Linux",
651+
"Save and load in AOT Inductor format is only supported on Linux",
652+
)
648653
def test_save_load_aoti(ir, tmp_path):
649654
"""
650655
This tests save/load API on the AOTI format

0 commit comments

Comments
 (0)