From 1ab6cc7b6898cd2d5e220290281af11af9967d2d Mon Sep 17 00:00:00 2001 From: Changho Hwang Date: Tue, 14 Nov 2023 02:29:45 +0800 Subject: [PATCH] Fix `std::abs` overloading for `bfloat16_t` (#1179) --- include/cutlass/bfloat16.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cutlass/bfloat16.h b/include/cutlass/bfloat16.h index 0c3397d2..9ddd96f6 100644 --- a/include/cutlass/bfloat16.h +++ b/include/cutlass/bfloat16.h @@ -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