Repository navigation
Conversation
…f Edge0 Chat (x64 and Arm64) Co-authored-by: Cursor <cursoragent@cursor.com>
…which has no setenv Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
Author
|
Solved by #259 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The Windows packages of Edge0 Chat (x64 and Arm64) were built by hand, step by step. This PR adds
scripts/package/windows/package.ps1, the Windows counterpart ofscripts/package/macos-arm64/package.sh, so that a Windows package is three commands:fetchdownloads the pinned inputs (python.org embeddable Python 3.12.10 with SHA-256, llama.cpp3cf0325, the wheels ofedge0-strata/requirements.txtfor the target platform,cargo vendor, the npm cache).buildclones the commit clean and builds offline:edge0-infer.exe(windows-vulkanpreset,GGML_NATIVE=OFF, static CRT),strata.exe/strata_kq.dll(asedge0-strata/EDGE0.mddescribes,STRATA_PORTABLE=ON, fixed CUDA architectures) andEdge0 Chat.exe(tauri build --no-bundle, static CRT). It stages the package with the same layout as the 0.2.0 release, writesTHIRD-PARTY-NOTICES.txtand the user README, checks modules, PE machine and build paths, and writes the zip and its.sha256.verifyextracts the zip and checks the layout, PE machine, build paths,edge0-infer info(source_modified: no),strata.exe --version, the bundled Python packages andserver.py --help; with-Modelit serves one prompt.The two architectures differ only in a settings table at the top of the script:
armv8.2-a+dotprod+fp16+i8mm75;86;89;120121win_amd64/amd64win_arm64/arm64The script runs in the VS developer environment of the machine's CPU;
-EnvScriptloads a script first for toolchains installed outside the usual places.README.mdin the folder lists the build machine requirements and every step;user-README.mdis the README inside the package (one template, arch-specific paragraphs kept per arch). The user README also mentions theDownloadslow-integrity issue we hit on the N1X machine (copy, not move, the zip out ofDownloads).It also fixes the Windows build of
main(one change in edge0-strata):edge0-strata/src/program/generate.cppcalledsetenv, which Windows does not have (from 42f3769, #230), sostrata.exedid not compile on Windows, x64 or Arm64. It now uses_putenv_sunder_WIN32, as the other calls in that file and innv_defaults.cpp/arch_defaults.cppdo; Linux and macOS keepsetenv. A full-k 0build ofmainon Windows Arm64 had this as its only failing file (169 of 170 objects compiled).Area
edge0-infer/)edge0-infer/tools/assets/)edge0-infer/examples/)docs/)scripts/package/windows/,edge0-strata/src/program/generate.cpp)How was it tested?
Windows 11 Arm64, NVIDIA RTX Spark N1X (CUDA 13.4, clang-cl 23.1.4, MSVC 14.44, Vulkan SDK 1.4.363.1, portable toolchains loaded with
-EnvScript), commit3203c39(the 0.2.0 release commit):fetch: 5 min cold, 1 min with a warm cache.build: 52 min from a clean clone, all checks passed.verify: SHA-256, layout, PE machine0xAA64and build paths OK;edge0-infer inforeports0.2.0,3203c39…,source_modified: noand the N1X as Vulkan device;strata 0.1.55; Python packages, edge0-strata modules andserver.py --helpOK.edge0-chat-0.2.0-windows-arm64.zip: same file list, except that the new package no longer has the 15dist-info/direct_url.jsonfiles (they held local wheel paths);edge0-infer.exe,strata.exeandstrata_kq.dllhave the same sizes;Edge0 Chat.exeis 20 KB smaller (vendored crate paths).Edge0 Chat.exefrom the extracted package opens its "Edge0 Chat" window and starts WebView2.x64 is not tested yet: it needs a run on the x64 build machine (same three commands). Not tested by the script: loading a model in the app.
The
setenvfix, Windows 11 Arm64: before, thestrata/strata_kqbuild ofmain(-k 0) failed only ingenerate.cpp(use of undeclared identifier 'setenv'); after, it compiles and links andstrata.exe --versionprintsstrata 0.1.55. Then the whole package of this branch's head (main+ the fix,5decd1e):build48 min,verifypassed (edge0-infer inforeports5decd1e…,source_modified: no;strata 0.1.55; Python packages, modules andserver.py --helpOK). The x64 (MSVC) build of this line is not run, but_putenv_sis already used the same way in this file in the 0.2.0 x64 build.Checklist
ctest --preset cpu -L "L0|L1"passes locally inedge0-infer/(engine changes) — no engine changesedge0-infer/docs/testing.md) — full Arm64 package build and verify