Skip to content

Commit e3ca02e

Browse files
committed
split HIP CMake: STRATA_SPLIT_HIP_ARCHS names the split's code objects (gfx11-generic is not in the main backend's arch list); amd_split_report issue template
1 parent a0247cd commit e3ca02e

3 files changed

Lines changed: 81 additions & 5 deletions

File tree

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: AMD split engine report
2+
description: Tell us whether the all-cards split engine works on your AMD cards (it prints a line asking for this on cards Strata has not run it on)
3+
title: "[Engine] AMD split engine: <your card> x <count>"
4+
labels: ["engine", "amd-split-report"]
5+
body:
6+
- type: markdown
7+
value: |
8+
Strata runs the all-cards split engine by itself on Radeon AI PRO R9700 / RX 9070 (gfx1201). On other AMD cards (RX 9060, RX 7000, the 780M and similar) it only starts when you ask for it with `strata launch --split-engine on`, and it prints one line asking you to report whether it works. We cannot test those cards, so your report is how we learn.
9+
10+
Write only what you saw. A report that says "it did not start" is as useful as one that says "it works".
11+
- type: input
12+
id: card
13+
attributes:
14+
label: Card model and count
15+
description: For example "2 x RX 7900 XTX 24 GB" or "3 x RX 9060 XT 16 GB"
16+
validations:
17+
required: true
18+
- type: input
19+
id: arch
20+
attributes:
21+
label: Architecture (the gfx name)
22+
description: From the engine's line, or `rocminfo | grep gfx`. For example gfx1100.
23+
validations:
24+
required: true
25+
- type: input
26+
id: rocm
27+
attributes:
28+
label: ROCm / driver version
29+
description: Strata's engine package brings its own ROCm libraries; the kernel driver is yours (`uname -r`, `amd-smi version`).
30+
validations:
31+
required: true
32+
- type: input
33+
id: model
34+
attributes:
35+
label: Model and quantization
36+
description: The model Strata loaded, for example Qwen3.8-Flash-Next UD-Q4_K_XL or the IQ3_S set.
37+
validations:
38+
required: true
39+
- type: textarea
40+
id: selftest
41+
attributes:
42+
label: The self-test line
43+
description: Paste the line from the engine's log that starts "The split engine's self-test" (passed or failed). The log is in the run folder shown at launch; `strata launch` also prints it.
44+
render: text
45+
validations:
46+
required: true
47+
- type: dropdown
48+
id: result
49+
attributes:
50+
label: What happened
51+
options:
52+
- It started and the answers look right
53+
- It started and the answers look wrong
54+
- The self-test failed, so the normal layer split started
55+
- It failed to start (not the self-test)
56+
- It started and crashed or hung later
57+
validations:
58+
required: true
59+
- type: input
60+
id: speed
61+
attributes:
62+
label: Speed, tok/s (the split engine, then the layer split with `--split-engine off` if you tried both)
63+
description: For example "decode 61 tok/s, layer split 48 tok/s, one user".
64+
- type: textarea
65+
id: more
66+
attributes:
67+
label: Anything else
68+
description: Wrong answers (the prompt and what you got), crashes (the last lines of the engine log), or what you changed.

‎packaging/build_split_hip.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ SYSDEPS=""; [ -d "$HP/lib/rocm_sysdeps" ] && SYSDEPS=";$HP/lib/rocm_sysdeps"
2828
BC=$HP/lib/llvm/amdgcn/bitcode; [ -d "$BC" ] || BC=$HP/amdgcn/bitcode
2929
rm -f "$B/CMakeCache.txt"
3030
cmake -G Ninja -S "$SRC" -B "$B" -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_HIP=ON -DSTRATA_ENABLE_CUDA=OFF -DSTRATA_BUILD_TESTS=OFF -DSTRATA_BUILD_SPLIT=ON \
31-
"-DSTRATA_SPLIT_CARDS=${CARDS// /;}" "-DCMAKE_HIP_ARCHITECTURES=$ARCHS" -DSTRATA_PREFILL_MMQ=ON -DSTRATA_NATIVE_EXPERTS=ON -DSTRATA_GGML_DIR="$GG" \
31+
"-DSTRATA_SPLIT_CARDS=${CARDS// /;}" "-DCMAKE_HIP_ARCHITECTURES=gfx1201" "-DSTRATA_SPLIT_HIP_ARCHS=$ARCHS" -DSTRATA_PREFILL_MMQ=ON -DSTRATA_NATIVE_EXPERTS=ON -DSTRATA_GGML_DIR="$GG" \
3232
-DCMAKE_HIP_COMPILER="$HP/llvm/bin/clang++" -DCMAKE_HIP_COMPILER_ROCM_ROOT="$HP" "-DCMAKE_PREFIX_PATH=$HP;$LIBW$SYSDEPS" \
3333
"-DCMAKE_HIP_FLAGS=--rocm-path=$HP --rocm-device-lib-path=$BC" -DSTRATA_PORTABLE=ON \
3434
"-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,'\$ORIGIN' -Wl,--enable-new-dtags"

‎src/split/CMakeLists.txt‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,23 @@ if(_fnx_hip)
3434
# gfx11-generic = gfx1100 gfx1101 gfx1102 gfx1103 in one code object (RX 7000 and the 780M iGPU; the gfx11 WMMA path, hip/mma.h FNX_WMMA_GFX11; the self-test passes on a 780M,
3535
# no multi-card PC has run it). Only gfx1201 is automatic
3636
# (strata_control/split_engine.py AUTO_SPLIT_AMD_ARCHS); on another card the engine runs src/selftest.cu before it loads the model
37+
# STRATA_SPLIT_HIP_ARCHS names the split engine's code objects when they are not the tree's CMAKE_HIP_ARCHITECTURES (whose list the HIP backend checks for the main
38+
# engine and does not know gfx11-generic); empty: the tree's list
39+
set(STRATA_SPLIT_HIP_ARCHS "" CACHE STRING "code objects of strata-split-N (gfx1201;gfx1200;gfx11-generic), empty: CMAKE_HIP_ARCHITECTURES")
40+
if(STRATA_SPLIT_HIP_ARCHS)
41+
set(_fnx_hip_archs ${STRATA_SPLIT_HIP_ARCHS})
42+
else()
43+
set(_fnx_hip_archs ${STRATA_HIP_ARCH_LIST})
44+
endif()
3745
set(_fnx_hip_ok gfx1100 gfx1101 gfx1102 gfx1103 gfx11-generic gfx1200 gfx1201)
3846
set(_fnx_hip_bad "")
39-
foreach(_a ${STRATA_HIP_ARCH_LIST})
47+
foreach(_a ${_fnx_hip_archs})
4048
if(NOT _a IN_LIST _fnx_hip_ok)
4149
list(APPEND _fnx_hip_bad ${_a})
4250
endif()
4351
endforeach()
44-
if(NOT STRATA_HIP_ARCH_LIST OR _fnx_hip_bad)
45-
message(WARNING "STRATA_BUILD_SPLIT (HIP): the split engine builds for ${_fnx_hip_ok} only (CMAKE_HIP_ARCHITECTURES=${STRATA_HIP_ARCH_LIST}), skipped")
52+
if(NOT _fnx_hip_archs OR _fnx_hip_bad)
53+
message(WARNING "STRATA_BUILD_SPLIT (HIP): the split engine builds for ${_fnx_hip_ok} only (got ${_fnx_hip_archs}), skipped")
4654
return()
4755
endif()
4856
set(STRATA_SPLIT_ARCH 1201) # (FNX_ARCH is only compared with 80 and 70: any HIP value takes the WMMA paths)
@@ -95,7 +103,7 @@ foreach(_n ${STRATA_SPLIT_CARDS})
95103
FNX_DIR="${_sp}")
96104
target_compile_options(${_t} PRIVATE "$<$<COMPILE_LANGUAGE:HIP>:SHELL:-include ${_sp}/src/hip/fnx_hip.h>")
97105
target_link_libraries(${_t} PRIVATE strata_hip_runtime ${STRATA_HIP_BLAS_TARGETS})
98-
set_target_properties(${_t} PROPERTIES CXX_STANDARD 17 HIP_STANDARD 17 HIP_STANDARD_REQUIRED ON)
106+
set_target_properties(${_t} PROPERTIES CXX_STANDARD 17 HIP_STANDARD 17 HIP_STANDARD_REQUIRED ON HIP_ARCHITECTURES "${_fnx_hip_archs}")
99107
find_package(Threads REQUIRED)
100108
target_link_libraries(${_t} PRIVATE Threads::Threads)
101109
continue()

0 commit comments

Comments
 (0)