Gentoo Archives: gentoo-dev

From: Jason Zaman <perfinion@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] Make 'cuda' a global USE flag
Date: Mon, 17 Sep 2018 17:59:02
Message-Id: 20180917175851.GA49979@baraddur.perfinion.com
In Reply to: [gentoo-dev] [RFC] Make 'cuda' a global USE flag by Guilherme Amadio
1 On Mon, Sep 17, 2018 at 04:00:26PM +0200, Guilherme Amadio wrote:
2 > Hi everyone,
3 >
4 > We have several packages (~35) with local USE=cuda. Should we make that
5 > a global USE flag? It's a quite generic flag for GPU support, so I was
6 > surprised to learn it was still local when I added support for it to a
7 > package recently.
8
9 Sounds good to me, I was also surprised when I added the cuda
10 useflag to TensorFlow.
11
12 > Another thing we might want to discuss is a global setting for the CUDA
13 > architecture to be used¹. We compile from source, so it would be a shame
14 > not to compile with the right features for newer GPUs². Maybe just
15 > advertising the NVCCFLAGS one should put in make.conf is enough?
16
17 Is this the CUDA Capability (ie https://developer.nvidia.com/cuda-gpus)?
18 TensorFlow's configure currently autodetects it based on what the card
19 supports and builds for that version (or versions). Or you can set
20 TF_CUDA_COMPUTE_CAPABILITIES="6.1" in make.conf. If you would like to
21 standardize this I'll gladly change to use that.
22
23 I'm also updating cuda.eclass for EAPI7, I will send patches to the list
24 soon. I'm also adding a couple other functions for things I use in TF,
25 If there are more things you want to add, they should all go in at once.
26
27 -- Jason
28
29 > Cheers,
30 > —Guilherme
31 >
32 > 1. https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#options-for-steering-gpu-code-generation
33 > 2. https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#gpu-feature-list
34 >