[Libclc-dev] NVPTX-backend and libclc arithmetic functions
Jeroen Ketema
j.ketema at imperial.ac.uk
Tue Dec 16 03:59:10 PST 2014
Hi Christoph,
> In libclc many arithmetic functions like pow, rsqrt are lowered to
> corresponding llvm intrinsics. These are not handled correctly by the
> NVPTX backend.
The standard llvm intrinsics do not guarantee the precision required by
the OpenCL standard, so they should be replaced eventually. Or, only
used for the native_ functions from the OpenCL library; in which case
the backend should support them.
> Where should this be fixed? NVPTX-Backend or libclc?
libclc and there are two possible solutions:
* Either completely hand-rolled versions are introduced in libclc, see
e.g. Aaron’s patch from yesterday.
* nvptx specific intrinsics should be used that do have the correct
precision (if such intrinsics exist)
Jeroen
> Or is this expected to work and I am just not using it correctly?
>
> Christoph Gerum
>
> _______________________________________________
> Libclc-dev mailing list
> Libclc-dev at pcc.me.uk
> http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev
More information about the Libclc-dev
mailing list