[code-reflection] RFR: PTX backend implementation for HAT
Paul Sandoz
psandoz at openjdk.org
Tue Jul 23 15:34:48 UTC 2024
On Fri, 19 Jul 2024 19:36:16 GMT, Ruby Chen <duke at openjdk.org> wrote:
> Implemented a PTX backend for HAT kernel execution; PTX will run on machines with supporting Nvidia GPUs. Currently works for Squares and Mandel kernel examples.
>
> Also starting to implement a BlackScholes kernel for HAT.
I did not realize PTX has no instruction support for exp/log, but it makes sense. High-level compilers generate/reuse code specific to the platform. That makes the Black Scholes example more interesting :-)
As we discussed off-line perhaps the easiest way for now is to compile some CUDA code with exp/log calls to PTX and extract the generated exp/log code into text blocks that get embedded in the generated PTX. An alternative is to write the code in Java as special kernels and compile them.
This may be different if we targeted NVVM IR, perhaps the compiler toolchain supports such functions?
-------------
PR Review: https://git.openjdk.org/babylon/pull/188#pullrequestreview-2194339990
More information about the babylon-dev
mailing list