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

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Jun 14 05:29:38 PDT 2023


jhuber6 marked 5 inline comments as done.
jhuber6 added a comment.

In D152486#4420656 <https://reviews.llvm.org/D152486#4420656>, @JonChesterfield wrote:

> The ISA one is special. There's a direct correspondence between compiler argument and which value is set, and only sorrow could come from splicing in an IR file with a different value to that passed to the compiler, and it'll kill off this massive ifdef mess immediately. Net reduction in code and fewer failure modes. Even faster compilation as we don't have to open a file

Killing off these globals is good in the long run, but I don't want it to be a blocker on this patch.



================
Comment at: libc/src/math/gpu/round.cpp:14
+
+LLVM_LIBC_FUNCTION(double, round, (double x)) { return __builtin_round(x); }
+
----------------
sivachandra wrote:
> Just saying: Normally, on IEEE-754 conformant HW, the instructions generated by builtins exhibit standard conformance. I am not sure if the GPU floating point instructions are IEEE-754 comformant. If not, we should may be say that on the math status pages somewhere. You can do this separately of course.
Yeah I'll want a documentation page for this once we get it in. Although I myself am not sure what these map to.


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