[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:51:19 PDT 2023
arsenm added inline comments.
================
Comment at: libc/src/math/gpu/vendor/amdgpu/amdgpu.h:53
+LIBC_INLINE void sincosf(float x, float *sinptr, float *cosptr) {
+ *sinptr = __ocml_sincos_f32(x, cosptr);
+}
----------------
I thought I had already added an ocml_sincos_stret but I guess not, should switch to that whenever that gets added
================
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 *);
----------------
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
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