[LLVMdev] NVPTX questions
Justin Holewinski
justin.holewinski at gmail.com
Sun Jun 14 09:25:20 PDT 2015
On Thu, Jun 11, 2015 at 10:31 AM, Mueller-Roemer, Johannes Sebastian <
Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de> wrote:
> Hi,
>
>
>
> I started experimenting with the NVPTX backend and have been successful so
> far, however I ran into two issues:
>
>
>
> 1. How do I access createNVVMReflectPass properly? The header in
> which it is defined is not installed along with other headers when (using
> CMake, if that matters), so I am currently declaring it directly in my code.
>
Yes, that is an unfortunate part of the current implementation. I've been
thinking of how to address this better. For now, just declaring the init
function prototype in your source file is fine.
> 2. When using mathematical functions like powf or sqrtf, I need to
> use __nv_powf and __nv_sqrtf from libdevice. This works fine but unlike
> powf, expressions like powf(x, 0.5f), where .5f is constant are not
> optimized/strength reduced.
> Is there any way to call powf, then optimize then rename these calls later
> on (and probably optimize again…)? Or is there a better approach?
>
How are you linking with libdevice? The recommended way is to link the IR
before calling any optimization passes to allow the optimizers to see the
implementation. Or are you referring to LLVM not understanding that
__nv_powf is a "built-in" function like libm's powf?
>
>
> Regards
>
> Johannes
>
>
>
> --
>
> Johannes S. Mueller-Roemer, MSc
>
> Wiss. Mitarbeiter - Interactive Engineering Technologies (IET)
>
>
>
> Fraunhofer-Institut für Graphische Datenverarbeitung IGD
>
> Fraunhoferstr. 5 | 64283 Darmstadt | Germany
>
> Tel +49 6151 155-606 | Fax +49 6151 155-139
>
> johannes.mueller-roemer at igd.fraunhofer.de | www.igd.fraunhofer.de
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
--
Thanks,
Justin Holewinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150614/77d93e3b/attachment.html>
More information about the llvm-dev
mailing list