Skip to content

Commit

Permalink
test cudnn overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
gs-olive committed Jan 26, 2024
1 parent cd30eae commit 41ae59b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packaging/smoke_test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import glob
import os
import shutil
import site

python_site_packages = site.getsitepackages()[-1]
extra_cudnn = os.path.join(python_site_packages, "nvidia", "cudnn")
print(f"Deleting directory: {extra_cudnn}")
shutil.rmtree(extra_cudnn)
extra_torch = os.path.join(python_site_packages, "torch", "lib")

for dll in glob.glob(os.path.join(extra_cudnn, "**", "*.dll"), recursive=True):
shutil.copy(extra_cudnn, extra_torch)

This comment has been minimized.

Copy link
@HolyWu

HolyWu Jan 26, 2024

Contributor

Should be shutil.copy(dll, extra_torch)

This comment has been minimized.

Copy link
@gs-olive

gs-olive Jan 26, 2024

Author Collaborator

Thanks for the catch - it has been fixed in a newer commit version, and the build seems to be successful and importing in the smoke test now without any cuDNN errors!



# import tensorrt
import torch

# import torch_tensorrt

0 comments on commit 41ae59b

Please sign in to comment.