Skip to content

Commit

Permalink
Fix std::abs overloading for bfloat16_t (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
chhwang authored Nov 13, 2023
1 parent 5ae8133 commit 1ab6cc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/cutlass/bfloat16.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ bool signbit(cutlass::bfloat16_t const& h) {

CUTLASS_HOST_DEVICE
cutlass::bfloat16_t abs(cutlass::bfloat16_t const& h) {
return cutlass::bfloat16_t::bitcast(h.raw() & 0x7fffffff);
return cutlass::bfloat16_t::bitcast(h.raw() & 0x7fff);
}

CUTLASS_HOST_DEVICE
Expand Down

0 comments on commit 1ab6cc7

Please sign in to comment.