[libc-commits] [PATCH] D152486: [libc] Begin implementing a 'libmgpu.a' for math on the GPU

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Jun 14 07:42:31 PDT 2023


lntue added inline comments.


================
Comment at: libc/config/gpu/entrypoints.txt:84-90
+set(TARGET_LIBM_ENTRYPOINTS
+    # math.h entrypoints
+    libc.src.math.sin
+    libc.src.math.round
+    libc.src.math.roundf
+    libc.src.math.roundl
+)
----------------
jhuber6 wrote:
> lntue wrote:
> > Can you also update the math implementation status table at https://github.com/llvm/llvm-project/blob/main/libc/docs/math/index.rst ?
> > Thanks,
> I was thinking of doing this in a separate patch, and we may want to have a different category for the GPU that indicates if it's implemented natively or if we rely on the vendor. Then we'd have some documentation about the considerations of GPU math, like reduced precision, ULP modes, linking to vendor documentation for those functions, etc.
A separate patch is fine for me.  I plan to use this table for enabled entrypoints.  For extra information about how they are implemented and what are the options / tradeoffs, you can put them under https://libc.llvm.org/math/#algorithms-implementation-details , or add a separate page and add a link to it in that section.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152486/new/

https://reviews.llvm.org/D152486



More information about the libc-commits mailing list