[LLM]LLM windows load -api.dll (#8631)

* temp

* update

* revert setup.py
This commit is contained in:
Yina Chen 2023-07-31 13:47:20 +08:00 committed by GitHub
parent 3361b66449
commit a607972c0b
5 changed files with 6 additions and 1 deletions

View file

@ -81,6 +81,7 @@ def _load_shared_library(lib_base_name: str):
# Add the library directory to the DLL search path on Windows (if needed)
if sys.platform == "win32" and sys.version_info >= (3, 8):
os.add_dll_directory(str(_base_path))
os.environ["PATH"] = str(_base_path) + ";" + os.environ["PATH"]
# Try to load the shared library, handling potential errors
for _lib_path in _lib_paths:

View file

@ -81,6 +81,7 @@ def _load_shared_library(lib_base_name: str):
# Add the library directory to the DLL search path on Windows (if needed)
if sys.platform == "win32" and sys.version_info >= (3, 8):
os.add_dll_directory(str(_base_path))
os.environ["PATH"] = str(_base_path) + ";" + os.environ["PATH"]
cdll_args["winmode"] = 0
# Try to load the shared library, handling potential errors

View file

@ -81,6 +81,7 @@ def _load_shared_library(lib_base_name: str):
# Add the library directory to the DLL search path on Windows (if needed)
if sys.platform == "win32" and sys.version_info >= (3, 8):
os.add_dll_directory(str(_base_path))
os.environ["PATH"] = str(_base_path) + ";" + os.environ["PATH"]
if "CUDA_PATH" in os.environ:
os.add_dll_directory(os.path.join(os.environ["CUDA_PATH"], "bin"))
os.add_dll_directory(os.path.join(os.environ["CUDA_PATH"], "lib"))

View file

@ -81,6 +81,7 @@ def _load_shared_library(lib_base_name: str):
# Add the library directory to the DLL search path on Windows (if needed)
if sys.platform == "win32" and sys.version_info >= (3, 8):
os.add_dll_directory(str(_base_path))
os.environ["PATH"] = str(_base_path) + ";" + os.environ["PATH"]
# Try to load the shared library, handling potential errors
for _lib_path in _lib_paths:

View file

@ -30,7 +30,8 @@ def get_cpu_flags():
else:
invalidOperationError(False, "Unsupported CPUFLAGS.")
else:
flags = "_vnni" if check_avx_vnni() else ""
# flags = "_vnni" if check_avx_vnni() else ""
flags = "-api"
return flags