Archived
Merge upstream main (v1.15.1 -> v1.17.0, 152 commits) into the SYCL port
Conflicts, both sides kept:
- abi: RAD_ABI_VERSION 37 (upstream); the fork's RadBuildCtx.plain_norm after upstream's
expert_file_tier, widened to int64_t so it starts past ABI 37's 208-byte struct instead of in
its tail padding (abi_layout_test); RadSyclStream rows after RadShapeGen*.
- arch/common/rad_block_gdn_fp8.h: upstream's q8_rot guard and the fork's o_plain guard
combined; the decode-row q_o.step only where q_o is declared (!o_plain).
- docs/OPS.md: upstream's optional params on sample_logprobs, the fork's q_temp on
mtp_couple_propose.
Also ignores /baseline-models/ (local model copies).
Host tests: arch_test's MTP lint/graph-pin failures are unchanged from before the merge (the
fork's mtp.fc LinearFP8, 10a99a5); avx_check's hand-built moe_gemm_q w4a8 case also fails on
upstream's own files; images/videos need FFmpeg; three binaries over their CPU budget on this VM.
SYCL card tests 3/3.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
45f3b510c7
365 files changed
+56942
-6331
No files matched your search
+59
-27
@@ -10,12 +10,12 @@
|
||||
# fast every test with none of slow, gpu, oot and perf, set at the end of this file: the
|
||||
# inner loop (`ctest --preset fast`, or `ctest -L fast`)
|
||||
#
|
||||
# arch_test and glm5next_test do not link rad_core: they supply their own recording fake of the
|
||||
# declare-phase C ABI (arch_fakes.h), so plugins are tested without depending on core/build/'s
|
||||
# builder. With the archive linked, a new ABI call missing from the fake would pull in
|
||||
# rad_builder.cpp.o and collide on every rad_decl_* symbol; without it the error is a single
|
||||
# undefined reference.
|
||||
set(RAD_TESTS_NO_CORE arch_test glm5next_test nemotron35_test)
|
||||
# arch_test, glm5next_test, nemotron35_test, spark25_arch_test and nemotronh_test do not link rad_core: they supply
|
||||
# their own recording fake of the declare-phase C ABI (arch_fakes.h), so plugins are tested without
|
||||
# depending on core/build/'s builder. With the archive linked, a new ABI call missing from the fake
|
||||
# would pull in rad_builder.cpp.o and collide on every rad_decl_* symbol; without it the error is a
|
||||
# single undefined reference.
|
||||
set(RAD_TESTS_NO_CORE arch_test glm5next_test nemotron35_test spark25_arch_test nemotronh_test)
|
||||
|
||||
# fixture_test tests tools/kfixture.cpp and tools/opshapes.cpp (the seeded draw, the reduction and
|
||||
# the on-disk recording) directly, kbench_test tools/kbench_core.cpp (rad-kbench's rules), and
|
||||
@@ -166,6 +166,9 @@ string(APPEND RAD_PERF_SCRIPT "include([==[${CMAKE_CURRENT_SOURCE_DIR}/perf_entr
|
||||
set(RAD_TESTS_WHOLE_CORE shipped_plugins_test)
|
||||
|
||||
file(GLOB RAD_TESTS CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*_test.cpp)
|
||||
if(NOT RAD_HIP_FOUND)
|
||||
list(FILTER RAD_TESTS EXCLUDE REGEX "/dspark_device_test\\.cpp$")
|
||||
endif()
|
||||
foreach(t ${RAD_TESTS})
|
||||
get_filename_component(n ${t} NAME_WE)
|
||||
if(n IN_LIST RAD_TESTS_NO_CORE)
|
||||
@@ -263,16 +266,28 @@ foreach(t ${RAD_TESTS})
|
||||
if(n STREQUAL "mem_test")
|
||||
set_target_properties(${n} PROPERTIES ENABLE_EXPORTS ON)
|
||||
endif()
|
||||
if(DEFINED RAD_TEST_SHARDS_${n})
|
||||
math(EXPR last "${RAD_TEST_SHARDS_${n}} - 1")
|
||||
foreach(k RANGE ${last})
|
||||
rad_unit_test(${n}_shard${k} ${n} --shard ${k}/${RAD_TEST_SHARDS_${n}})
|
||||
endforeach()
|
||||
if(n STREQUAL "dspark_device_test")
|
||||
if(RAD_HIP_FOUND AND TARGET libr4d)
|
||||
add_dependencies(${n} libr4d)
|
||||
add_test(NAME ${n} COMMAND ${n} ${RAD_PLUGIN_OUT}/kernels/libr4d.so)
|
||||
set_tests_properties(${n} PROPERTIES
|
||||
LABELS gpu
|
||||
SKIP_RETURN_CODE 77
|
||||
TIMEOUT ${RAD_TEST_TIMEOUT}
|
||||
ENVIRONMENT "${RAD_TEST_CARD_ENV}")
|
||||
endif()
|
||||
else()
|
||||
rad_unit_test(${n} ${n})
|
||||
if(DEFINED RAD_TEST_SHARDS_${n})
|
||||
math(EXPR last "${RAD_TEST_SHARDS_${n}} - 1")
|
||||
foreach(k RANGE ${last})
|
||||
rad_unit_test(${n}_shard${k} ${n} --shard ${k}/${RAD_TEST_SHARDS_${n}})
|
||||
endforeach()
|
||||
else()
|
||||
rad_unit_test(${n} ${n})
|
||||
endif()
|
||||
string(APPEND RAD_PERF_SCRIPT
|
||||
"rad_perf_entry(${n} [==[${t}]==] [==[${CMAKE_BINARY_DIR}/tests/${n}]==])\n")
|
||||
endif()
|
||||
string(APPEND RAD_PERF_SCRIPT
|
||||
"rad_perf_entry(${n} [==[${t}]==] [==[${CMAKE_BINARY_DIR}/tests/${n}]==])\n")
|
||||
endforeach()
|
||||
|
||||
# ================================================================== perf_ cases
|
||||
@@ -333,6 +348,11 @@ if(TARGET spechub)
|
||||
add_dependencies(sample_test spechub)
|
||||
endif()
|
||||
|
||||
if(TARGET spark25_recipe_test)
|
||||
target_compile_definitions(spark25_recipe_test PRIVATE
|
||||
RAD_SPARK25_RECIPE_DIR="${CMAKE_SOURCE_DIR}/data/recipes")
|
||||
endif()
|
||||
|
||||
# ================================================================== whole models on the CPU
|
||||
#
|
||||
# engine_e2e_test runs the radiance binary on tiny synthetic checkpoints (tests/tiny_model.h) on
|
||||
@@ -344,12 +364,14 @@ set(RAD_E2E_DEPS radiance rad-convert libref libquant nemotron35_embed qwen35_bf
|
||||
if(TARGET libavx)
|
||||
list(APPEND RAD_E2E_DEPS libavx)
|
||||
endif()
|
||||
foreach(t engine_e2e_test convert_test clef_decision_test laya_decision_test)
|
||||
foreach(t engine_e2e_test convert_test clef_decision_test laya_decision_test spark25_convert_test)
|
||||
if(TARGET ${t})
|
||||
target_compile_definitions(${t} PRIVATE
|
||||
RAD_E2E_SERVER="$<TARGET_FILE:radiance>" RAD_E2E_CONVERT="$<TARGET_FILE:rad-convert>"
|
||||
RAD_E2E_HOME="${RAD_PLUGIN_OUT}" RAD_E2E_RECIPES="${CMAKE_SOURCE_DIR}/data/recipes")
|
||||
if(t STREQUAL "clef_decision_test")
|
||||
if(t STREQUAL "spark25_convert_test")
|
||||
add_dependencies(${t} rad-convert libref spark25_bf16)
|
||||
elseif(t STREQUAL "clef_decision_test")
|
||||
# The tiny clef's golden (tests/mkclefgolden.py) and the one plugin a clef container selects.
|
||||
target_compile_definitions(${t} PRIVATE
|
||||
RAD_CLEF_GOLDEN="${CMAKE_CURRENT_SOURCE_DIR}/data/golden/clef_tiny.json")
|
||||
@@ -384,10 +406,10 @@ if(TARGET abi_layout_test)
|
||||
COMPILE_OPTIONS "-std=c11;-pedantic-errors;-Wall;-Wextra")
|
||||
endif()
|
||||
|
||||
# arch_test reads libref's vocabulary from $RADIANCE_HOME/kernels to check that each architecture
|
||||
# declares on it, and glm5next_test the loaded libraries' op schemas, so libref is built before
|
||||
# them.
|
||||
foreach(t arch_test glm5next_test)
|
||||
# arch_test and nemotronh_test read libref's vocabulary from $RADIANCE_HOME/kernels to check that
|
||||
# each architecture declares on it, and glm5next_test the loaded libraries' op schemas, so libref is
|
||||
# built before them.
|
||||
foreach(t arch_test glm5next_test nemotronh_test)
|
||||
if(TARGET libref AND TARGET ${t})
|
||||
add_dependencies(${t} libref)
|
||||
endif()
|
||||
@@ -430,11 +452,13 @@ endif()
|
||||
#
|
||||
# libhalo serves gfx1151 behind libr4d's exact interface (libhalo/halo_parity.cpp): the same op
|
||||
# schemas and rows, so every model plugin runs on either. Host-only (the tables, no device calls);
|
||||
# present when one build produces both plugins.
|
||||
# present when one build produces both plugins. Labelled `parity`: it fails while libr4d has ops
|
||||
# libhalo has not ported yet (every one printed as "only in libr4d"), which the image's test stage
|
||||
# leaves out; a schema both declare must still agree, or the loader refuses the second library.
|
||||
if(TARGET halo_parity)
|
||||
add_test(NAME halo_parity
|
||||
COMMAND halo_parity ${RAD_PLUGIN_OUT}/kernels/libr4d.so ${RAD_PLUGIN_OUT}/kernels/libhalo.so)
|
||||
set_tests_properties(halo_parity PROPERTIES LABELS "fast" TIMEOUT 60)
|
||||
set_tests_properties(halo_parity PROPERTIES LABELS "fast;parity" TIMEOUT 60)
|
||||
endif()
|
||||
|
||||
# ================================================================== the device layer without SVM
|
||||
@@ -535,11 +559,12 @@ set(R4D_EMU_HIP ${R4D_DIR}/r4d_attn_paged_window.hip ${R4D_DIR}/r4d_pair_argmax_
|
||||
${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_kv_resolve.hip ${R4D_DIR}/r4d_dsa.hip
|
||||
${R4D_DIR}/r4d_gemm_m2xfp4a8_decode.hip ${R4D_DIR}/r4d_gemm_m2xfp4a8_tiled.hip)
|
||||
${R4D_DIR}/r4d_gemm_m2xfp4a8_decode.hip ${R4D_DIR}/r4d_gemm_m2xfp4a8_tiled.hip
|
||||
${R4D_DIR}/r4d_lili.hip)
|
||||
# The M2XFP4 units' plugin entries call two cfg readers that r4d_rows.cpp defines, which is not in
|
||||
# this build: cfg_stub.cpp defines them at their axis defaults, in both arms below.
|
||||
set(R4D_EMU_TESTS attn pick norm escale qsa lora f32 mhc fp8f32 kda moemx mla moefuse kvres
|
||||
dsa m2xfp4)
|
||||
dsa m2xfp4 lili)
|
||||
set(R4D_EMU_BUILT OFF)
|
||||
if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64)$")
|
||||
# No fiber switch for this ISA.
|
||||
@@ -580,7 +605,8 @@ else()
|
||||
${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_kvres.cpp
|
||||
${R4D_EMU}/test_dsa.cpp ${R4D_EMU}/test_m2xfp4.cpp ${R4D_EMU}/cfg_stub.cpp)
|
||||
${R4D_EMU}/test_dsa.cpp ${R4D_EMU}/test_m2xfp4.cpp ${R4D_EMU}/test_lili.cpp
|
||||
${R4D_EMU}/cfg_stub.cpp)
|
||||
get_filename_component(stem ${src} NAME_WE)
|
||||
set(lang "")
|
||||
if(src MATCHES "\\.hip$")
|
||||
@@ -617,7 +643,7 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
if(R4D_EMU_BUILT)
|
||||
foreach(t pick norm escale qsa lora f32 mhc fp8f32 kda moemx mla moefuse kvres dsa m2xfp4)
|
||||
foreach(t pick norm escale qsa lora f32 mhc fp8f32 kda moemx mla moefuse kvres dsa m2xfp4 lili)
|
||||
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,
|
||||
@@ -628,7 +654,7 @@ if(R4D_EMU_BUILT)
|
||||
endforeach()
|
||||
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
|
||||
r4d_emu_dsa r4d_emu_m2xfp4 r4d_emu_lili
|
||||
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
|
||||
@@ -810,6 +836,12 @@ find_program(RAD_PYTHON3 NAMES python3)
|
||||
if(RAD_PYTHON3)
|
||||
add_test(NAME rad_export_test COMMAND ${RAD_PYTHON3} ${CMAKE_CURRENT_SOURCE_DIR}/rad_export_test.py)
|
||||
set_tests_properties(rad_export_test PROPERTIES LABELS "unit;fast" TIMEOUT ${RAD_TEST_TIMEOUT})
|
||||
add_test(NAME spark25_validation_test
|
||||
COMMAND ${RAD_PYTHON3} ${CMAKE_CURRENT_SOURCE_DIR}/spark25_validation_test.py)
|
||||
set_tests_properties(spark25_validation_test PROPERTIES LABELS "unit;fast" TIMEOUT ${RAD_TEST_TIMEOUT})
|
||||
add_test(NAME dspark_qos_regression_test
|
||||
COMMAND ${RAD_PYTHON3} ${CMAKE_CURRENT_SOURCE_DIR}/dspark_qos_regression_test.py)
|
||||
set_tests_properties(dspark_qos_regression_test PROPERTIES LABELS "unit;fast" TIMEOUT ${RAD_TEST_TIMEOUT})
|
||||
endif()
|
||||
|
||||
# ================================================================== the shipped plugins, out of tree
|
||||
|
||||
Reference in new issue
Block a user