[GH-ISSUE #4165] [Engine] AVX CPU not working and a possible solution(includes custom patch) #1826

Open
opened 2026-11-04 01:54:24 +07:00 by bsakaguchi · 11 comments
Owner

Originally created by @FlowDownTheRiver on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4165

Hi there. thanks for the project.
I am using intel I7 3930k processor with AVX instructions only,64 GB drr3 ram,paired with RTX 3090.
Just because I was having trouble with the pre-compiled strata engine and vision exe files and I was also getting errors with the official repo compling,I asked claude to give me a solution. and it gave me a working solution so that I am able to compile the strata.exe and strata_vision.exe files. However my Strata is pulling your latest repository with bat files and old GUI.(older way of using strata). So when I realized you have changed the repo to a new setup format,there is no way for me to compile the strata engine for the new user interface. I used my old setup and compiled the exe files with bat files and it is working on the old strata(cuda 12),however this new GUI is forcing to use cuda13 in this folder : C:\Users\my_user_name\AppData\Local\Strata\components\engine\0.1.50-windows-x86_64-cuda-cuda13. I tried to compile the exe on old strata and replace the exe files,it didn't work, I downloaded your cuda12 pack and manually put them in the app data folder it didn't work either because they are compiled with avx2 and also the new gui deleted the files and replaced them with cuda 13 again. So in short I don't have avx2 cpu to use the new GUI.

in my old setup to make it work I am using this to compile and update with bat files and a supplementary monkey patch python file to patch the cmake file which can compile the exe without any errors for the avx cpus :

python patch file as patch_strata.py :

#!/usr/bin/env python3
"""Re-apply local build fixes to a fresh Strata checkout. Safe to run any number of times.

Usage: python patch_strata.py [--restore] [path\to\Strata] (default: the folder this script sits in, else cwd)

(no flag) apply every patch below that is still needed
--restore undo them with "git checkout -- " so the next "git pull" cannot be blocked by local edits

Patch 1 - CMakeLists.txt, MSVC + CUDA 12.x link error (LNK2005 / LNK1169, "cudart_static.lib ... already defined in
cudart.lib"): upstream only links the shared CUDA runtime when STRATA_EXPERIMENTAL_SM60 is set. This makes
it apply to every MSVC build except the STRATA_PORTABLE release build.
Patch 2 - src/core/vmm.cpp, compile error C3861 "cudaGetDriverEntryPointByVersion: identifier not found" with
CUDA 12.4 (that function arrived in CUDA 12.5). Uses the same #if CUDART_VERSION guard that
src/core/expert_cache.cpp already has.
The AVX (no-AVX2) support itself is upstream (STRATA_ISA_FLOOR=avx), so it needs no patch.
"""
import re, subprocess, sys
from pathlib import Path

MARK = "STRATA-LOCAL-PATCH"

--------------------------------------------------------------------------------------------- patch 1: CMake

_CM_OLD = re.compile(r"if(MSVC AND STRATA_EXPERIMENTAL_SM60 AND NOT DEFINED CMAKE_CUDA_RUNTIME_LIBRARY)")
_CM_NEW = "if(MSVC AND NOT STRATA_PORTABLE AND NOT DEFINED CMAKE_CUDA_RUNTIME_LIBRARY) # " + MARK
_ENABLE = re.compile(r"^(?P[ \t])enable_language(CUDA)[ \t](?P\r?\n)", re.M)

def patch_cmake(txt):
"""returns (new_text or None, message)"""
if MARK in txt:
return None, "already patched"
if _CM_OLD.search(txt):
return _CM_OLD.sub(_CM_NEW, txt, count=1), "patched"
if re.search(r"if(MSVC[^\n]*CMAKE_CUDA_RUNTIME_LIBRARY", txt) and "Shared" in txt:
return None, "upstream already links the shared runtime for this build - nothing to do"
m = _ENABLE.search(txt)
if not m:
return None, "FAILED: neither the known block nor enable_language(CUDA) found - edit by hand"
i, nl = m.group("ind"), m.group("nl")
block = (f"{i}if(MSVC AND NOT STRATA_PORTABLE AND NOT DEFINED CMAKE_CUDA_RUNTIME_LIBRARY) # {MARK}{nl}"
f"{i} set(CMAKE_CUDA_RUNTIME_LIBRARY Shared){nl}{i}endif(){nl}")
return txt[:m.start()] + block + txt[m.start():], "patched (fallback insert)"

---------------------------------------------------------------------------------------------- patch 2: vmm

_VMM_OLD = re.compile(
r"(?P[ \t])if cudaGetDriverEntryPointByVersion\(name, &p, 12000, cudaEnableDefault, &q != cudaSuccess ||"
r"\s
q != cudaDriverEntryPointSuccess || p == nullptr)\s*return false;")

def patch_vmm(txt):
if MARK in txt:
return None, "already patched"
if "cudaGetDriverEntryPointByVersion" not in txt:
return None, "no cudaGetDriverEntryPointByVersion call any more - nothing to do"
if "CUDART_VERSION" in txt:
return None, "upstream already guards it with CUDART_VERSION - nothing to do"
m = _VMM_OLD.search(txt)
if not m:
return None, ("FAILED: cudaGetDriverEntryPointByVersion is used but the code changed shape - guard it by hand "
"like src/core/expert_cache.cpp does (#if CUDART_VERSION >= 12050 ... #else cudaGetDriverEntryPoint)")
nl = "\r\n" if "\r\n" in txt else "\n"
i = m.group("ind")
new = nl.join([
f"#if CUDART_VERSION >= 12050 // {MARK}: cudaGetDriverEntryPointByVersion needs CUDA 12.5+",
f"{i}const cudaError_t e = cudaGetDriverEntryPointByVersion(name, &p, 12000, cudaEnableDefault, &q);",
"#else",
f"{i}const cudaError_t e = cudaGetDriverEntryPoint(name, &p, cudaEnableDefault, &q);",
"#endif",
f"{i}if (e != cudaSuccess || q != cudaDriverEntryPointSuccess || p == nullptr) {{",
f"{i} (void) cudaGetLastError();",
f"{i} return false;",
f"{i}}}",
])
return txt[:m.start()] + new + txt[m.end():], "patched"

PATCHES = [("CMakeLists.txt", patch_cmake), ("src/core/vmm.cpp", patch_vmm)]

------------------------------------------------------------------------------------------------------ driver

def apply_all(root: Path) -> None:
for rel, fn in PATCHES:
f = root / rel
if not f.exists():
print(f"{rel}: not present - skipped")
continue
txt = f.read_bytes().decode("utf-8") # keeps BOM and CRLF exactly as they are
new, msg = fn(txt)
if new is not None:
f.write_bytes(new.encode("utf-8"))
print(f"{rel}: {msg}")

def restore_all(root: Path) -> None:
if not (root / ".git").exists():
print("not a git clone - nothing to restore")
return
for rel, _ in PATCHES:
r = subprocess.run(["git", "-C", str(root), "checkout", "--", rel], capture_output=True, text=True)
print(f"{rel}: {'restored to the repo version' if r.returncode == 0 else 'left alone (' + r.stderr.strip()[:80] + ')'}")

if name == "main":
args = [a for a in sys.argv[1:] if not a.startswith("--")]
here = Path(file).resolve().parent
root = Path(args[0]) if args else (here if (here / "CMakeLists.txt").exists() else Path.cwd())
if not (root / "CMakeLists.txt").exists():
sys.exit(f"no CMakeLists.txt in {root}")
(restore_all if "--restore" in sys.argv else apply_all)(root)

CMakeLists.txt

my custom update bat file as UPDATE_custom.bat(uses monkey patching with the python code provided) :

@echo off
rem Update Strata without starting the model (#475): the newest code (git pull, when this folder is a git clone), then
rem what START-HERE.bat does before a start - the engine (a new one when this version needs it), the Python packages,
rem each installed model's settings and draft subset. The model files are not touched. Start the model later with
rem START-HERE.bat. Options are passed on to setup.py.
setlocal
title Strata - update
cd /d "%~dp0"
rem All of it in one block: cmd reads a .bat file while it runs it, and the git pull can change this very file.
(
if exist ".git" (
where git >nul 2>nul || (
echo This folder is a git clone, but git is not on PATH: install Git for Windows ^(winget install Git.Git^)
echo or run "git pull" here yourself, then run UPDATE.bat again.
pause
exit /b 1
)
rem drop the local build patches first - otherwise git pull refuses when upstream changed a patched file
if exist "%~dp0patch_strata.py" (
where python >nul 2>nul
if errorlevel 1 (
py -3 "%~dp0patch_strata.py" --restore "%~dp0." >nul 2>nul
) else (
python "%~dp0patch_strata.py" --restore "%~dp0." >nul 2>nul
)
)
git checkout -- CMakeLists.txt >nul 2>nul
git checkout -- src/core/vmm.cpp >nul 2>nul
echo Getting the newest Strata ^(git pull^) ...
git pull --ff-only || (
echo.
echo git pull did not succeed ^(the reason is above^).
git rev-parse --abbrev-ref --symbolic-full-name @{u} >nul 2>nul || (
echo This branch has no upstream set - nothing was updated.
pause
exit /b 1
)
echo "Not possible to fast-forward" means upstream rewrote its history ^(a forced update^).
echo This copy can be reset to the newest upstream. Commits made only in this copy, and edits to tracked
echo files, would be lost ^(your patch and bat files are not tracked, so they stay^).
for /f %%h in ('git rev-parse --short HEAD') do echo Current commit is %%h - "git reset --hard %%h" brings it back.
choice /c YN /m " Reset this copy to the newest upstream now"
if errorlevel 2 (
echo Nothing was updated.
pause
exit /b 1
)
git reset --hard @{u} || (
echo The reset failed - nothing was updated.
pause
exit /b 1
)
)
) else (
echo This copy of Strata was not made with git, so it cannot fetch new files itself. Download the newest one:
echo https://github.com/Niko1221/Strata/archive/refs/heads/main.zip
echo unzip it anywhere and run START-HERE.bat ^(or UPDATE.bat^) in it: it finds the model files in Strata-data
echo and sets itself up the same way - nothing big is downloaded again.
echo Checking this copy's engine and settings meanwhile ...
)
if exist "%~dp0patch_strata.py" (
echo Applying local build patches ^(patch_strata.py^) ...
where python >nul 2>nul
if errorlevel 1 (
py -3 "%~dp0patch_strata.py" "%~dp0." || echo python not found - continuing without the patch
) else (
python "%~dp0patch_strata.py" "%~dp0."
)
)
call "%~dp0START-HERE.bat" --update %*
if not errorlevel 1 pause
exit /b
)


Anyway,with these I am able to use the old strata with bat files,but I want to use the new GUI of strata which needs to work with avx cpus. Can you please use these files or examine them to make the new GUI work with AVX cpu's with cuda 12 or cuda 13, whichever is suitable?

Originally created by @FlowDownTheRiver on GitHub (Oct 25, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4165 Hi there. thanks for the project. I am using intel I7 3930k processor with AVX instructions only,64 GB drr3 ram,paired with RTX 3090. Just because I was having trouble with the pre-compiled strata engine and vision exe files and I was also getting errors with the official repo compling,I asked claude to give me a solution. and it gave me a working solution so that I am able to compile the strata.exe and strata_vision.exe files. However my Strata is pulling your latest repository with bat files and old GUI.(older way of using strata). So when I realized you have changed the repo to a new setup format,there is no way for me to compile the strata engine for the new user interface. I used my old setup and compiled the exe files with bat files and it is working on the old strata(cuda 12),however this new GUI is forcing to use cuda13 in this folder : C:\Users\my_user_name\AppData\Local\Strata\components\engine\0.1.50-windows-x86_64-cuda-cuda13. I tried to compile the exe on old strata and replace the exe files,it didn't work, I downloaded your cuda12 pack and manually put them in the app data folder it didn't work either because they are compiled with avx2 and also the new gui deleted the files and replaced them with cuda 13 again. So in short I don't have avx2 cpu to use the new GUI. in my old setup to make it work I am using this to compile and update with bat files and a supplementary monkey patch python file to patch the cmake file which can compile the exe without any errors for the avx cpus : python patch file as patch_strata.py : #!/usr/bin/env python3 """Re-apply local build fixes to a fresh Strata checkout. Safe to run any number of times. Usage: python patch_strata.py [--restore] [path\\to\\Strata] (default: the folder this script sits in, else cwd) (no flag) apply every patch below that is still needed --restore undo them with "git checkout -- <file>" so the next "git pull" cannot be blocked by local edits Patch 1 - CMakeLists.txt, MSVC + CUDA 12.x link error (LNK2005 / LNK1169, "cudart_static.lib ... already defined in cudart.lib"): upstream only links the shared CUDA runtime when STRATA_EXPERIMENTAL_SM60 is set. This makes it apply to every MSVC build except the STRATA_PORTABLE release build. Patch 2 - src/core/vmm.cpp, compile error C3861 "cudaGetDriverEntryPointByVersion: identifier not found" with CUDA 12.4 (that function arrived in CUDA 12.5). Uses the same #if CUDART_VERSION guard that src/core/expert_cache.cpp already has. The AVX (no-AVX2) support itself is upstream (STRATA_ISA_FLOOR=avx), so it needs no patch. """ import re, subprocess, sys from pathlib import Path MARK = "STRATA-LOCAL-PATCH" # --------------------------------------------------------------------------------------------- patch 1: CMake _CM_OLD = re.compile(r"if\(MSVC AND STRATA_EXPERIMENTAL_SM60 AND NOT DEFINED CMAKE_CUDA_RUNTIME_LIBRARY\)") _CM_NEW = "if(MSVC AND NOT STRATA_PORTABLE AND NOT DEFINED CMAKE_CUDA_RUNTIME_LIBRARY) # " + MARK _ENABLE = re.compile(r"^(?P<ind>[ \t]*)enable_language\(CUDA\)[ \t]*(?P<nl>\r?\n)", re.M) def patch_cmake(txt): """returns (new_text or None, message)""" if MARK in txt: return None, "already patched" if _CM_OLD.search(txt): return _CM_OLD.sub(_CM_NEW, txt, count=1), "patched" if re.search(r"if\(MSVC[^\n]*CMAKE_CUDA_RUNTIME_LIBRARY", txt) and "Shared" in txt: return None, "upstream already links the shared runtime for this build - nothing to do" m = _ENABLE.search(txt) if not m: return None, "FAILED: neither the known block nor enable_language(CUDA) found - edit by hand" i, nl = m.group("ind"), m.group("nl") block = (f"{i}if(MSVC AND NOT STRATA_PORTABLE AND NOT DEFINED CMAKE_CUDA_RUNTIME_LIBRARY) # {MARK}{nl}" f"{i} set(CMAKE_CUDA_RUNTIME_LIBRARY Shared){nl}{i}endif(){nl}") return txt[:m.start()] + block + txt[m.start():], "patched (fallback insert)" # ---------------------------------------------------------------------------------------------- patch 2: vmm _VMM_OLD = re.compile( r"(?P<ind>[ \t]*)if \(cudaGetDriverEntryPointByVersion\(name, &p, 12000, cudaEnableDefault, &q\) != cudaSuccess \|\|" r"\s*q != cudaDriverEntryPointSuccess \|\| p == nullptr\)\s*return false;") def patch_vmm(txt): if MARK in txt: return None, "already patched" if "cudaGetDriverEntryPointByVersion" not in txt: return None, "no cudaGetDriverEntryPointByVersion call any more - nothing to do" if "CUDART_VERSION" in txt: return None, "upstream already guards it with CUDART_VERSION - nothing to do" m = _VMM_OLD.search(txt) if not m: return None, ("FAILED: cudaGetDriverEntryPointByVersion is used but the code changed shape - guard it by hand " "like src/core/expert_cache.cpp does (#if CUDART_VERSION >= 12050 ... #else cudaGetDriverEntryPoint)") nl = "\r\n" if "\r\n" in txt else "\n" i = m.group("ind") new = nl.join([ f"#if CUDART_VERSION >= 12050 // {MARK}: cudaGetDriverEntryPointByVersion needs CUDA 12.5+", f"{i}const cudaError_t e = cudaGetDriverEntryPointByVersion(name, &p, 12000, cudaEnableDefault, &q);", "#else", f"{i}const cudaError_t e = cudaGetDriverEntryPoint(name, &p, cudaEnableDefault, &q);", "#endif", f"{i}if (e != cudaSuccess || q != cudaDriverEntryPointSuccess || p == nullptr) {{", f"{i} (void) cudaGetLastError();", f"{i} return false;", f"{i}}}", ]) return txt[:m.start()] + new + txt[m.end():], "patched" PATCHES = [("CMakeLists.txt", patch_cmake), ("src/core/vmm.cpp", patch_vmm)] # ------------------------------------------------------------------------------------------------------ driver def apply_all(root: Path) -> None: for rel, fn in PATCHES: f = root / rel if not f.exists(): print(f"{rel}: not present - skipped") continue txt = f.read_bytes().decode("utf-8") # keeps BOM and CRLF exactly as they are new, msg = fn(txt) if new is not None: f.write_bytes(new.encode("utf-8")) print(f"{rel}: {msg}") def restore_all(root: Path) -> None: if not (root / ".git").exists(): print("not a git clone - nothing to restore") return for rel, _ in PATCHES: r = subprocess.run(["git", "-C", str(root), "checkout", "--", rel], capture_output=True, text=True) print(f"{rel}: {'restored to the repo version' if r.returncode == 0 else 'left alone (' + r.stderr.strip()[:80] + ')'}") if __name__ == "__main__": args = [a for a in sys.argv[1:] if not a.startswith("--")] here = Path(__file__).resolve().parent root = Path(args[0]) if args else (here if (here / "CMakeLists.txt").exists() else Path.cwd()) if not (root / "CMakeLists.txt").exists(): sys.exit(f"no CMakeLists.txt in {root}") (restore_all if "--restore" in sys.argv else apply_all)(root) [CMakeLists.txt](https://github.com/user-attachments/files/33939965/CMakeLists.txt) my custom update bat file as UPDATE_custom.bat(uses monkey patching with the python code provided) : @echo off rem Update Strata without starting the model (#475): the newest code (git pull, when this folder is a git clone), then rem what START-HERE.bat does before a start - the engine (a new one when this version needs it), the Python packages, rem each installed model's settings and draft subset. The model files are not touched. Start the model later with rem START-HERE.bat. Options are passed on to setup.py. setlocal title Strata - update cd /d "%~dp0" rem All of it in one block: cmd reads a .bat file while it runs it, and the git pull can change this very file. ( if exist ".git" ( where git >nul 2>nul || ( echo This folder is a git clone, but git is not on PATH: install Git for Windows ^(winget install Git.Git^) echo or run "git pull" here yourself, then run UPDATE.bat again. pause exit /b 1 ) rem drop the local build patches first - otherwise git pull refuses when upstream changed a patched file if exist "%~dp0patch_strata.py" ( where python >nul 2>nul if errorlevel 1 ( py -3 "%~dp0patch_strata.py" --restore "%~dp0." >nul 2>nul ) else ( python "%~dp0patch_strata.py" --restore "%~dp0." >nul 2>nul ) ) git checkout -- CMakeLists.txt >nul 2>nul git checkout -- src/core/vmm.cpp >nul 2>nul echo Getting the newest Strata ^(git pull^) ... git pull --ff-only || ( echo. echo git pull did not succeed ^(the reason is above^). git rev-parse --abbrev-ref --symbolic-full-name @{u} >nul 2>nul || ( echo This branch has no upstream set - nothing was updated. pause exit /b 1 ) echo "Not possible to fast-forward" means upstream rewrote its history ^(a forced update^). echo This copy can be reset to the newest upstream. Commits made only in this copy, and edits to tracked echo files, would be lost ^(your patch and bat files are not tracked, so they stay^). for /f %%h in ('git rev-parse --short HEAD') do echo Current commit is %%h - "git reset --hard %%h" brings it back. choice /c YN /m " Reset this copy to the newest upstream now" if errorlevel 2 ( echo Nothing was updated. pause exit /b 1 ) git reset --hard @{u} || ( echo The reset failed - nothing was updated. pause exit /b 1 ) ) ) else ( echo This copy of Strata was not made with git, so it cannot fetch new files itself. Download the newest one: echo https://github.com/Niko1221/Strata/archive/refs/heads/main.zip echo unzip it anywhere and run START-HERE.bat ^(or UPDATE.bat^) in it: it finds the model files in Strata-data echo and sets itself up the same way - nothing big is downloaded again. echo Checking this copy's engine and settings meanwhile ... ) if exist "%~dp0patch_strata.py" ( echo Applying local build patches ^(patch_strata.py^) ... where python >nul 2>nul if errorlevel 1 ( py -3 "%~dp0patch_strata.py" "%~dp0." || echo python not found - continuing without the patch ) else ( python "%~dp0patch_strata.py" "%~dp0." ) ) call "%~dp0START-HERE.bat" --update %* if not errorlevel 1 pause exit /b ) ---------------------------------------------------------------------- Anyway,with these I am able to use the old strata with bat files,but I want to use the new GUI of strata which needs to work with avx cpus. Can you please use these files or examine them to make the new GUI work with AVX cpu's with cuda 12 or cuda 13, whichever is suitable?
Author
Owner

@coolguy744-creator commented on GitHub (Oct 26, 2026):

What a strange composition of parts you have.

What is this mobo that can run a 3090 and is stuck to ddr3?

<!-- gh-comment-id:6408501237 --> @coolguy744-creator commented on GitHub (Oct 26, 2026): What a strange composition of parts you have. What is this mobo that can run a 3090 and is stuck to ddr3?
Author
Owner

@FlowDownTheRiver commented on GitHub (Oct 26, 2026):

  1. What a strange composition of parts you have.
    What is this mobo that can run a 3090 and is stuck to ddr3?

Yeah got stuck with this system like forever. Asus p9x79 deluxe mainboard with 8 drr3 slots. It was very high end back in the day,but not having avx2 is killing me in every corner with projects like this. I had 32 gb ram but after using strata I went on a mission to find 64 gb ddr3 on second hand market and I was extremely lucky to find compatible parts. You can find ddr4-ddr5 easy but ddr3 are rare especially with 64 gb capacity. So I bought ram for strata now I can't run it with the new GUI :(

<!-- gh-comment-id:6420283722 --> @FlowDownTheRiver commented on GitHub (Oct 26, 2026): > 1. What a strange composition of parts you have. > What is this mobo that can run a 3090 and is stuck to ddr3? Yeah got stuck with this system like forever. Asus p9x79 deluxe mainboard with 8 drr3 slots. It was very high end back in the day,but not having avx2 is killing me in every corner with projects like this. I had 32 gb ram but after using strata I went on a mission to find 64 gb ddr3 on second hand market and I was extremely lucky to find compatible parts. You can find ddr4-ddr5 easy but ddr3 are rare especially with 64 gb capacity. So I bought ram for strata now I can't run it with the new GUI :(
Author
Owner

@coolguy744-creator commented on GitHub (Oct 27, 2026):

Interesting. Just wondering. Kinda want it lol.

On Mon, Oct 26, 2026, 8:43 AM FlowDownTheRiver @.***>
wrote:

FlowDownTheRiver left a comment (Niko1221/Strata#4165)
https://github.com/Niko1221/Strata/issues/4165#issuecomment-6420283722

  1. What a strange composition of parts you have.
    What is this mobo that can run a 3090 and is stuck to ddr3?

Yeah got stuck with this system like forever. Asus p9x79 deluxe mainboard
with 8 drr3 slots. It was very high end back in the day,but not having avx2
is killing me in every corner with projects like this.

—
Reply to this email directly, view it on GitHub
https://github.com/Niko1221/Strata/issues/4165?email_source=notifications&email_token=CHO6DZC6CZDJKLD66TAXTS35V5WJBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMNBSGAZDQMZXGIZKM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-6420283722,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/CHO6DZCKTTHPCQX65SEIITT5V5WJBAVCNFSNUABGKJSXA33TNF2G64TZHMYTGOBVHE2DMMZQGE5US43TOVSTWNRQGMYDAOJTG4YTNILWAI
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
https://github.com/notifications/mobile/ios/CHO6DZDPKLO425FCH3G4FLT5V5WJBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMNBSGAZDQMZXGIZKM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJKTGN5XXIZLSL5UW64Y
and Android
https://github.com/notifications/mobile/android/CHO6DZEZSB7LAKSS7B7KXHT5V5WJBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMNBSGAZDQMZXGIZKM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI.
Download it today!
You are receiving this because you commented.Message ID:
@.***>

<!-- gh-comment-id:6433838157 --> @coolguy744-creator commented on GitHub (Oct 27, 2026): Interesting. Just wondering. Kinda want it lol. On Mon, Oct 26, 2026, 8:43 AM FlowDownTheRiver ***@***.***> wrote: > *FlowDownTheRiver* left a comment (Niko1221/Strata#4165) > <https://github.com/Niko1221/Strata/issues/4165#issuecomment-6420283722> > > > 1. What a strange composition of parts you have. > What is this mobo that can run a 3090 and is stuck to ddr3? > > Yeah got stuck with this system like forever. Asus p9x79 deluxe mainboard > with 8 drr3 slots. It was very high end back in the day,but not having avx2 > is killing me in every corner with projects like this. > > — > Reply to this email directly, view it on GitHub > <https://github.com/Niko1221/Strata/issues/4165?email_source=notifications&email_token=CHO6DZC6CZDJKLD66TAXTS35V5WJBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMNBSGAZDQMZXGIZKM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-6420283722>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/CHO6DZCKTTHPCQX65SEIITT5V5WJBAVCNFSNUABGKJSXA33TNF2G64TZHMYTGOBVHE2DMMZQGE5US43TOVSTWNRQGMYDAOJTG4YTNILWAI> > . > Triage notifications, keep track of coding agent tasks and review pull > requests on the go with GitHub Mobile for iOS > <https://github.com/notifications/mobile/ios/CHO6DZDPKLO425FCH3G4FLT5V5WJBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMNBSGAZDQMZXGIZKM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJKTGN5XXIZLSL5UW64Y> > and Android > <https://github.com/notifications/mobile/android/CHO6DZEZSB7LAKSS7B7KXHT5V5WJBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMNBSGAZDQMZXGIZKM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>. > Download it today! > You are receiving this because you commented.Message ID: > ***@***.***> >
Author
Owner

@devstratum commented on GitHub (Oct 27, 2026):

Can you please use these files or examine them to make the new GUI work with AVX cpu's with cuda 12 or cuda 13, whichever is suitable?

Yes, I would also like support on Xeon E5-26XX V2 Series CPUs, which only have AVX

<!-- gh-comment-id:6441137617 --> @devstratum commented on GitHub (Oct 27, 2026): > Can you please use these files or examine them to make the new GUI work with AVX cpu's with cuda 12 or cuda 13, whichever is suitable? Yes, I would also like support on Xeon E5-26XX V2 Series CPUs, which only have AVX
Author
Owner

@fraseyboo commented on GitHub (Oct 27, 2026):

I just encountered this issue trying to run Strata 0.2.6 on my rig (Intel Xeon CPU E5-2697 v2, 128 GB DDR3, Nvidia P40 24 GB), it's an old setup but cost me less than £400 in total to build and has been running Ollama fine.

It's also kinda niche but the old 2013 Mac Pro (the trashcan one) uses similar architecture topping out with the E5-2667-V2, having support for AVX would let them be very cheap entries into the local LLM ecosystem.

Edit:

Building from source allowed me to use Strata 0.2.7 (5e8a4cca7d690ac60ca37eb09e7d0e010099ad6d) with the Web UI over http, the new UI still eludes me. Looking at the model log my CPU was missing AVX2 with FMA and F16C.

this CPU (Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz) does not support AVX2 with FMA and F16C, which this engine's CPU expert kernels need

I was able to build succesfully with the following CMake arguments:

STRATA_ENABLE_CUDA=ON
STRATA_EXPERIMENTAL_SM60=ON
CMAKE_CUDA_ARCHITECTURES=61
STRATA_ISA_FLOOR=avx
STRATA_PORTABLE=OFF

And also made sure GGML_NATIVE, GGML_AVX2, GGML_FMA, GGML_F16C, GGML_BMI2 and GGML_AVX512 were all off in the CMakeCache.txt.

Additionally I needed to modify the CUDA 12.8 headers due to a declaration mismatch. The local toolkit's crt/math_functions.h needed noexcept(true) on the six declarations of rsqrt/rsqrtf, sinpi/sinpif and cospi/cospif. There's a useful Nvidia thread on the issue here.

<!-- gh-comment-id:6441243889 --> @fraseyboo commented on GitHub (Oct 27, 2026): I just encountered this issue trying to run Strata 0.2.6 on my rig (Intel Xeon CPU E5-2697 v2, 128 GB DDR3, Nvidia P40 24 GB), it's an old setup but cost me less than £400 in total to build and has been running Ollama fine. It's also kinda niche but the old 2013 Mac Pro (the trashcan one) uses similar architecture topping out with the E5-2667-V2, having support for AVX would let them be very cheap entries into the local LLM ecosystem. **Edit:** Building from source allowed me to use Strata 0.2.7 (`5e8a4cca7d690ac60ca37eb09e7d0e010099ad6d`) with the Web UI over http, the new UI still eludes me. Looking at the model log my CPU was missing AVX2 with FMA and F16C. `this CPU (Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz) does not support AVX2 with FMA and F16C, which this engine's CPU expert kernels need` I was able to build succesfully with the following CMake arguments: ``` STRATA_ENABLE_CUDA=ON STRATA_EXPERIMENTAL_SM60=ON CMAKE_CUDA_ARCHITECTURES=61 STRATA_ISA_FLOOR=avx STRATA_PORTABLE=OFF ``` And also made sure `GGML_NATIVE, GGML_AVX2, GGML_FMA, GGML_F16C, GGML_BMI2` and `GGML_AVX512` were all off in the CMakeCache.txt. Additionally I needed to modify the CUDA 12.8 headers due to a declaration mismatch. The local toolkit's crt/math_functions.h needed `noexcept(true)` on the six declarations of `rsqrt/rsqrtf, sinpi/sinpif` and `cospi/cospif`. There's a useful Nvidia thread on the issue [here](https://forums.developer.nvidia.com/t/error-exception-specification-is-incompatible-for-cospi-sinpi-cospif-sinpif-with-glibc-2-41/323591).
Author
Owner

@devstratum commented on GitHub (Oct 28, 2026):

5. I was able to build succesfully with the following CMake arguments

What kind of performance did you get?
It's difficult for me to compile it myself.

<!-- gh-comment-id:6470408999 --> @devstratum commented on GitHub (Oct 28, 2026): > 5\. I was able to build succesfully with the following CMake arguments What kind of performance did you get? It's difficult for me to compile it myself.
Author
Owner

@fraseyboo commented on GitHub (Oct 28, 2026):

6. > 5. I was able to build succesfully with the following CMake arguments

    What kind of performance did you get?
    It's difficult for me to compile it myself.

I haven't run the official benchmark yet given the workarounds, but I am getting around 18 tokens/second on Qwen3.8-flash-next-ud-q6_k_xl which is the 110 GB model, comparably it's around 40% the speed of my main rig (Nvidia RTX A6000, an Intel i9-10980XE, 128 GB DDR5). The GPU is not fully-utilised under load and seems to run much cooler than when I was using Ollama which suggests there's some bottlenecks in utilisation.

With MoE models most of the limitations in processing speed come from the model not being present in the VRAM and then needing retrieval from the system memory. A good chunk of the experts fit into the 24 GB of VRAM in the P40 with an average VRAM hit rate of 85% for the Qwen3.8-flash-next-ud-q6_k_xl model.

I believe the actual bottleneck in my setup is coming from the PCIe Gen 3 x16 connection to the P40, it's limited to around 12 GB/s which is substantially slower than the aggregate 50 GB/s I can get off the system memory. With the A6000 because it's PCIe Gen 4 x16 the transfer speed is doubled, and the extra VRAM helps reduce transfers.

So I guess my takeaway is that the PCIe connection is the limiting factor with builds like these, if you can't fit the model into VRAM (like with an MoE) then the speed of the rest of the system doesn't really matter.

<!-- gh-comment-id:6471363074 --> @fraseyboo commented on GitHub (Oct 28, 2026): > 6\. > 5. I was able to build succesfully with the following CMake arguments > > What kind of performance did you get? > It's difficult for me to compile it myself. I haven't run the official benchmark yet given the workarounds, but I am getting around 18 tokens/second on Qwen3.8-flash-next-ud-q6_k_xl which is the 110 GB model, comparably it's around 40% the speed of my main rig (Nvidia RTX A6000, an Intel i9-10980XE, 128 GB DDR5). The GPU is not fully-utilised under load and seems to run much cooler than when I was using Ollama which suggests there's some bottlenecks in utilisation. With MoE models most of the limitations in processing speed come from the model not being present in the VRAM and then needing retrieval from the system memory. A good chunk of the experts fit into the 24 GB of VRAM in the P40 with an average VRAM hit rate of 85% for the Qwen3.8-flash-next-ud-q6_k_xl model. I believe the actual bottleneck in my setup is coming from the PCIe Gen 3 x16 connection to the P40, it's limited to around 12 GB/s which is substantially slower than the aggregate 50 GB/s I can get off the system memory. With the A6000 because it's PCIe Gen 4 x16 the transfer speed is doubled, and the extra VRAM helps reduce transfers. So I guess my takeaway is that the PCIe connection is the limiting factor with builds like these, if you can't fit the model into VRAM (like with an MoE) then the speed of the rest of the system doesn't really matter.
Author
Owner

@FlowDownTheRiver commented on GitHub (Oct 30, 2026):

Strata with my own AVX engine (no AVX2 CPU)

The official Strata app downloads an AVX2 / CUDA 13 engine. This setup compiles the engine on this PC
(AVX, CUDA 12.x) and installs it into the app as engine version 9.0.N, so the new desktop app and the
Terminal run it instead of the official one.

How it works in one line: the engine is packaged with the repo's own package_engine.py, signed with a local
test key, installed with strata update --feed, and that test key is trusted permanently
(STRATA_UPDATE_TRUSTED_KEYS) so the app does not throw the engine away at the next start.

Files (all live in E:\Strata, the git clone of the official repo)

File What it is
UPDATE_custom.bat Step 1. Pulls the newest code, runs the patch, clears CMake's cache if the compiler path is gone (Visual Studio update), then compiles the engine into build\ and build-vision\.
patch_strata.py Your patch script. Re-applies your AVX fix to CMakeLists.txt after every git pull (and checks src/core/vmm.cpp). UPDATE_custom.bat calls it: first with --restore, then again after the pull. Keep your own copy.
CMakeLists.txt The official file, patched in place by patch_strata.py. Do not edit it by hand: git checkout -- CMakeLists.txt restores the original before each pull.
INSTALL_MY_ENGINE.bat Step 2. Installs the Strata Terminal if missing, packages the compiled engine, builds a local test-signed feed, installs it, and trusts the test key.
packaging\package_engine.py, packaging\make_local_feed.py Official tools from the repo (come with git pull). Used by step 2.
custom-engine\ Created by step 2: stage\, pkg\, feed\, test-trust.json, version-counter.txt, update.log, and feed-test-keys\ (the private signing key: keep it private).

Also needed: the Strata desktop app (installed once), the Strata Terminal (step 2 offers to install it),
Git, Python on PATH, Visual Studio 2022 with the C++ tools, and the CUDA 12.x toolkit (CUDA_PATH set).

First-time order

  1. Install the Strata desktop app and let it run once.
  2. Put UPDATE_custom.bat, patch_strata.py and INSTALL_MY_ENGINE.bat in E:\Strata.
  3. Close the app. Run UPDATE_custom.bat and wait for the compile. Check that build\strata.exe and
    build-vision\bin\strata-vision.exe exist. A line could not compile the updated engine means it failed,
    even though the script still ends with "Strata is updated".
  4. Run INSTALL_MY_ENGINE.bat. Answer Y when it offers to install the Terminal. It ends with
    Done and the active engine 9.0.N.
  5. Sign out of Windows and in again (first time only), so the app starts with the trust setting.
  6. Start the app. About should show 9.0.N.

Every later Strata update

Close the app, run UPDATE_custom.bat, run INSTALL_MY_ENGINE.bat, start the app.
Each run installs the next version (9.0.N+1), so it always counts as newer than the official engines.
No sign-out is needed again.

Rules

  • Do not press "Update engine" or "Repair" in the app while it says there is no engine: that installs the
    official AVX2 engine and deletes yours. Rerun INSTALL_MY_ENGINE.bat instead.
  • Never edit or copy files into %LOCALAPPDATA%\Strata\components\engine by hand: every file is hash-checked.
  • strata components rollback returns to the previous engine.
  • Settings are at the top of INSTALL_MY_ENGINE.bat: ARCH (sm_86), VISION_ARCHS (86), MIN_DRIVER,
    VARIANT (avx, never cuda12), CUDA_BIN.

If something fails

What you see Cause and fix
CMAKE_CXX_COMPILER ... is not a full path Visual Studio changed its compiler folder. UPDATE_custom.bat clears the stale cache itself; run it again.
refusing to package the cuda12 engine The variant must stay avx.
needs MSVCP140.dll and similar The script copies the Visual C++ runtime from System32. Install the Visual C++ x64 redistributable if it warns.
Update exit 5, "older than the one already accepted" The script reads the accepted number and retries once. Run it again if it still stops.
Update exit 6 Your engine did not pass the test start; the old engine stays. Look at custom-engine\update.log.
Update exit 7 The app or a model is running. Close it.
App: "No Strata engine ... a key this PC does not trust" In a new Command Prompt echo %STRATA_UPDATE_TRUSTED_KEYS% must print the path of custom-engine\test-trust.json. If it does, sign out and in again; if not, rerun INSTALL_MY_ENGINE.bat.
App log: "CPU does not support AVX2" The official engine is active again. Rerun INSTALL_MY_ENGINE.bat.

Strata_new_gui_with_avx_patch.zip

Note : e:\strata refers to where you have git cloned the repo. It works on my system with avx with the new GUI. If something gets stuck you can ask claude to troubleshoot. Hope it works for you as well guys.

Note 2 : You may need to use build-strata.bat and build-vision.bat files manually and if necessary by deleting the "build-vision" and/or "build" folders when/if needed.

<!-- gh-comment-id:6536020016 --> @FlowDownTheRiver commented on GitHub (Oct 30, 2026): # Strata with my own AVX engine (no AVX2 CPU) The official Strata app downloads an AVX2 / CUDA 13 engine. This setup compiles the engine on this PC (AVX, CUDA 12.x) and installs it into the app as engine version `9.0.N`, so the new desktop app and the Terminal run it instead of the official one. How it works in one line: the engine is packaged with the repo's own `package_engine.py`, signed with a local test key, installed with `strata update --feed`, and that test key is trusted permanently (`STRATA_UPDATE_TRUSTED_KEYS`) so the app does not throw the engine away at the next start. ## Files (all live in `E:\Strata`, the git clone of the official repo) | File | What it is | |---|---| | `UPDATE_custom.bat` | Step 1. Pulls the newest code, runs the patch, clears CMake's cache if the compiler path is gone (Visual Studio update), then compiles the engine into `build\` and `build-vision\`. | | `patch_strata.py` | Your patch script. Re-applies your AVX fix to `CMakeLists.txt` after every `git pull` (and checks `src/core/vmm.cpp`). `UPDATE_custom.bat` calls it: first with `--restore`, then again after the pull. Keep your own copy. | | `CMakeLists.txt` | The official file, patched in place by `patch_strata.py`. Do not edit it by hand: `git checkout -- CMakeLists.txt` restores the original before each pull. | | `INSTALL_MY_ENGINE.bat` | Step 2. Installs the Strata Terminal if missing, packages the compiled engine, builds a local test-signed feed, installs it, and trusts the test key. | | `packaging\package_engine.py`, `packaging\make_local_feed.py` | Official tools from the repo (come with `git pull`). Used by step 2. | | `custom-engine\` | Created by step 2: `stage\`, `pkg\`, `feed\`, `test-trust.json`, `version-counter.txt`, `update.log`, and `feed-test-keys\` (the private signing key: keep it private). | Also needed: the Strata desktop app (installed once), the Strata Terminal (step 2 offers to install it), Git, Python on PATH, Visual Studio 2022 with the C++ tools, and the CUDA 12.x toolkit (`CUDA_PATH` set). ## First-time order 1. Install the Strata desktop app and let it run once. 2. Put `UPDATE_custom.bat`, `patch_strata.py` and `INSTALL_MY_ENGINE.bat` in `E:\Strata`. 3. Close the app. Run `UPDATE_custom.bat` and wait for the compile. Check that `build\strata.exe` and `build-vision\bin\strata-vision.exe` exist. A line `could not compile the updated engine` means it failed, even though the script still ends with "Strata is updated". 4. Run `INSTALL_MY_ENGINE.bat`. Answer `Y` when it offers to install the Terminal. It ends with `Done` and the active engine `9.0.N`. 5. Sign out of Windows and in again (first time only), so the app starts with the trust setting. 6. Start the app. About should show `9.0.N`. ## Every later Strata update Close the app, run `UPDATE_custom.bat`, run `INSTALL_MY_ENGINE.bat`, start the app. Each run installs the next version (`9.0.N+1`), so it always counts as newer than the official engines. No sign-out is needed again. ## Rules - Do not press "Update engine" or "Repair" in the app while it says there is no engine: that installs the official AVX2 engine and deletes yours. Rerun `INSTALL_MY_ENGINE.bat` instead. - Never edit or copy files into `%LOCALAPPDATA%\Strata\components\engine` by hand: every file is hash-checked. - `strata components rollback` returns to the previous engine. - Settings are at the top of `INSTALL_MY_ENGINE.bat`: `ARCH` (sm_86), `VISION_ARCHS` (86), `MIN_DRIVER`, `VARIANT` (`avx`, never `cuda12`), `CUDA_BIN`. ## If something fails | What you see | Cause and fix | |---|---| | `CMAKE_CXX_COMPILER ... is not a full path` | Visual Studio changed its compiler folder. `UPDATE_custom.bat` clears the stale cache itself; run it again. | | `refusing to package the cuda12 engine` | The variant must stay `avx`. | | `needs MSVCP140.dll` and similar | The script copies the Visual C++ runtime from System32. Install the Visual C++ x64 redistributable if it warns. | | Update exit 5, "older than the one already accepted" | The script reads the accepted number and retries once. Run it again if it still stops. | | Update exit 6 | Your engine did not pass the test start; the old engine stays. Look at `custom-engine\update.log`. | | Update exit 7 | The app or a model is running. Close it. | | App: "No Strata engine ... a key this PC does not trust" | In a new Command Prompt `echo %STRATA_UPDATE_TRUSTED_KEYS%` must print the path of `custom-engine\test-trust.json`. If it does, sign out and in again; if not, rerun `INSTALL_MY_ENGINE.bat`. | | App log: "CPU does not support AVX2" | The official engine is active again. Rerun `INSTALL_MY_ENGINE.bat`. | [Strata_new_gui_with_avx_patch.zip](https://github.com/user-attachments/files/34205671/Strata_new_gui_with_avx_patch.zip) Note : e:\strata refers to where you have git cloned the repo. It works on my system with avx with the new GUI. If something gets stuck you can ask claude to troubleshoot. Hope it works for you as well guys. Note 2 : You may need to use build-strata.bat and build-vision.bat files manually and if necessary by deleting the "build-vision" and/or "build" folders when/if needed.
Author
Owner

@devstratum commented on GitHub (Oct 31, 2026):

Strata with my own AVX engine (no AVX2 CPU)

Comrade, it's cool, we have to try!

<!-- gh-comment-id:6542709493 --> @devstratum commented on GitHub (Oct 31, 2026): > Strata with my own AVX engine (no AVX2 CPU) Comrade, it's cool, we have to try!
Author
Owner

@FlowDownTheRiver commented on GitHub (Nov 6, 2026):

@devstratum I have updated the patch.

<!-- gh-comment-id:6677392979 --> @FlowDownTheRiver commented on GitHub (Nov 6, 2026): @devstratum I have updated the patch.
Author
Owner

@devstratum commented on GitHub (Nov 6, 2026):

@FlowDownTheRiver very good, thanks, maybe you should create a repo for these patches?

<!-- gh-comment-id:6689977824 --> @devstratum commented on GitHub (Nov 6, 2026): @FlowDownTheRiver very good, thanks, maybe you should create a repo for these patches?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1826
No description provided.