cuda.eclass
Description
This eclass contains functions to be used with cuda package. Currently it is
setting and/or sanitizing NVCCFLAGS, the compiler flags for nvcc.
This is automatically done and exported in src_prepare() or manually by
calling cuda_sanatize.
Functions
- cuda_gccdir [-f]
-
Helper for determination of the latest gcc bindir supported by then current nvidia cuda toolkit.
Example:
cuda_gccdir -f -> --compiler-bindir "/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3"Return value: gcc bindir compatible with current cuda, optionally (
-f) prefixed with--compiler-bindir - cuda_sanitize
-
Correct
NVCCFLAGSby adding the necessary reference to gcc bindir and passingCXXFLAGSto underlying compiler without disturbingnvcc. - cuda_add_sandbox [-w]
-
Add nvidia dev nodes to the sandbox predict list. With
-w, add to the sandbox write list. - cuda_toolkit_version
-
echo the installed version of
dev-util/nvidia-cuda-toolkit - cuda_cudnn_version
-
echo the installed version of
dev-libs/cudnn - cuda_src_prepare
-
Sanitise and export
NVCCFLAGSby default
Variables
- NVCCFLAGS ?= -O2
-
nvcccompiler flags (seenvcc --help), which should be used likeCFLAGSfor C compiler - CUDA_VERBOSE ?= true
-
Being verbose during compilation to see underlying commands
Maintainers
Gentoo Science Project <sci@gentoo.org>
Reporting Bugs
Please report bugs via https://bugs.gentoo.org/