From 85c6fd56c54bdf99ab1b8dfe7ebf058a1f8a0566 Mon Sep 17 00:00:00 2001 From: rahjain-amd Date: Mon, 7 Jul 2025 14:46:22 +0530 Subject: [PATCH] Fixing Debug build (#2404) Failed to build `tile_example_fmha_bwd` due to below error ``` /home/rahjain/src/composable_kernel/example/ck_tile/01_fmha/fmha_bwd.cpp:358:30: error: comparison of integers of different signs: 'size_type' (aka 'unsigned long') and 'ck_tile::index_t' (aka 'int') [-Werror,-Wsign-compare] 358 | assert(slopes.size() == nhead); | ~~~~~~~~~~~~~ ^ ~~~~~ /usr/include/assert.h:103:27: note: expanded from macro 'assert' 103 | (static_cast (expr) \ | ^~~~ /home/rahjain/src/composable_kernel/example/ck_tile/01_fmha/fmha_bwd.cpp:989:16: note: in instantiation of function template specialization 'run' requested here 989 | return run(arg_parser) ? 0 : -2; | ^ /home/rahjain/src/composable_kernel/example/ck_tile/01_fmha/fmha_bwd.cpp:358:30: error: comparison of integers of different signs: 'size_type' (aka 'unsigned long') and 'ck_tile::index_t' (aka 'int') [-Werror,-Wsign-compare] 358 | assert(slopes.size() == nhead); | ~~~~~~~~~~~~~ ^ ~~~~~ /usr/include/assert.h:103:27: note: expanded from macro 'assert' 103 | (static_cast (expr) \ | ^~~~ /home/rahjain/src/composable_kernel/example/ck_tile/01_fmha/fmha_bwd.cpp:993:16: note: in instantiation of function template specialization 'run' requested here 993 | return run(arg_parser) ? 0 : -2; | ^ 2 errors generated when compiling for gfx942. ``` Fixed with proper cast [ROCm/composable_kernel commit: ad593c286f7deda9cc8da7db660f8eddd6690151] --- example/ck_tile/01_fmha/fmha_bwd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/ck_tile/01_fmha/fmha_bwd.cpp b/example/ck_tile/01_fmha/fmha_bwd.cpp index 3b9cf09eb2..b6de5ea621 100644 --- a/example/ck_tile/01_fmha/fmha_bwd.cpp +++ b/example/ck_tile/01_fmha/fmha_bwd.cpp @@ -355,7 +355,7 @@ bool run(const ck_tile::ArgParser& arg_parser) if(bias.type == bias_enum::alibi) { auto slopes = ck_tile::get_alibi_slopes(nhead); - assert(slopes.size() == nhead); + assert(slopes.size() == static_cast(nhead)); if(bias.rank_info == 0) { // alibi in 1*h