mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 07:48:45 +00:00
tests: time one prompt layer of experts on every prompt path, and the dense prompt GEMMs with FP16 io off and on
prefill_expert_paths_bench (CUDA) and hip_prefill_expert_paths_bench (HIP) time one layer of routed experts on synthetic weights, no model file: MMQ where the build has it, the dequantize + FP16 GEMM path (the library calls of prefill.cpp's FP16 branch, in its order), the same with the few-row experts on the quantized grouped kernels, one grouped call for the whole layer (the Qwen3.6 engine's fallback), and the fused kernels where the card has them. Median of N repeats after a warm-up, speed ratios against MMQ, error against a CPU FP32 reference on a sample of pairs, an output hash per path, VRAM used, one machine-readable RESULT line per cell. Runs on cards without fused kernels and in builds without MMQ. --dense times strata::prefill::Gemm at the dense prompt shapes of the compiled geometry (the call sites in prefill.cpp) with set_f16_io off and on (STRATA_HIP_PROMPT_F16), with the error against the CPU reference. Test and CMake wiring only (a ctest smoke entry for each backend); no product source is touched.
This commit is contained in:
1 parent
a269d4c82b
commit
b9bd40181b
3 files changed
+1165
No files matched your search
@@ -334,6 +334,13 @@ macro(strata_cuda_prompt_tests)
|
||||
target_link_libraries(prefill_fused_iq_test PRIVATE ${_strata_pf_tests_lib} ggml-base ${_strata_gpu_runtime_target})
|
||||
add_test(NAME prefill_fused_iq_test COMMAND prefill_fused_iq_test)
|
||||
set_tests_properties(prefill_fused_iq_test PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 600)
|
||||
# one prompt layer of experts timed on every path the engine can take (MMQ where it is built, the dequantize + FP16 GEMM path with and without
|
||||
# the few-row experts, the grouped kernels, the fused kernels where the card has them), hash and error of each against a CPU reference; runs on
|
||||
# any card (77 only without one). The ctest entry is a small smoke run; the grid is `prefill_expert_paths_bench` itself (see its source's head)
|
||||
add_executable(prefill_expert_paths_bench tests/cuda/prefill_expert_paths_bench.cpp)
|
||||
target_link_libraries(prefill_expert_paths_bench PRIVATE strata_prefill ${_strata_pf_tests_lib} ggml-base ${_strata_gpu_runtime_target})
|
||||
add_test(NAME prefill_expert_paths_bench COMMAND prefill_expert_paths_bench --quick)
|
||||
set_tests_properties(prefill_expert_paths_bench PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 600)
|
||||
# P4-SMALL: the fused experts for one gathered group (the layer-major walk's entry) against the layer's fused path (bits) and MMQ in the walk
|
||||
# (P4-INT: MMQ builds only: the test returns 1 where mmq::built() is false, it has no no-MMQ rule yet)
|
||||
if(STRATA_MMQ)
|
||||
|
||||
@@ -143,6 +143,13 @@ macro(strata_hip_prompt_tests)
|
||||
add_test(NAME hip_prefill_fused_iq_f16 COMMAND hip_prefill_fused_iq)
|
||||
set_tests_properties(hip_prefill_fused_iq_f16 PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 600 ENVIRONMENT "STRATA_PF_F16=1;STRATA_PF_F16_KQ=1")
|
||||
list(APPEND _strata_hip_tests hip_prefill_fused_iq)
|
||||
# one prompt layer of experts timed on every path the engine can take (see tests/cuda/prefill_expert_paths_bench.cpp); any AMD card, a small smoke run here
|
||||
add_executable(hip_prefill_expert_paths_bench tests/cuda/prefill_expert_paths_bench.cpp)
|
||||
target_include_directories(hip_prefill_expert_paths_bench PRIVATE "${_strata_gg}/include")
|
||||
target_link_libraries(hip_prefill_expert_paths_bench PRIVATE strata_prefill ${_strata_pf_tests_lib} ggml-base strata_hip_runtime)
|
||||
add_test(NAME hip_prefill_expert_paths_bench COMMAND hip_prefill_expert_paths_bench --quick)
|
||||
set_tests_properties(hip_prefill_expert_paths_bench PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 600)
|
||||
list(APPEND _strata_hip_tests hip_prefill_expert_paths_bench)
|
||||
# STRATA_PF_FUSED_Q8D=1 (gfx12, opt-in): the pinned UD-IQ4_XS's i-quant / Q8_0 pairs on the fused kernels without the K-quant switch (--no-kq);
|
||||
# off gfx12 the pairs are not covered without STRATA_PF_FUSED_KQ and the test skips (77, as without a card)
|
||||
add_test(NAME hip_prefill_fused_iq_q8d COMMAND hip_prefill_fused_iq "--only=S / Q8_0" --edge --no-timing --no-kq)
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user