Change the position of minus sign in line1549 array.h (#1091)

when I use cutlass::epilogue:🧵: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
This commit is contained in:
xuhaoran 2023-09-27 05:26:39 +08:00 committed by GitHub
parent 14f69bddc8
commit 67ae8e0603
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1559,8 +1559,8 @@ struct negate<Array<half_t, N>> {
} }
if constexpr (N % 2) { if constexpr (N % 2) {
half_t x = lhs[N - 1]; half_t x = -lhs[N - 1];
__half lhs_val = -reinterpret_cast<__half const &>(x); __half lhs_val = reinterpret_cast<__half const &>(x);
result[N - 1] = reinterpret_cast<half_t const &>(lhs_val); result[N - 1] = reinterpret_cast<half_t const &>(lhs_val);
} }