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
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
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