Fix std::abs overloading for bfloat16_t (#1179)

This commit is contained in:
Changho Hwang 2023-11-14 02:29:45 +08:00 committed by GitHub
parent 5ae8133cfa
commit 1ab6cc7b68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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