[libc-commits] [PATCH] D153395: Populating 'libmgpu.a' for math on the GPU

Matt Arsenault via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Jun 21 15:13:09 PDT 2023


arsenm added inline comments.


================
Comment at: libc/src/math/gpu/sqrt.cpp:14
 
-extern "C" {
-double __nv_sin(double);
-}
+LLVM_LIBC_FUNCTION(double, sqrt, (double x)) { return __builtin_sqrt(x); }
 
----------------
AntonRydahl wrote:
> AntonRydahl wrote:
> > arsenm wrote:
> > > arsenm wrote:
> > > > jhuber6 wrote:
> > > > > According to @arsenm these aren't correct now so we should proabably use the vendor versions for now.
> > > > The f64 sqrt patch is basically postable now (the basic correct path is done, fast math 1 / sqrt(x)) folds still need to be done)
> > > D153472
> > Should I also add the vendor versions of the trigonometric functions such as sinh and tan?
> Should I just add D153472 as a parent of this patch?
Sure why not, they're there. Depends how much you want to put in one patch.

Nobody's reliant on this code right now so I don't think it matter which lands first


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153395



More information about the libc-commits mailing list