From eefa171318b79cbe2e78514d4cce5cd0fe919d0c Mon Sep 17 00:00:00 2001 From: Josh Fromm Date: Fri, 21 Feb 2025 14:47:30 -0800 Subject: [PATCH] [EVT] Fix Row/Col broadcast with array arguments (#2120) * Use constexpr in if to prevent invalid comparison. * Move constexpr check into else scope. --- .../fusion/sm90_visitor_load_tma_warpspecialized.hpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/cutlass/epilogue/fusion/sm90_visitor_load_tma_warpspecialized.hpp b/include/cutlass/epilogue/fusion/sm90_visitor_load_tma_warpspecialized.hpp index 2a70c848..cd8ff0fa 100644 --- a/include/cutlass/epilogue/fusion/sm90_visitor_load_tma_warpspecialized.hpp +++ b/include/cutlass/epilogue/fusion/sm90_visitor_load_tma_warpspecialized.hpp @@ -1042,8 +1042,10 @@ struct Sm90RowBroadcast { is_zero_ = params.null_default == ElementCompute(0); } // Dynamic non-batched scalar broadcast - else if (IsDynamicBroadcast && stride_N == bool(0) && stride_L == repeat_like(stride_L, 0) && !IsArrayOfPointers) { - is_zero_ = params.ptr_row[0] == ElementInput(0); + else if (IsDynamicBroadcast && stride_N == bool(0) && stride_L == repeat_like(stride_L, 0)) { + if constexpr (!IsArrayOfPointers) { + is_zero_ = params.ptr_row[0] == ElementInput(0); + } } } @@ -1319,8 +1321,10 @@ struct Sm90ColBroadcast { is_zero_ = params.null_default == ElementCompute(0); } // Dynamic non-batched scalar broadcast - else if (IsDynamicBroadcast && stride_M == bool(0) && stride_L == repeat_like(stride_L, 0) && !IsArrayOfPointers) { - is_zero_ = params.ptr_col[0] == ElementInput(0); + else if (IsDynamicBroadcast && stride_M == bool(0) && stride_L == repeat_like(stride_L, 0)) { + if constexpr (!IsArrayOfPointers) { + is_zero_ = params.ptr_col[0] == ElementInput(0); + } } }