Repository navigation
Conversation
edge0-strata keeps upstream Strata's HIP backend, but the latent-MoE
additions did not build or run with it.
Build (HIP only):
- CMakeLists.txt: compile lat_q3k_*.cu and moe_fused_q3k.cu in the HIP MMQ
branch (their entry points are stubs there) and add latent_dense.cpp and
latent_moe.cpp to strata_engine for HIP
- moe_fused.cu, moe_fused_q3k.cu: the latent kernel launches were outside
the !__HIPCC__ guard that holds the kernels
- verify.cpp, prefill.cpp: two debug dumps use cudaGraph* / cudaPointer*
names the HIP shim does not map
Run (HIP only):
- verify.cpp: the D stage's two D2H cudaMemcpyAsync calls and the
"verify top3" dump (a synchronous cudaMemcpy) ran inside the verify
window's graph capture, which HIP rejects ("end capture: operation
failed due to a previous error during capture"); on HIP the copies go
through copy_bytes_from_mapped and the dump is skipped
Docs: EDGE0.md describes the build and the configuration.
The fused latent kernels stay CUDA-only; on HIP the model runs with
STRATA_LATENT_FUSED=0, STRATA_LATENT_FUSED_DU=0, STRATA_LAT_FUSED_Q3K=0.
Tested on one RX 7900 XTX under Windows 11. The CUDA build was not rebuilt.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VmeXwKqR7k1jsojD2bUxve
|
Linux / RDNA2 data point: this PR's commit (78fe2d4) on gfx1030, 16 GB Before finding this PR I hit and fixed the same issues on my own: the HIP CMake sources, the latent launch guards, the unmapped debug-dump names, and the verify "top3" copy failing graph capture with Environment: CachyOS (Linux 7.3), Ryzen 7 5800X, 64 GB RAM, RX 6950 XT 16 GB (gfx1030, RDNA2), ROCm TheRock 7.13.0a20260515 wheels. Plain Passed
Failed: none observed on this commit. Notes from my own patch set (base da9cc52, not this PR):
Not run: ctest, any CUDA build, Windows, and this PR with the fused variables set to 0 as EDGE0.md describes. I only ran the template-driven launch. |
What & why
edge0-145bis documented as NVIDIA-only.edge0-stratastill carries upstream Strata's HIP backend, but thelatent-MoE additions did not build or run with it. With the changes below Edge0-145B-q3k loads, reads prompts and
decodes on a Radeon RX 7900 XTX (gfx1100, 24 GB) under Windows 11.
Build (HIP only):
CMakeLists.txt: the HIP MMQ branch now compileslat_q3k_*.cuandmoe_fused_q3k.cu(their entry points arealready stubs under
__HIPCC__), andstrata_enginegetslatent_dense.cppandlatent_moe.cppon HIP too; theywere only added inside
if(STRATA_ENABLE_CUDA).moe_fused.cu,moe_fused_q3k.cu: thelatent_kernel/latent_kernel_q3klaunches were outside the!__HIPCC__guard that holds the kernels. They are not reached on HIP (lat_dev().okis false).verify.cpp,prefill.cpp: two debug dumps usecudaGraph*/cudaPointer*names the HIP shim does not map.Run (HIP only):
verify.cpp: the D stage's two D2HcudaMemcpyAsynccalls and the "verify top3" dump (a synchronouscudaMemcpy) ran inside the verify window's graph capture. HIP then fails every request withverify: end capture: operation failed due to a previous error during capture. On HIP the two copies go throughcopy_bytes_from_mappedand the dump is skipped.Every code change is inside
#if defined(STRATA_USE_HIP)/__HIPCC__or in the HIP branch of the CMake file, sothe CUDA build's sources are unchanged after preprocessing.
Docs:
EDGE0.mdgets a "Build (Windows, AMD, experimental)" section.Limits:
STRATA_LATENT_FUSED=0,STRATA_LATENT_FUSED_DU=0,STRATA_LAT_FUSED_Q3K=0, so the prompt speed is far below the NVIDIA figures.edge0-inferdoes not start this build; the server is started by hand with a configuration file.labels.binis located by the last/ofSTRATA_LATENT_A, so a path with only\fails. Not changed here;the documentation says to write the path with
/.Area
edge0-infer/)edge0-infer/tools/assets/)edge0-infer/examples/)docs/)edge0-strata/)How was it tested?
Environment: Windows 11 (10.0.26300), Ryzen 7 5800X3D, 64 GB RAM, Radeon RX 7900 XTX 24 GB, driver
32.0.31041.1004, ROCm 10.2.0a20260930 (TheRock wheels), Visual Studio Build Tools, base commit b7900cb.
Passed:
HIP build:
set STRATA_HIP_ARCHS=gfx1100,set STRATA_NO_VISION=1,tools\hip\build_windows.bat(targetsstrata,strata-device, packaged zip).Run:
serve\server.py --engine strata --config <file>with Edge0-145B-q3k, D/U Q8,--vram-reserve-mib 3072(about 4100 experts resident). Chat requests through the web page and
/v1/chat/completionsreturn answers.tools\strata_bench.py(medians):native_expert_grouped)STRATA_LATENT_MMQ=1STRATA_LATENT_MMQ=1,STRATA_ROUTE_TAIL_SKIP=7,STRATA_ROUTE_PRIOR=1.5Not run:
build_windows.bat tests) and thelatent_*_verifytools.Before the changes: the HIP build stopped at
verify.cpp,moe_fused.cu,moe_fused_q3k.cuandprefill.cpp;once it built, every request failed with the capture error above.
Checklist
ctest --preset cpu -L "L0|L1"passes locally inedge0-infer/(engine changes) - not applicable, no change inedge0-infer/edge0-infer/docs/testing.md) - not run, see aboveedge0-strata/EDGE0.md(English only)Co-Authored-By: Claude Fable 5.2