Giter Club home page Giter Club logo

cudawrappers's Introduction

github url github license badge DOI cii badge fair-software.eu Codacy Badge citation metadata Documentation Status

cudawrappers

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.

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
CMake 3.17 or later
gcc 9.3 or later
OS Linux distro (amd64)
Hardware Type
GPU architecture NVIDIA PASCAL or newer

Usage

We use CMake in this project, so you can clone and build this library with the following steps:

git clone https://github.com/nlesc-recruit/cudawrappers
cd cudawrappers
cmake -S . -B build
make -C build

This command will create a build folder, compile the code and generate the library libcudawrappers.so in the build directory. For more details on the building requirements and on testing, check the developer documentation.

To install to ~/.local, use

git clone https://github.com/nlesc-recruit/cudawrappers
cd cudawrappers
cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local -S . -B build
make -C build
make -C build install

Usage examples

You can include the cudawrappers library in your own projects in various ways. We have created a few repositories with example setups to get you started:

  1. usage-example-git-submodules Example project that uses the cudawrappers library as a dependency by using git submodules on its source tree.
  2. usage-example-locally-installed Example project that uses the cudawrappers library as a dependency by having it locally installed.
  3. usage-example-cmake-pull Example project that uses the cudawrappers library as a dependency by having cmake pull it in from github.
  4. other example

Used by

This section aims to provide an overview of projects that use this repo's library (or something very similar), e.g. through git submodules or by including copies of this library in their source tree:

  1. https://git.astron.nl/RD/dedisp/
  2. https://git.astron.nl/RD/idg
  3. https://git.astron.nl/RD/tensor-core-correlator

Alternatives

This section provides an overview of similar tools in this space, and how they are different.

cuda-api-wrappers

url: https://github.com/eyalroz/cuda-api-wrappers

  • Aims to provide wrappers for the CUDA runtime API
  • Development has slowed a bit recently
  • Has 1 or 2 main developers
  • Has gained quite a bit of attention (e.g. 440 stars; 57 forks)

The project is planning to support more of the Driver API (for fine-grained control of CUDA devices) and NVRTC API (for runtime compilation of kernels); there is a release candidate (v0.5.0-rc1). It doesn't provide support for cuFFT and cuBLAS though.

cuda-wrapper

url: https://github.com/halmd-org/cuda-wrapper

  • Aims to provide a C++ wrapper for the CUDA Driver and Runtime APIs

CudaPlusPlus

url: https://github.com/apardyl/cudaplusplus

  • Aims to provide a C++ wrapper for the CUDA Driver API
  • Project appears inactive

Contributing

See CONTRIBUTING for a guide on how to contribute.

Developer documentation

See README.dev.md for documentation on setting up your development environment.

cudawrappers's People

Contributors

abelsiqueira avatar benvanwerkhoven avatar bouweandela avatar fdiblen avatar john-romein avatar jspaaks avatar pre-commit-ci[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.