tests: hip_prefill_wmma_gemm_parity skips on a card without matrix cores instead of failing (#1148)

RDNA2 and older and gfx906 have no WMMA; the kernel declines every shape there. The test now exits 77, which CMake
reports as a skip.
This commit is contained in:
xjc10 authored and Niko1221 committed 2026-10-07 03:02:56 +02:00
1 parent e01cbf0d3e
commit 1db5d255ad
2 files changed
+9

No files matched your search

+1
View File
@@ -612,6 +612,7 @@ if(STRATA_ENABLE_CUDA OR STRATA_ENABLE_HIP)
target_include_directories(hip_prefill_wmma_gemm_parity PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/prefill")
target_link_libraries(hip_prefill_wmma_gemm_parity PRIVATE strata_prefill strata_hip_runtime)
add_test(NAME hip_prefill_wmma_gemm_parity COMMAND hip_prefill_wmma_gemm_parity)
set_tests_properties(hip_prefill_wmma_gemm_parity PROPERTIES SKIP_RETURN_CODE 77) # no matrix cores: skipped
list(APPEND _strata_hip_tests hip_prefill_wmma_gemm_parity)
# S (STRATA_HCD_EXACT): the exact HC down kernel against hipBLASLt solution 1176 / 1177 (needs STRATA_HIPBLASLT_TUNING; exit 77 else)
add_executable(hip_prefill_hcd_exact_parity tests/hip/prefill_hcd_exact_parity.cpp)
+8
View File
@@ -4,6 +4,7 @@
#include <hip/hip_fp16.h>
#include "wmma_gemm.h"
#include "strata/kernels/gfx_arch.hpp"
#include <algorithm>
#include <cmath>
@@ -269,6 +270,13 @@ int main() {
HIP_CHECK(hipGetDeviceProperties(&properties, device));
std::printf("Device %d: %s (arch %s, warpSize %d)\n",
device, properties.name, properties.gcnArchName, properties.warpSize);
// No matrix cores (RDNA2 and older, gfx906): the kernel declines every shape, so the suite has nothing to compare
// and reports that as a skip (exit 77, SKIP_RETURN_CODE in CMake), as hip_prompt_attn_wmma does, not a failure.
if (!strata::kernels::gfx_arch_is_gfx11_wmma(properties.gcnArchName)) {
std::printf("WMMA GEMM parity SKIPPED: %s has no WMMA matrix cores (the kernel declines every shape here)\n",
properties.gcnArchName);
return 77;
}
hipStream_t stream = nullptr;
HIP_CHECK(hipStreamCreateWithFlags(&stream, hipStreamNonBlocking));