1 2# Places to build options: architecture, device, advanced options, cuda options 3 4These are the files that need to be updated when a new architecture or device is 5added: 6 7 + generate_makefile.bash 8 * Interface for makefile system 9 + cmake/kokkos_options.cmake 10 * Interface for cmake system 11 + Makefile.kokkos 12 * Main logic for build (make and cmake) and defines (KokkosCore_config.h) 13 14In general, an architecture is going to be from on of these platforms: 15 + AMD 16 + ARM 17 + IBM 18 + Intel 19 + Intel Xeon Phi 20 + NVIDIA 21Although not strictly necessary, it is helpful to keep things organized by 22grouping by platform. 23 24### generate_makefile.sh 25 26The bash code does not do any error checking on the `--arch=` or `--device=` 27arguments thus strictly speaking you do not *need* to do anything to add a 28device or architecture; however, you should add it to the help menu. For the 29archictectures, please group by one of the platforms listed above. 30 31 32### cmake/kokkos_options.cmake and cmake/kokkos_settings.cmake 33 34The options for the CMake build system are: `-DKOKKOS_HOST_ARCH:STRING=` and 35`-DKOKKOS_ENABLE_<device>:BOOL=`. Although any string can be passed into 36KOKKOS_HOST_ARCH option, it is checked against an accepted list. Likewise, the 37KOKKOS_ENABLE_<device> must have the option added AND it is formed using the 38list. Thus: 39 + A new architecture should be added to the KOKKOS_HOST_ARCH_LIST variable. 40 + A new device should be added to the KOKKOS_DEVICES_LIST variable **AND** a 41 KOKKOS_ENABLE_<newdevice> option specified (see KOKKOS_ENABLE_CUDA for 42 example). 43 + A new device should be added to the KOKKOS_DEVICES_LIST variable **AND** a 44 45The translation from option to the `KOKKOS_SETTINGS` is done in 46`kokkos_settings.cmake`. This translation is automated for some types if you ad 47to the list, but for others, it may need to be hand coded. 48 49 50### Makefile.kokkos 51 52This is the main coding used by both the make and cmake system for defining 53the sources (generated makefile and cmake snippets by `core/src/Makefile`), for 54setting the defines in KokkosCore_config.h, and defining various internal 55variables. To understand how to add to this file, you should work closely with 56the Kokkos development team. 57