Back to home page

Project CMSSW displayed by LXR

 
 

    


Warning, /HeterogeneousTest/AlpakaKernel/README.md is written in an unsupported language. File is not indexed.

0001 # Introduction
0002 
0003 The packages `HeterogeneousTest/AlpakaDevice`, `HeterogeneousTest/AlpakaKernel`,
0004 `HeterogeneousTest/AlpakaWrapper` and `HeterogeneousTest/AlpakaOpaque` implement a set of libraries,
0005 plugins and tests to exercise the build rules for Alpaka.
0006 In particular, these tests show what is supported and what are the limitations implementing
0007 Alpaka-based libraries, and using them from multiple plugins.
0008 
0009 
0010 # `HeterogeneousTest/AlpakaKernel`
0011 
0012 The package `HeterogeneousTest/AlpakaKernel` implements a library that defines and exports Alpaka
0013 kernels that call the device functions defined in the `HeterogeneousTest/AlpakaDevice` library:
0014 ```c++
0015 namespace ALPAKA_ACCELERATOR_NAMESPACE::test {
0016 
0017   struct KernelAddVectorsF {
0018     ALPAKA_FN_ACC void operator()(Acc1D const& acc, ...) const { ... }
0019   };
0020 
0021   struct KernelAddVectorsD {
0022     ALPAKA_FN_ACC void operator()(Acc1D const& acc, ...) const { ... }
0023   };
0024 
0025 }  // namespace ALPAKA_ACCELERATOR_NAMESPACE::test
0026 ```
0027 
0028 The `plugins` directory implements the `AlpakaTestKernelAdditionModule` `EDAnalyzer` that launches
0029 the Alpaka kernels defined in this library. As a byproduct this plugin also shows how to split an
0030 `EDAnalyzer` or other framework plugin into a host-only part (in a `.cc` file) and a device part (in
0031 a `.dev.cc` file).
0032 
0033 The `test` directory implements the `testAlpakaKernelAddition` test binary that launches the Alpaka
0034 kernel defined in this library.
0035 It also contains the `testAlpakaTestKernelAdditionModule.py` python configuration to exercise the
0036 `AlpakaTestKernelAdditionModule` module.
0037 
0038 
0039 # Other packages
0040 
0041 For various ways in which this library and plugin can be tested, see also the other
0042 `HeterogeneousTest/Alpaka...` packages:
0043   - [`HeterogeneousTest/AlpakaDevice/README.md`](../../HeterogeneousTest/AlpakaDevice/README.md)
0044   - [`HeterogeneousTest/AlpakaWrapper/README.md`](../../HeterogeneousTest/AlpakaWrapper/README.md)
0045   - [`HeterogeneousTest/AlpakaOpaque/README.md`](../../HeterogeneousTest/AlpakaOpaque/README.md)
0046 
0047 
0048 # Combining plugins
0049 
0050 `HeterogeneousTest/AlpakaOpaque/test` contains the `testAlpakaTestAdditionModules.py` python
0051 configuration that exercise all four plugins in a single application.