|
1 | | -CMakeShell |
2 | | -========== |
| 1 | +SyCLDslash MiniApp |
| 2 | +======================== |
3 | 3 |
|
4 | | -This is a sample C++ project shell you can use for a CMake |
5 | | -project. It has |
| 4 | +This git repository contains the SyCLDslash |
| 5 | +package. SyCLDslash depends for its testing reference |
| 6 | +implementatins on QDP++. To build this code it is |
| 7 | +recommended to perform a recursive checkout of the |
| 8 | +repository: |
6 | 9 |
|
7 | | - * Googletest as a submodule in the ``extern`` directory |
8 | | - * A library and headers in the ``include`` directory |
9 | | - * A generated (configured) header |
10 | | - * A CMakeConfig.cmake.in file to allow you to export targets to other CMake Project |
11 | | - * Allow you to build in stall the file |
| 10 | +[`github.com;bjoo/SyCLDslashWorkspace.git`][https://github.com/bjoo/SyCLDslashWorkspace,git] |
| 11 | + |
| 12 | +which contains QDP++ and its dependencies |
| 13 | + |
| 14 | +In addition `SyCLDslash` depends on `googletest` |
| 15 | +and includes it as a sub-module. |
| 16 | + |
| 17 | +Checking out this repository |
| 18 | +============================ |
| 19 | + |
| 20 | +It is highly recommended that this library be checked out using |
| 21 | +the `--recursive` option to Git so that the `googletest` submodule |
| 22 | +is checked out. Alternatively consider checking out [`SyCLDslashWorkspace`][https://github.com/bjoo/SyCLDslashWorkspace,git]. |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | +Building |
| 27 | +======== |
| 28 | + |
| 29 | +This code builds with CMake. |
| 30 | + |
| 31 | +Useful CMake options are: |
| 32 | +* `-DQDPXX_DIR=<qdp-install-location>/share` - points to the `share` directory of an installation of QDP++ which contains a `FindQDPXX.cmake` file. |
| 33 | + |
| 34 | +* `-DMG_FORTRANLIKE_COMPLEX=ON` enables (RIRIRIRI) storage for complex numbers in |
| 35 | +vectors. Turning it to 'OFF' |
| 36 | + |
| 37 | +* `-DMG_USE_NEIGHBOR_TABLE=OFF` (if set to 'ON` would use a neighbour table taht is actualy a lookup |
| 38 | + table. Currently this is set to OFF as that option is not currently supported, neighbor indices are |
| 39 | +explicitly computed. |
| 40 | + |
| 41 | +* `-DMG_USE_LAYOUT_LEFT=OFF` ( if set to `ON` selects left index fastest indexing for View objects, if |
| 42 | + set to `OFF` uses right fastest indexing, following Kokkos. ) |
| 43 | + |
| 44 | + |
| 45 | +Running The Mini-App: |
| 46 | +===================== |
| 47 | + |
| 48 | +Once building is complete the executables will be in `build/build_sycl_dslash/tests` |
| 49 | +Two executables are of primary interest: `test_dslash_sycl` and `test_dslash_sycl_vperf`. |
| 50 | + |
| 51 | +The `test_dslash_sycl` app performs some unit testing of the dslash operator for a selection |
| 52 | +of vector lenghts. |
| 53 | + |
| 54 | +The performance test is `test_dslash_sycl_vperf` which will first apply a dslash for the |
| 55 | +purposes of JIT-compiling all the components, and then it will apply dslash again to time |
| 56 | +a single application. It will use this timing to choose a number of iterations commensurate |
| 57 | +to 5 seconds of runtime or minimally 1 iteration if it takes longer than 5 seconds. It will |
| 58 | +then perform 5 timing loops. |
| 59 | + |
| 60 | +Known issues |
| 61 | +============= |
| 62 | + - The code has been tested only with the Intel LLVM/SyCL compiler which is in development, |
| 63 | +on a system running an OpenCL runtime. It occasionally crashes OpenCL with the error message: |
| 64 | + |
| 65 | +```OpenCL API failed. OpenCL API returns: -34 (CL_INVALID_CONTEXT)``` |
| 66 | + |
| 67 | +This issue needs to be chased down still. |
| 68 | + |
| 69 | +To Do Items |
| 70 | +=========== |
| 71 | + |
| 72 | +* Need to figure out how to run this code with other SyCL Compilers e.g. CodePlay etc |
| 73 | + |
| 74 | +Licensing and copyright |
| 75 | +======================= |
| 76 | + |
| 77 | +The Jefferson Lab License under which this workspace is distributed is in the file `LICENSE` |
| 78 | +Licenses for dependencies are included in their source code and/or in the `LICENSES` directory. |
| 79 | + |
12 | 80 |
|
13 | 81 |
|
14 | | -Please feel free to add your own code. Remember to rename the projct etc. |
|
0 commit comments