[clang] 319444f - [HIP] add fmax/fmin for fp16

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 28 10:38:30 PDT 2022


Author: Yaxun (Sam) Liu
Date: 2022-10-28T13:38:12-04:00
New Revision: 319444fcf586004c3ed851e20c9df8ca2888e6d5

URL: https://github.com/llvm/llvm-project/commit/319444fcf586004c3ed851e20c9df8ca2888e6d5
DIFF: https://github.com/llvm/llvm-project/commit/319444fcf586004c3ed851e20c9df8ca2888e6d5.diff

LOG: [HIP] add fmax/fmin for fp16

Reviewed by: Artem Belevich

Differential Revision: https://reviews.llvm.org/D136859

Added: 
    

Modified: 
    clang/lib/Headers/__clang_hip_libdevice_declares.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/Headers/__clang_hip_libdevice_declares.h b/clang/lib/Headers/__clang_hip_libdevice_declares.h
index 8be848ba2aa36..79aba9db0e7fd 100644
--- a/clang/lib/Headers/__clang_hip_libdevice_declares.h
+++ b/clang/lib/Headers/__clang_hip_libdevice_declares.h
@@ -294,6 +294,8 @@ __device__ __attribute__((pure)) _Float16 __ocml_exp2_f16(_Float16);
 __device__ __attribute__((const)) _Float16 __ocml_floor_f16(_Float16);
 __device__ __attribute__((const)) _Float16 __ocml_fma_f16(_Float16, _Float16,
                                                           _Float16);
+__device__ __attribute__((const)) _Float16 __ocml_fmax_f16(_Float16, _Float16);
+__device__ __attribute__((const)) _Float16 __ocml_fmin_f16(_Float16, _Float16);
 __device__ __attribute__((const)) _Float16 __ocml_fabs_f16(_Float16);
 __device__ __attribute__((const)) int __ocml_isinf_f16(_Float16);
 __device__ __attribute__((const)) int __ocml_isnan_f16(_Float16);


        


More information about the cfe-commits mailing list