build: package universal Windows runtime and verify automatic CPU fallback
This commit is contained in:
1 parent
0fcc8ec21c
commit
278b09f82c
16 files changed
+695
-34
No files matched your search
@@ -22,6 +22,11 @@ def main():
|
||||
args = parser.parse_args()
|
||||
if not 1 <= args.jobs <= 16:
|
||||
parser.error("jobs must be 1–16")
|
||||
vulkan_loader = None
|
||||
if os.name == "nt" and args.backend in {"auto", "vulkan"}:
|
||||
from provision_vulkan import provision
|
||||
sdk, vulkan_loader = provision()
|
||||
os.environ["VULKAN_SDK"] = str(sdk)
|
||||
source = ROOT / ".searchi/references/llama.cpp"
|
||||
build = ROOT / ".searchi/runtime" / args.backend
|
||||
if not source.exists():
|
||||
@@ -51,6 +56,9 @@ def main():
|
||||
"-DCMAKE_BUILD_TYPE=Release", f"-DLLAMA_CPP_DIR={source}",
|
||||
f"-DSEARCHI_ACCELERATION={args.backend}"])
|
||||
run([cmake_exe, "--build", build, "--config", "Release", "--parallel", args.jobs])
|
||||
if vulkan_loader:
|
||||
for name in ["vulkan-1.dll", "VULKAN-LICENSE.txt"]:
|
||||
shutil.copy2(vulkan_loader / name, build / "Release" / name)
|
||||
print(f"Runtime build complete: {build}")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user