Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
tilelang
Commits
2cec52aa
Commit
2cec52aa
authored
Apr 04, 2025
by
botbw
Committed by
LeiWang1999
Apr 04, 2025
Browse files
[Bugfix] add a patch to fix T.abs on float16 (#325)
* [bug] fix T.abs on float16 * [lint] lint
parent
c0378aa9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
src/tl_templates/cuda/common.h
src/tl_templates/cuda/common.h
+7
-0
No files found.
src/tl_templates/cuda/common.h
View file @
2cec52aa
...
@@ -23,6 +23,13 @@ using int4_t = int4;
...
@@ -23,6 +23,13 @@ using int4_t = int4;
#define TL_DEVICE __forceinline__ __device__
#define TL_DEVICE __forceinline__ __device__
#define TL_DEVICE_NOINLINE __noinline__ __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.
// Pack two half values.
TL_DEVICE
unsigned
__pack_half2
(
const
half
x
,
const
half
y
)
{
TL_DEVICE
unsigned
__pack_half2
(
const
half
x
,
const
half
y
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment