Skip to content

neilkichler/cutangent

Repository files navigation

CuTangent

CuTangent is a CUDA library for computing forward-mode subgradients, i.e. tangents.

Supported Operations

Installation

Please make sure that you have installed everything mentioned in the section Build Requirements.

System-wide

git clone https://github.com/neilkichler/cutangent.git
cd cuinterval
cmake --preset release
cmake --build build
cmake --install build

CMake Project

CPMAddPackage("gh:neilkichler/cutangent@0.0.1")
include(FetchContent)
FetchContent_Declare(
  cuinterval
  GIT_REPOSITORY git@github.com:neilkichler/cutangent.git
  GIT_TAG main
)
FetchContent_MakeAvailable(cutangent)

In either case, you can link to the library using:

target_link_libraries(${PROJECT_NAME} PUBLIC cutangent)

Example

Have a look at the examples folder.

Documentation

The documentation is available here.

Build

Build Requirements

We require C++20, CMake v3.25.2+, Ninja, and recent C++ and CUDA compilers.

Ubuntu

apt install cmake gcc ninja-build

Cluster

module load CMake CUDA GCC Ninja

Build and run tests

Using Workflows

cmake --workflow --preset dev

Using Presets

cmake --preset debug
cmake --build --preset debug
ctest --preset debug

Using regular CMake

cmake -S . -B build -GNinja
cmake --build build
./build/tests/tests