[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
Mon Jul 31 10:57:16 PDT 2023
arsenm added inline comments.
================
Comment at: libc/src/math/gpu/vendor/amdgpu/declarations.h:45
double __ocml_sin_f64(double);
+float __ocml_sincos_f32(float, float *);
+double __ocml_sincos_f64(double, double *);
----------------
jhuber6 wrote:
> arsenm wrote:
> > This won't actually work, the underlying pointer uses a private pointer. you can't simply declare as flat and call it. Probably should just define the struct return variant and use that. it's a lot less ugly than dealing with the pointer wrapping
> Variables declared on the stack should be private as far as I know. I figured the semantics are the same as the regular `sincos` where we just write to whatever pointer we're given. If it's a stack pointer it'll be private, if it's a global it won't be and it'll be up to the user to not have that conlift.
The ocml functions aren’t magic. This is declared with the wrong type
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