mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 07:48:45 +00:00
cmake: test targets prefill_decode_golden (CUDA) and hip_prefill_decode_golden (HIP)
The decode-digest test of the previous commit, built with strata_mmq's own include directories, compile definitions and compile options (generator expressions on strata_mmq's properties), so the decode compiles as the library compiles it; on HIP the source is HIP with the compat include directory, as moe_fused_iq.cu. ctest entries check tests/cuda/prefill_decode_golden.txt (exit 77 without a card). CUDA: inside STRATA_BUILD_TESTS; HIP: beside hip_prefill_fused_iq.
This commit is contained in:
1 parent
57c90a6869
commit
6b32d91c5c
2 files changed
+20
No files matched your search
@@ -259,6 +259,15 @@ macro(strata_cuda_mmq)
|
||||
target_compile_definitions(strata_prefill PUBLIC STRATA_PREFILL_WS=1)
|
||||
endif()
|
||||
if(STRATA_BUILD_TESTS)
|
||||
# the fused prompt kernels' weight decode (moe_fused_iq.cu's load_unit / convert, compiled as the library compiles them) against
|
||||
# stored digests: the same file on CUDA and HIP (exit 77 without a card)
|
||||
add_executable(prefill_decode_golden tests/cuda/prefill_decode_golden.cu)
|
||||
target_include_directories(prefill_decode_golden PRIVATE $<TARGET_PROPERTY:strata_mmq,INCLUDE_DIRECTORIES>)
|
||||
target_compile_definitions(prefill_decode_golden PRIVATE $<TARGET_PROPERTY:strata_mmq,COMPILE_DEFINITIONS>)
|
||||
target_compile_options(prefill_decode_golden PRIVATE $<TARGET_PROPERTY:strata_mmq,COMPILE_OPTIONS>)
|
||||
target_link_libraries(prefill_decode_golden PRIVATE ggml-base ${_strata_gpu_runtime_target})
|
||||
add_test(NAME prefill_decode_golden COMMAND prefill_decode_golden ${CMAKE_CURRENT_SOURCE_DIR}/tests/cuda/prefill_decode_golden.txt)
|
||||
set_tests_properties(prefill_decode_golden PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 120)
|
||||
# #136: the fused int8 experts against a double-precision reference and the MMQ path (exit 77 below sm_80)
|
||||
add_executable(prefill_fused_moe_test tests/cuda/prefill_fused_moe_test.cpp)
|
||||
target_link_libraries(prefill_fused_moe_test PRIVATE strata_mmq ggml-base ${_strata_gpu_runtime_target})
|
||||
|
||||
@@ -103,6 +103,17 @@ macro(strata_hip_mmq)
|
||||
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)
|
||||
# the fused prompt kernels' weight decode against the digests CUDA wrote (tests/cuda/prefill_decode_golden.cu): the same file on every vendor
|
||||
# (moe_fused_iq.cu's decode compiled as strata_mmq compiles it: its include directories, definitions and options; exit 77 without a card)
|
||||
set_source_files_properties(tests/cuda/prefill_decode_golden.cu PROPERTIES LANGUAGE HIP INCLUDE_DIRECTORIES "${STRATA_HIP_COMPAT_INCLUDE_DIR}")
|
||||
add_executable(hip_prefill_decode_golden tests/cuda/prefill_decode_golden.cu)
|
||||
target_include_directories(hip_prefill_decode_golden PRIVATE $<TARGET_PROPERTY:strata_mmq,INCLUDE_DIRECTORIES>)
|
||||
target_compile_definitions(hip_prefill_decode_golden PRIVATE $<TARGET_PROPERTY:strata_mmq,COMPILE_DEFINITIONS>)
|
||||
target_compile_options(hip_prefill_decode_golden PRIVATE $<TARGET_PROPERTY:strata_mmq,COMPILE_OPTIONS>)
|
||||
target_link_libraries(hip_prefill_decode_golden PRIVATE ggml-base strata_hip_runtime)
|
||||
add_test(NAME hip_prefill_decode_golden COMMAND hip_prefill_decode_golden ${CMAKE_CURRENT_SOURCE_DIR}/tests/cuda/prefill_decode_golden.txt)
|
||||
set_tests_properties(hip_prefill_decode_golden PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 120)
|
||||
list(APPEND _strata_hip_tests hip_prefill_decode_golden)
|
||||
|
||||
# Numerical diagnostic: synthetic layouts by default, optional first-expert IQ3_XXS/IQ4_NL check with a pack.
|
||||
add_executable(hip_prefill_mmq_parity tests/hip/prefill_mmq_parity.cpp)
|
||||
|
||||
Reference in new issue
Block a user