mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-24 19:43:35 +00:00
Add cupti path for python gpu packaging pipeline (#7200)
* add cupti dll path for py3.8 * correct path * add prints * replace path join * add all path * restore pipeline * format * expand path only for python 38&39 * add all cupti path Co-authored-by: Randy Shuai <rashuai@microsoft.com>
This commit is contained in:
parent
2d352056cf
commit
ebde320950
1 changed files with 5 additions and 0 deletions
|
|
@ -40,6 +40,11 @@ if platform.system() == "Windows":
|
|||
# Python 3.8 (and later) doesn't search system PATH when loading DLLs, so the CUDA location needs to be
|
||||
# specified explicitly using the new API introduced in Python 3.8.
|
||||
os.add_dll_directory(cuda_bin_dir)
|
||||
cuda_root = os.path.join(cuda_bin_dir, "..", "..")
|
||||
for root, _, files in os.walk(cuda_root):
|
||||
for f in files:
|
||||
if f == "cupti.lib":
|
||||
os.add_dll_directory(root)
|
||||
else:
|
||||
# Python 3.7 (and earlier) searches directories listed in PATH variable.
|
||||
# Make sure that the target CUDA version is at the beginning (important if multiple CUDA versions are
|
||||
|
|
|
|||
Loading…
Reference in a new issue