[Openmp-dev] Math functions when offloading to CUDA devices
James Price via Openmp-dev
openmp-dev at lists.llvm.org
Tue Mar 19 04:50:59 PDT 2019
Hi,
One of the issues we frequently hit when using the Clang OpenMP implementation on NVIDIA GPUs is the lack of support for many common math functions (e.g. cos/sin). Trying to use them produces errors of the form:
fatal error: error in backend: Cannot select: 0x47b33a0: f64 = fsin 0x47b2f90
Translating math functions in target regions is listed as a feature that isn’t supported yet, but is this something that is expected to be implemented soon? Failing that, if someone can describe the desired approach to implement this I might be able to take a stab at getting some initial patches together (depending on the complexity).
Some functions such as sqrt work fine, but I assume this is because they map directly to NVVM intrinsics.
Cheers,
James
More information about the Openmp-dev
mailing list