Commit 2cec52aa authored by botbw's avatar botbw Committed by LeiWang1999
Browse files

[Bugfix] add a patch to fix T.abs on float16 (#325)

* [bug] fix T.abs on float16

* [lint] lint
parent c0378aa9
......@@ -23,6 +23,13 @@ using int4_t = int4;
#define TL_DEVICE __forceinline__ __device__
#define TL_DEVICE_NOINLINE __noinline__ __device__
#define TL_PATCH
// abs function for bfloat_t and half_t since there is no implicit convertion
// method
TL_PATCH TL_DEVICE half_t __habs(const half_t x) {
return half_t(__habs(x.to_half()));
}
// Pack two half values.
TL_DEVICE unsigned __pack_half2(const half x, const half y) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment