ACC Instructions for Spack

This commit is contained in:
Kaan Olgu 2023-06-17 11:34:24 +00:00
parent 2f4e6a5873
commit 178763fd52

View File

@ -181,3 +181,19 @@
# Example 1: OneAPI-DPCPP implementation # Example 1: OneAPI-DPCPP implementation
$ spack install babelstream +sycl2020 implementation=ONEAPI-DPCPP $ spack install babelstream +sycl2020 implementation=ONEAPI-DPCPP
``` ```
## ACC
* Target device selection process is automatic with 2 options:
* **gpu** : Globally set the target device to an NVIDIA GPU automatically if `cuda_arch` is specified
* **multicore** : Globally set the target device to the host CPU automatically if `cpu_arch` is specified
| Flag | Definition |
|-----------| ----------------------------------|
| cuda_arch |- List of supported compute capabilities are provided [here](https://github.com/spack/spack/blob/0f271883831bec6da3fc64c92eb1805c39a9f09a/lib/spack/spack/build_systems/cuda.py#LL19C1-L47C6) <br />- Useful [link](https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/) for matching CUDA gencodes with NVIDIA architectures|
| CPU_ARCH | This sets the `-tp` (target processor) flag, possible values are: <br /> `px` - Generic x86 Processor <br /> `bulldozer` - AMD Bulldozer processor <br /> `piledriver` - AMD Piledriver processor <br /> `zen` - AMD Zen architecture (Epyc, Ryzen) <br /> `zen2` - AMD Zen 2 architecture (Ryzen 2) <br /> `sandybridge` - Intel SandyBridge processor <br /> `haswell` - Intel Haswell processor <br /> `knl` - Intel Knights Landing processor <br /> `skylake` - Intel Skylake Xeon processor <br /> `host` - Link native version of HPC SDK cpu math library <br /> `native` - Alias for -tp host | `cpu_arch=skylake` |
```shell
# Example 1: For GPU Run
$ spack install babelstream +acc cuda_arch=<70>
# Example 2: For Multicore CPU Run
$ spack install babelstream +acc cpu_arch=<bulldozer>
```