Skip to content

Commit 5826aac

Browse files
committed
undoing the platform change since its leading to circular imports
1 parent a6a67d8 commit 5826aac

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

py/torch_tensorrt/_utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from typing import Any
2+
import sys
3+
import platform
24

35
import torch
4-
from torch_tensorrt._enums import Platform
56

67

78
def sanitized_torch_version() -> Any:
@@ -17,9 +18,7 @@ def check_cross_compile_trt_win_lib() -> bool:
1718
# build engine on linux and run on windows
1819
import dllist
1920

20-
platform = Platform.current_platform()
21-
platform = str(platform).lower()
22-
if platform.startswith("linux"):
21+
if sys.platform.startswith("linux"):
2322
loaded_libs = dllist.dllist()
2423
target_lib = "libnvinfer_builder_resource_win.so.*"
2524
if target_lib in loaded_libs:

0 commit comments

Comments
 (0)