File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1- import ctypes
2- import platform
3- import sys
41from typing import Any
52
63import torch
4+ from torch_tensorrt ._enums import Platform
75
86
97def sanitized_torch_version () -> Any :
@@ -14,12 +12,14 @@ def sanitized_torch_version() -> Any:
1412 )
1513
1614
17- def check_cross_compile_trt_win_lib ():
15+ def check_cross_compile_trt_win_lib () -> bool :
1816 # cross compile feature is only available on linux
1917 # build engine on linux and run on windows
2018 import dllist
2119
22- if sys .platform .startswith ("linux" ):
20+ platform = Platform .current_platform ()
21+ platform = str (platform ).lower ()
22+ if platform .startswith ("linux" ):
2323 loaded_libs = dllist .dllist ()
2424 target_lib = "libnvinfer_builder_resource_win.so.*"
2525 if target_lib in loaded_libs :
You can’t perform that action at this time.
0 commit comments