Unverified Commit d4d609bd authored by Chen Xin's avatar Chen Xin Committed by GitHub
Browse files

Fix turbomind import error on windows (#316)

parent a48e2d27
# 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()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment