[libc-commits] [libc] [libc][libm][GPU] Add support for fast vendor math (PR #66439)
Matt Arsenault via libc-commits
libc-commits at lists.llvm.org
Thu Sep 14 23:19:37 PDT 2023
================
@@ -117,6 +117,17 @@ add_entrypoint_object(
-O2
)
+add_entrypoint_object(
+ fast_cosf
+ SRCS
+ cosf.cpp
+ HDRS
+ ../../cosf.h
+ COMPILE_OPTIONS
+ ${bitcode_link_flags}
+ -D__CLANG_GPU_APPROX_TRANSCENDENTALS__ -O3 -ffast-math
----------------
arsenm wrote:
I think for something like this you should only enable approximate functions, or whatever minimum set of flags you need. You don't need to break inf/nan handling for most of these (plus the cases that require explicit handling are optimizable out once we propagate nofpclass by default)
https://github.com/llvm/llvm-project/pull/66439
More information about the libc-commits
mailing list