Skip to content

Commit 02393c2

Browse files
committed
dll file path update for windows
1 parent 9c238ae commit 02393c2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

py/torch_tensorrt/dynamo/utils.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -847,8 +847,13 @@ def download_plugin_lib_path(py_version: str, platform: str) -> str:
847847

848848
# Proceeding with the unzip of the wheel file
849849
# This will exist if the filename was already downloaded
850-
if os.path.exists("./tensorrt_llm/libs/libnvinfer_plugin_tensorrt_llm.so"):
851-
plugin_lib_path = "./tensorrt_llm/libs/" + "libnvinfer_plugin_tensorrt_llm.so"
850+
if "linux" in platform:
851+
lib_filename = "libnvinfer_plugin_tensorrt_llm.so"
852+
else:
853+
lib_filename = "libnvinfer_plugin_tensorrt_llm.dll"
854+
plugin_lib_path = os.path.join("./tensorrt_llm/libs", lib_filename)
855+
if os.path.exists(plugin_lib_path):
856+
plugin_lib_path = "./tensorrt_llm/libs/" + plugin_lib_path
852857
else:
853858
try:
854859
import zipfile
@@ -858,9 +863,7 @@ def download_plugin_lib_path(py_version: str, platform: str) -> str:
858863
)
859864
with zipfile.ZipFile(file_name, "r") as zip_ref:
860865
zip_ref.extractall(".") # Extract to a folder named 'tensorrt_llm'
861-
plugin_lib_path = (
862-
"./tensorrt_llm/libs/" + "libnvinfer_plugin_tensorrt_llm.so"
863-
)
866+
plugin_lib_path = "./tensorrt_llm/libs/" + plugin_lib_path
864867
return plugin_lib_path
865868

866869

0 commit comments

Comments
 (0)