Skip to content

Make CUDA optional at build time to enable Bioconductor release and CPU-only installation #90

@suzannejin

Description

@suzannejin

Problem

Currently, the package requires CUDA to be present at build timeCMakeLists.txt issues a FATAL_ERROR if CUDA is not found (line 58). This means users without a GPU or CUDA toolkit cannot install the package at all.

Current coupling points

The CPU and GPU code are entangled at four levels, even though the implementations themselves (dispatch/cpu/ and dispatch/cuda/) are already cleanly separated:

Layer File(s) Coupling
CMake CMakeLists.txt:58 FATAL_ERROR if CUDA not found
Rcpp wrappers src/backend.cpp, src/lrv.cpp, etc. (8 files) Each #includes the .cuh CUDA dispatch header
Shared header inst/include/propr/context.h #include <cuda_runtime.h>, defines propr_context with cudaStream_t
Link step src/CMakeLists.txt:17 Hard links to CUDA::cublas CUDA::cudart

Deployment targets to support

Allow two install modes: 1) standard mode without cuda, and 2) gpu support with cuda implementations.

Note that it should be Bioconductor compliant (we aim to provide this R package through Bioconductor #81),
and also Bioconda/Biocontainers/conda-forge compliant, so that we can later create official container to use this package on nf-core (check links 1).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions