Skip to content

Commit

Permalink
Change the position of minus sign in line1549 array.h (#1091)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ptxu78 authored and ttl10101 committed Feb 7, 2024
1 parent 8c600c6 commit 7d5e338
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/cutlass/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -1559,8 +1559,8 @@ struct negate<Array<half_t, N>> {
}

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<half_t const &>(lhs_val);
}

Expand Down

0 comments on commit 7d5e338

Please sign in to comment.