[llvm-dev] AMDGPU and math functions

Sumner, Brian via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 13 13:10:46 PST 2019

There certainly is support; after all AMD supports both OpenCL and HIP (a dialect of C++ very close to cuda).

AMD device libraries (in bitcode form) are installed when ROCm ( https://rocm.github.io/ ) is installed.

AMD device libraries are mostly written in (OpenCL) C and open source at https://github.com/RadeonOpenCompute/ROCm-Device-Libs .  They are configured by linking in a number tiny libraries that define global constants; these allow unwanted code including branches to be eliminated during post-bitcode-link optimization.


-----Original Message-----
From: Nicolai Hähnle <nhaehnle at gmail.com> 
Sent: Wednesday, November 13, 2019 12:57 PM
To: Frank Winter <fwinter at jlab.org>; Sumner, Brian <Brian.Sumner at amd.com>
Cc: LLVM Dev <llvm-dev at lists.llvm.org>
Subject: Re: [llvm-dev] AMDGPU and math functions

[CAUTION: External Email]

Brian, this seems like a good question for you.

On Wed, Nov 13, 2019 at 9:51 PM Frank Winter via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> Does anyone know whether there is yet support for math functions in 
> AMD GPU kernels?
> In the NVIDIA world they provide the libdevice IR module which can be 
> linked to an existing module containing the kernel. In other words 
> they provide all math functions on IR level. NVIDIA even claims that 
> libdevice is actually device specific (compute capability).
> I was wondering how that is done on the AMD side of things.
> Thanks,
> Frank
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

Lerne, wie die Welt wirklich ist,
aber vergiss niemals, wie sie sein sollte.

More information about the llvm-dev mailing list