Skip to content

Commit c6c08b2

Browse files
rjodinchryuxuanchen1997
authored andcommitted
libclc: add half version of 'sign' (#99841)
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251456
1 parent 27ec0f1 commit c6c08b2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

libclc/generic/lib/common/sign.cl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,12 @@ SIGN(double, )
2626
_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, sign, double)
2727

2828
#endif
29+
30+
#ifdef cl_khr_fp16
31+
32+
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
33+
34+
SIGN(half,)
35+
_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, half, sign, half)
36+
37+
#endif

0 commit comments

Comments
 (0)