Problem
Currently, the package requires CUDA to be present at build time — CMakeLists.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).
Problem
Currently, the package requires CUDA to be present at build time —
CMakeLists.txtissues aFATAL_ERRORif 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/anddispatch/cuda/) are already cleanly separated:CMakeLists.txt:58FATAL_ERRORif CUDA not foundsrc/backend.cpp,src/lrv.cpp, etc. (8 files)#includes the.cuhCUDA dispatch headerinst/include/propr/context.h#include <cuda_runtime.h>, definespropr_contextwithcudaStream_tsrc/CMakeLists.txt:17CUDA::cublas CUDA::cudartDeployment 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).