This commit introduces the experimental/ folder for kernels. This folder will contain alternative, experimental implementations of our kernels. These experimental implementations are using the kernel catalog feature from #456.
While being experimental, the kernels are not tightly coupled to DAPHNE, e.g, they are not used per default without specifying the required kernel hint to call the kernel and they are not tested as part of our test suite or built when compiling libAllKernels.so. Once an experimental kernel is to be moved to our default kernels, passing all the tests is required.
Making kernels executable when running DAPHNE while not yet being part of our kernel library helps with development on improving kernels.
Dependencies can be used while being experimental without having to worry about making them a requirement for all DAPHNE users
Prototyping and development speed is increased, as only the kernel has to be recompiled, this is drastically faster than having to compile the libAllKernels.so each time
Provides a playing ground for developers to try out alternative implementations
Makes it easy to benchmark and compare different implementations of the same kernel by using different kernel hints
Non-intrusive way to work on DAPHNE kernels without affecting other developers, while also giving them the possibility to use them or to contribute
The gemv/ folder contains a simple example of such an alternative implementation. It is using AVX2 instructions to implement the SpMV kernel, making it unsuitable to be the default kernel implementation as it requires hardware-specific instructions. Additionally, it uses the LIKWID library to benchmark CPU performance counters (similar to PAPI). Without bringing these dependencies to all DAPHNE users, one can already test the kernel, compare it with the default, run benchmarks with DAPHNE using this kernel. This is a kernel I'm working on, though this is a very simple version which will be improved and eventually brought into libAllKernels.so.
Example DAPHNE script comparing the builtin kernel and the experimental kernel
As a kernel extension needs more than one file, *.cpp, *.json, and Makefile (or similar), I would suggest adding a folder in experimental/ as is done here in the example of experimental/gemv/.
The main purpose of this PR is visibility but feel free to add your opinion or suggestions.
For more information on kernel extensions see https://daphne-eu.github.io/daphne/Extensions/.
This commit introduces the
experimental/
folder for kernels. This folder will contain alternative, experimental implementations of our kernels. These experimental implementations are using the kernel catalog feature from #456.While being experimental, the kernels are not tightly coupled to DAPHNE, e.g, they are not used per default without specifying the required kernel hint to call the kernel and they are not tested as part of our test suite or built when compiling
libAllKernels.so
. Once an experimental kernel is to be moved to our default kernels, passing all the tests is required.Making kernels executable when running DAPHNE while not yet being part of our kernel library helps with development on improving kernels.
libAllKernels.so
each timeThe
gemv/
folder contains a simple example of such an alternative implementation. It is using AVX2 instructions to implement the SpMV kernel, making it unsuitable to be the default kernel implementation as it requires hardware-specific instructions. Additionally, it uses the LIKWID library to benchmark CPU performance counters (similar to PAPI). Without bringing these dependencies to all DAPHNE users, one can already test the kernel, compare it with the default, run benchmarks with DAPHNE using this kernel. This is a kernel I'm working on, though this is a very simple version which will be improved and eventually brought intolibAllKernels.so
.Example DAPHNE script comparing the builtin kernel and the experimental kernel
As a kernel extension needs more than one file,
*.cpp
,*.json
, andMakefile
(or similar), I would suggest adding a folder inexperimental/
as is done here in the example ofexperimental/gemv/
.The main purpose of this PR is visibility but feel free to add your opinion or suggestions. For more information on kernel extensions see https://daphne-eu.github.io/daphne/Extensions/.