Difference between revisions of "Extending NaplesPU for OpenCL support"

From NaplesPU Documentation
Jump to: navigation, search
Line 1: Line 1:
 
This section describes how the OpenCL C kernel compilation is supported in the nu+ toolchain.
 
This section describes how the OpenCL C kernel compilation is supported in the nu+ toolchain.
Since Clang natively supports the IR generation of OpenCL C kernels, our work focused on the adaption of the generated code on the nu+ core. As the nu+ start routine requires to jump to the ''main'' label after having initialized all necessary resources, it is necessary to build a custom optimization pass, to auto-generate the main-function and to define the calling frame to the kernel function.
+
Since Clang natively supports the IR generation of OpenCL C kernels, our work focused on the adaption of the generated code on the nu+ core. As the nu+ start routine requires to jump to the ''main'' label after having initialized all necessary resources, it is necessary to build a custom optimization pass, to auto-generate the main-function and to define the calling frame to the kernel function. Also OpenCL requires the implementation of custom libraries, extending the ''libc'' set.

Revision as of 15:47, 14 May 2019

This section describes how the OpenCL C kernel compilation is supported in the nu+ toolchain. Since Clang natively supports the IR generation of OpenCL C kernels, our work focused on the adaption of the generated code on the nu+ core. As the nu+ start routine requires to jump to the main label after having initialized all necessary resources, it is necessary to build a custom optimization pass, to auto-generate the main-function and to define the calling frame to the kernel function. Also OpenCL requires the implementation of custom libraries, extending the libc set.