fix: add correct static_cast for fputil::getpload for bfloat16
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
This commit is contained in:
parent
c8f43800a5
commit
8ea9354557
@ -354,7 +354,10 @@ LIBC_INLINE cpp::enable_if_t<cpp::is_floating_point_v<T>, T> getpayload(T x) {
|
|||||||
|
|
||||||
return static_cast<T>(payload_dfloat);
|
return static_cast<T>(payload_dfloat);
|
||||||
} else {
|
} else {
|
||||||
return static_cast<T>(payload);
|
if constexpr (cpp::is_same_v<T, bfloat16>)
|
||||||
|
return T(static_cast<int>(payload));
|
||||||
|
else
|
||||||
|
return static_cast<T>(payload);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user