From 7d5e338a380fbea7599b24914ac3422a142aaff3 Mon Sep 17 00:00:00 2001 From: xuhaoran <30339742+PityQAQ@users.noreply.github.com> Date: Wed, 27 Sep 2023 05:26:39 +0800 Subject: [PATCH] Change the position of minus sign in line1549 array.h (#1091) when I use cutlass::epilogue::thread::LinearCombinationSigmoid, I encounter the this error: cutlass/include/cutlass/array.h(1549): error: no operator "-" matches these operands Moving operator "-" from line 1549 to 1548 can solve this error --- include/cutlass/array.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/cutlass/array.h b/include/cutlass/array.h index e5132d9d..63ba8089 100644 --- a/include/cutlass/array.h +++ b/include/cutlass/array.h @@ -1559,8 +1559,8 @@ struct negate> { } if constexpr (N % 2) { - half_t x = lhs[N - 1]; - __half lhs_val = -reinterpret_cast<__half const &>(x); + half_t x = -lhs[N - 1]; + __half lhs_val = reinterpret_cast<__half const &>(x); result[N - 1] = reinterpret_cast(lhs_val); }