[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)
|
||||
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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"))
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue