[EVT] Fix Row/Col broadcast with array arguments
#2033 added the ability for row/col broadcast nodes to accept ptr array arguments, however, during some followup refactoring it was broken. Specifically, there is an invalid type comparison that was added. This small PR fixes the issue by using a constexpr if to avoid the comparison if ptrarray is being used.
@ANIKET-SHIVAM can you take a look at this small change?
@jwfromm Is the invalid type comparison happening bcoz this line right now is not behind constexpr:
is_zero_ = params.ptr_row[0] == ElementInput(0);
For Grouped Gemm case, there is a type mismatch, where ptr_row[0] is of ElementInput* type instead and hence the invalid type conversion issue. Is that correct?
Could you try moving constexpr check inside instead like this and see if that works fine for you:
else if (IsDynamicBroadcast && stride_N == bool(0) && stride_L == repeat_like(stride_L, 0)) {
if constexpr (not IsArrayOfPointers) {
is_zero_ = params.ptr_row[0] == ElementInput(0);
}
@ANIKET-SHIVAM Yeah that would also work, as long as we dont compare ptr_row[0] to ElementInput(0) as they are different types it will be fine. If you prefer having the constexpr check inside the else if we can do that instead.
yes, please. thanks.
@ANIKET-SHIVAM Done, I also confirmed this still works as expected.