SoftwareApplication
identifier: 10.5281/zenodo.6076447
name: cudawrappers
description: The cudawrappers library is a C++ wrapper for the Nvidia C libraries such as the CUDA driver, NVRTC, and cuFFT.
description: This library is a C++ wrapper for the Nvidia C libraries (e.g. CUDA driver, nvrtc, cuFFT etc.). The main purposes are: 1. _easier resource management_, leading to _lower risk of programming errors_; 2. _better fault handling_ (through exceptions); 3. _more compact user code_. This library also supports AMD GPUs through the HIP: C++ Heterogeneous-Compute Interface for Portability. Originally, the API enforced RAII to even further reduce the risk of faulty code, but enforcing RAII and compatibility with (unmanaged) objects obtained outside this API are mutually exclusive. ## Requirements | Software | Minimum version | | ----------- | ----------- | | CUDA | 10.0 or later | | ROCM | 6.1.0 or later | | CMake | 3.17 or later | | gcc | 9.3 or later | | OS | Linux distro (amd64) | | Hardware | Type | | ----------- | ----------- | | NVIDIA GPU | [Pascal](https://www.nvidia.com/en-in/geforce/products/10series/architecture/) or newer| | AMD GPU | RDNA2 or newer, CDNA2 or newer | ## Usage CMake is used to build cudawrappers. To build the library, run: ```shell git clone https://github.com/nlesc-recruit/cudawrappers cd cudawrappers cmake -S . -B build make -C build ``` This creates a `build` directory. Since cudawrappers is header-only, no library objects will be built. For more details on the building requirements and testing, see the [developer documentation](README.dev.md). To install cudawrappers to a specific location (e.g., ~/.local), use: ```shell cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local -S . -B build make -C build make -C build install ``` You can optionally select what cudawrappers components should be enabled by specifying the `CUDAWRAPPERS_COMPONENTS` option. To build all components, specify: `-DCUDAWRAPPERS_COMPONENTS=all`. By default, only the `cu` and `nvrtc` components are enabled. The other components include: `cufft`, `nvml` (CUDA only) and `nvtx`. ### Enabling HIP Support To enable HIP: 1. Add the following code to your project's `CMakeLists.txt` file: ```cmak…
code repository: https://github.com/nlesc-recruit/cudawrappers
author: Person
  given name: John W.
  family name: Romein
  name: John W. Romein
  affiliation: Organization
    name: ASTRON
author: Person
  given name: Hanno
  family name: Spreeuw
  name: Hanno Spreeuw
  affiliation: Organization
    name: Netherlands eScience Center
author: https://orcid.org/0000-0001-9607-1142
author: https://orcid.org/0000-0003-3278-0518
author: 0000-0002-0989-929X
author: https://orcid.org/0000-0001-8724-8372
author: https://orcid.org/0000-0002-7064-4069
author: 0000-0003-4451-281X
author: https://orcid.org/0000-0001-9005-8940
author: https://orcid.org/0000-0002-3861-9234
author: https://orcid.org/0000-0001-6834-4860
author: https://orcid.org/0000-0002-7508-3272
author: https://orcid.org/0000-0002-2800-8309
keywords: GPU
keywords: accelerators
keywords: CUDA
programming language: C
programming language: C++
programming language: CMake
programming language: Cuda
programming language: Python
license:
  creative work: creativeWork
    name: Apache-2.0

https://orcid.org/0000-0001-9607-1142
type: Person
given name: Bram
family name: Veenboer
name: Bram Veenboer
affiliation: Organization
  name: ASTRON

https://orcid.org/0000-0003-3278-0518
type: Person
given name: Alessio
family name: Sclocco
name: Alessio Sclocco
affiliation: Organization
  name: Netherlands eScience Center

0000-0002-0989-929X
type: Person
given name: Faruk
family name: Diblen
name: Faruk Diblen
affiliation: Organization
  name: Netherlands eScience Center

https://orcid.org/0000-0001-8724-8372
type: Person
given name: Leon
family name: Oostrum
name: Leon Oostrum
affiliation: Organization
  name: Netherlands eScience Center

https://orcid.org/0000-0002-7064-4069
type: Person
given name: Jurriaan H.
family name: Spaaks
name: Jurriaan H. Spaaks
affiliation: Organization
  name: Netherlands eScience Center

0000-0003-4451-281X
type: Person
given name: Abel
family name: Soares Siqueira
name: Abel Soares Siqueira
affiliation: Organization
  name: Netherlands eScience Center

https://orcid.org/0000-0001-9005-8940
type: Person
given name: Bouwe
family name: Andela
name: Bouwe Andela
affiliation: Organization
  name: Netherlands eScience Center

https://orcid.org/0000-0002-3861-9234
type: Person
given name: Mattia
family name: Mancini
name: Mattia Mancini
affiliation: Organization
  name: ASTRON

https://orcid.org/0000-0001-6834-4860
type: Person
given name: Steven
family name: van der Vlugt
name: Steven van der Vlugt
affiliation: Organization
  name: ASTRON

https://orcid.org/0000-0002-7508-3272
type: Person
given name: Ben
family name: van Werkhoven
name: Ben van Werkhoven
affiliation: Organization
  name: Netherlands eScience Center

https://orcid.org/0000-0002-2800-8309
type: Person
given name: Laura
family name: Ootes
name: Laura Ootes
affiliation: Organization
  name: Netherlands eScience Center