[LLM]LLM windows load -api.dll (#8631)
* temp * update * revert setup.py
This commit is contained in:
parent
3361b66449
commit
a607972c0b
5 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
# Add the library directory to the DLL search path on Windows (if needed)
|
||||||
if sys.platform == "win32" and sys.version_info >= (3, 8):
|
if sys.platform == "win32" and sys.version_info >= (3, 8):
|
||||||
os.add_dll_directory(str(_base_path))
|
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
|
# Try to load the shared library, handling potential errors
|
||||||
for _lib_path in _lib_paths:
|
for _lib_path in _lib_paths:
|
||||||
|
|
|
||||||
|
|
@ -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)
|
# Add the library directory to the DLL search path on Windows (if needed)
|
||||||
if sys.platform == "win32" and sys.version_info >= (3, 8):
|
if sys.platform == "win32" and sys.version_info >= (3, 8):
|
||||||
os.add_dll_directory(str(_base_path))
|
os.add_dll_directory(str(_base_path))
|
||||||
|
os.environ["PATH"] = str(_base_path) + ";" + os.environ["PATH"]
|
||||||
cdll_args["winmode"] = 0
|
cdll_args["winmode"] = 0
|
||||||
|
|
||||||
# Try to load the shared library, handling potential errors
|
# Try to load the shared library, handling potential errors
|
||||||
|
|
|
||||||
|
|
@ -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)
|
# Add the library directory to the DLL search path on Windows (if needed)
|
||||||
if sys.platform == "win32" and sys.version_info >= (3, 8):
|
if sys.platform == "win32" and sys.version_info >= (3, 8):
|
||||||
os.add_dll_directory(str(_base_path))
|
os.add_dll_directory(str(_base_path))
|
||||||
|
os.environ["PATH"] = str(_base_path) + ";" + os.environ["PATH"]
|
||||||
if "CUDA_PATH" in os.environ:
|
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"], "bin"))
|
||||||
os.add_dll_directory(os.path.join(os.environ["CUDA_PATH"], "lib"))
|
os.add_dll_directory(os.path.join(os.environ["CUDA_PATH"], "lib"))
|
||||||
|
|
|
||||||
|
|
@ -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)
|
# Add the library directory to the DLL search path on Windows (if needed)
|
||||||
if sys.platform == "win32" and sys.version_info >= (3, 8):
|
if sys.platform == "win32" and sys.version_info >= (3, 8):
|
||||||
os.add_dll_directory(str(_base_path))
|
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
|
# Try to load the shared library, handling potential errors
|
||||||
for _lib_path in _lib_paths:
|
for _lib_path in _lib_paths:
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,8 @@ def get_cpu_flags():
|
||||||
else:
|
else:
|
||||||
invalidOperationError(False, "Unsupported CPUFLAGS.")
|
invalidOperationError(False, "Unsupported CPUFLAGS.")
|
||||||
else:
|
else:
|
||||||
flags = "_vnni" if check_avx_vnni() else ""
|
# flags = "_vnni" if check_avx_vnni() else ""
|
||||||
|
flags = "-api"
|
||||||
return flags
|
return flags
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue