From 81924b601afad2e14f6a8e6c67965af8eb81fc87 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Wed, 4 Sep 2024 23:27:31 -0700 Subject: [PATCH] sgemm_impl: Rewrite tile param constraint --- tests/regression/sgemm_tcore/sgemm_impl.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/regression/sgemm_tcore/sgemm_impl.hpp b/tests/regression/sgemm_tcore/sgemm_impl.hpp index 6674edd0..933f835c 100644 --- a/tests/regression/sgemm_tcore/sgemm_impl.hpp +++ b/tests/regression/sgemm_tcore/sgemm_impl.hpp @@ -52,10 +52,10 @@ using float_type = float16_t; #define WMITER (WM / TCM) #define WNITER (WN / TCN) #define ELEM_PER_THREAD (WM * WN / NUM_THREADS) -// FIXME: NUM_THREADS and NUM_WARPS hardcoded -#if ((BM * BN / ELEM_PER_THREAD) > (CORES_PER_CLUSTER * 8 * 8)) -#error "threadblock size too big for cluster" -#endif + +static_assert(WMITER * WNITER * TCM * TCN * NUM_WARPS * CORES_PER_CLUSTER == + BM * BN, + "tile parameter condition not met (1 threadblock per cluster)"); // number of loop around the inner 0..TCK..BK loop to simulate perfect-DRAM // scenario