Archived
M2XFP4 (MXFP4v2): quantiser, gfx1201 WMMA kernels, host rows, df2 wiring, .rad packer (Import::ParoM2), stability fixes (counters-in-scratch x3, aql publish fences), kbench rows, runbook (REMAINING.md)
This commit is contained in:
1 parent
9eaf10da6e
commit
ea0908596b
60 files changed
+4619
-193
No files matched your search
+27
-4
@@ -409,8 +409,11 @@ set(R4D_EMU_HIP ${R4D_DIR}/r4d_attn_paged_window.hip ${R4D_DIR}/r4d_pair_argmax_
|
||||
${R4D_DIR}/r4d_qsa_select_bf16.hip ${R4D_DIR}/r4d_lora_bf16.hip ${R4D_DIR}/r4d_glm.hip
|
||||
${R4D_DIR}/r4d_mhc.hip ${R4D_DIR}/r4d_fp8_f32scale.hip ${R4D_DIR}/r4d_kda.hip
|
||||
${R4D_DIR}/r4d_moe_mxfp4.hip ${R4D_DIR}/r4d_mla.hip ${R4D_DIR}/r4d_quant_act_fp8.hip
|
||||
${R4D_DIR}/r4d_dsa.hip)
|
||||
set(R4D_EMU_TESTS attn pick norm escale qsa lora f32 mhc fp8f32 kda moemx mla moefuse dsa)
|
||||
${R4D_DIR}/r4d_dsa.hip
|
||||
# The M2XFP4 GEMMs: their cfg readers are inline in r4d_args.h, so the units link
|
||||
# without the declaration side and the test runs what an untuned install runs.
|
||||
${R4D_DIR}/r4d_gemm_m2xfp4a8_decode.hip ${R4D_DIR}/r4d_gemm_m2xfp4a8_tiled.hip)
|
||||
set(R4D_EMU_TESTS attn pick norm escale qsa lora f32 mhc fp8f32 kda moemx mla moefuse dsa m2xfp4)
|
||||
set(R4D_EMU_BUILT OFF)
|
||||
if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64)$")
|
||||
# No fiber switch for this ISA.
|
||||
@@ -449,7 +452,7 @@ else()
|
||||
${R4D_EMU}/test_escale.cpp ${R4D_EMU}/test_qsa.cpp ${R4D_EMU}/test_lora.cpp
|
||||
${R4D_EMU}/test_f32.cpp ${R4D_EMU}/test_mhc.cpp ${R4D_EMU}/test_fp8f32.cpp
|
||||
${R4D_EMU}/test_kda.cpp ${R4D_EMU}/test_moemx.cpp ${R4D_EMU}/test_mla.cpp
|
||||
${R4D_EMU}/test_moefuse.cpp ${R4D_EMU}/test_dsa.cpp)
|
||||
${R4D_EMU}/test_moefuse.cpp ${R4D_EMU}/test_dsa.cpp ${R4D_EMU}/test_m2xfp4.cpp)
|
||||
get_filename_component(stem ${src} NAME_WE)
|
||||
set(lang "")
|
||||
if(src MATCHES "\\.hip$")
|
||||
@@ -486,7 +489,7 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
if(R4D_EMU_BUILT)
|
||||
foreach(t pick norm escale qsa lora f32 mhc fp8f32 kda moemx mla moefuse dsa)
|
||||
foreach(t pick norm escale qsa lora f32 mhc fp8f32 kda moemx mla moefuse dsa m2xfp4)
|
||||
add_test(NAME r4d_emu_${t} COMMAND ${CMAKE_BINARY_DIR}/tests/r4d_emu_${t})
|
||||
endforeach()
|
||||
# The attention cases take about 11 s, 7 of them in the two long prefills on the WMMA kernel,
|
||||
@@ -498,6 +501,7 @@ if(R4D_EMU_BUILT)
|
||||
set_tests_properties(r4d_emu_attn_shard0 r4d_emu_attn_shard1 r4d_emu_attn_shard2 r4d_emu_pick
|
||||
r4d_emu_norm r4d_emu_escale r4d_emu_qsa r4d_emu_lora r4d_emu_mla r4d_emu_moefuse
|
||||
r4d_emu_dsa
|
||||
r4d_emu_m2xfp4
|
||||
PROPERTIES LABELS "r4d_emu" TIMEOUT ${RAD_TEST_TIMEOUT})
|
||||
# The LoRA pair has a libref oracle, and the test holds the emulated kernels to it when it can
|
||||
# load one -- expand bit for bit, shrink to its bound. kda_update is held to libref's within
|
||||
@@ -610,6 +614,25 @@ if(TARGET rad-kbench AND EXISTS ${CMAKE_SOURCE_DIR}/data/kernels_moe.rkb)
|
||||
ENVIRONMENT "RADIANCE_HOME=${RAD_PLUGIN_OUT};OMP_WAIT_POLICY=passive")
|
||||
endif()
|
||||
|
||||
# The M2XFP4 rows over the 27B-trunk fixture set (see the root CMakeLists): the four max-tok
|
||||
# passes replayed together, covering the m2xfp4a8 decode row's whole M ladder. Scoped to
|
||||
# libref:libr4d: the m2 arm of the other host library is that library's own to bring up.
|
||||
if(TARGET rad-kbench AND EXISTS ${CMAKE_SOURCE_DIR}/data/kernels_m2xfp4_m128.rkb)
|
||||
add_test(NAME kbench_m2xfp4
|
||||
COMMAND rad-kbench --home ${RAD_PLUGIN_OUT} --kernels libref:libr4d --max-cases 1
|
||||
--no-ref --strict --coverage ${RAD_KBENCH_ROWS}
|
||||
--fixture ${RAD_PLUGIN_OUT}/kernels_m2xfp4_m1.rkb
|
||||
--fixture ${RAD_PLUGIN_OUT}/kernels_m2xfp4_m8.rkb
|
||||
--fixture ${RAD_PLUGIN_OUT}/kernels_m2xfp4_m16.rkb
|
||||
--fixture ${RAD_PLUGIN_OUT}/kernels_m2xfp4_m128.rkb)
|
||||
set_tests_properties(kbench_m2xfp4 PROPERTIES
|
||||
LABELS "${RAD_KBENCH_LABELS}"
|
||||
TIMEOUT 1800
|
||||
RESOURCE_LOCK kbench_memory
|
||||
PROCESSORS 4
|
||||
ENVIRONMENT "RADIANCE_HOME=${RAD_PLUGIN_OUT};OMP_WAIT_POLICY=passive")
|
||||
endif()
|
||||
|
||||
# libref against its own recordings, both fixtures, at tolerance zero: it is deterministic and
|
||||
# machine-independent by construction, so any difference is a change in libref (or in the draw)
|
||||
# that would otherwise become the next recording's target. This is the oracle's regression test.
|
||||
|
||||
Reference in new issue
Block a user