Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Lmdeploy
Commits
d4d609bd
Unverified
Commit
d4d609bd
authored
Aug 29, 2023
by
Chen Xin
Committed by
GitHub
Aug 29, 2023
Browse files
Fix turbomind import error on windows (#316)
parent
a48e2d27
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
lmdeploy/__init__.py
lmdeploy/__init__.py
+15
-0
No files found.
lmdeploy/__init__.py
View file @
d4d609bd
# Copyright (c) OpenMMLab. All rights reserved.
# Copyright (c) OpenMMLab. All rights reserved.
def
bootstrap
():
import
os
import
sys
has_turbomind
=
False
pwd
=
os
.
path
.
dirname
(
__file__
)
if
os
.
path
.
exists
(
os
.
path
.
join
(
pwd
,
'lib'
)):
has_turbomind
=
True
if
os
.
name
==
'nt'
and
has_turbomind
:
if
sys
.
version_info
[:
2
]
>=
(
3
,
8
):
CUDA_PATH
=
os
.
getenv
(
'CUDA_PATH'
)
os
.
add_dll_directory
(
os
.
path
.
join
(
CUDA_PATH
,
'bin'
))
bootstrap
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment