[libc-commits] [PATCH] D152575: Added modf for NVPTX and AMDGPU targets to implement 'libmgpu.a' for math on the GPU
Jon Chesterfield via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Jun 14 11:39:45 PDT 2023
JonChesterfield added a comment.
The default is a good question. Libm isn't _that_ big a library. Getting the functions right is difficult but relatively well established by this point, they've been implemented a lot of times. Getting them fast and right is probably always a vendor specific thing, you need to know the ISA you're targeting and put more effort in.
I think we could reasonably aspire to have something slow and wrong for every function implemented in tree. I'm personally ok with return 0 levels of wrong in the first instance but others may disagree.
If we're aiming at slow+wrong+complete in the first instance, the default can reasonably be to use libc unless specified otherwise. Vendors will always want to use their own implementation and that's fine, they can use the same hook provided for users who want to bring their own.
Fun question, do we want to aspire to finer grained replacement than wholesale? I claim _no_ on the grounds that we won't test every permutation that results and we shouldn't ship something untested.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152575/new/
https://reviews.llvm.org/D152575
More information about the libc-commits
mailing list