Skip to content

Demo_Step4

Polca Project edited this page Dec 16, 2016 · 6 revisions

Code Adaptation With POLCA

Transformation rules that can be applied on the mathematics (and hence on the dataflow graph) can be applied to the accordingly annotated code, too. By performing the equivalent adaptation steps on the C level, the code can be adapted to remove different bottlenecks, change the overall data flow behavior etc., for example in order to meet the specific layout and capabilities of a given target platform.

CPUs and GPUs

The most common types of processors nowadays are definitely CPUs and GPUs: almost all PCs nowadays make use of both processor types and almost all large scale HPC clusters sport a heterogeneous setup of multiple nodes of both types. What is essential for programming either is the ability to parallelise the code over multiple cores and even processors (cf. network model above). POLCA’s C-Source2Source compiler can identify the best algorithmic structures for different CPU and GPU using either of the following destination languages:

OpenMP

$ cd C_source2source
$ ./run_demo_opencl.sh

OpenCL

$ cd C_source2source
$ ./run_demo_omp.sh

FPGAs

With CλaSH, the POLCA toolbox provides a compiler that can convert POLCA annotated code into VHDL, as needed by most standard FPGAs. The following describes how CλaSH together with the H2H2C transformer can be used to generate VHDL from the nBody code above.

<walkthrough through clash for the nbody application>

Notably, POLCA cannot only generate VHDL code for FPGAs, but also address generate code for the MAXELER Systems (MaxJ language) and for POROTO

MAXELER Technologies Systems

MAXELER Technologies’ hardware is programmed using the MaxJ coding language. Using the MaxCompiler, this code can be converted into a CPU control code and the necessary binary code for the FPGAs. POLCA’s source-to-source transformation tool (see above),

$ cd C_source2source
$ ./run_demo_maxj.sh

POROTO

Similar to MAXELER’s MaxJ, with POROTO POLCA has advanced a tool to generate ROCCC compliant code. POROTO and ROCCC are specifically used for .

<walkthrough for steps to generate ROCCC>