From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A7830138239 for ; Mon, 17 Sep 2018 17:59:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 268B2E0AD9; Mon, 17 Sep 2018 17:58:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C4247E0AB6 for ; Mon, 17 Sep 2018 17:58:57 +0000 (UTC) Received: from localhost (unknown [IPv6:2404:e800:e600:402:a043:dee9:8fe1:5766]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: perfinion) by smtp.gentoo.org (Postfix) with ESMTPSA id BDA1B335CD2 for ; Mon, 17 Sep 2018 17:58:55 +0000 (UTC) Date: Tue, 18 Sep 2018 01:58:51 +0800 From: Jason Zaman To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [RFC] Make 'cuda' a global USE flag Message-ID: <20180917175851.GA49979@baraddur.perfinion.com> References: <20180917135849.GA28786@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180917135849.GA28786@gentoo.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Archives-Salt: 9b6c2173-a67d-4345-a1b8-b4b3feda4596 X-Archives-Hash: 38c194e3b79d6a6cfb56e9a15edaff89 On Mon, Sep 17, 2018 at 04:00:26PM +0200, Guilherme Amadio wrote: > Hi everyone, > > We have several packages (~35) with local USE=cuda. Should we make that > a global USE flag? It's a quite generic flag for GPU support, so I was > surprised to learn it was still local when I added support for it to a > package recently. Sounds good to me, I was also surprised when I added the cuda useflag to TensorFlow. > Another thing we might want to discuss is a global setting for the CUDA > architecture to be used¹. We compile from source, so it would be a shame > not to compile with the right features for newer GPUs². Maybe just > advertising the NVCCFLAGS one should put in make.conf is enough? Is this the CUDA Capability (ie https://developer.nvidia.com/cuda-gpus)? TensorFlow's configure currently autodetects it based on what the card supports and builds for that version (or versions). Or you can set TF_CUDA_COMPUTE_CAPABILITIES="6.1" in make.conf. If you would like to standardize this I'll gladly change to use that. I'm also updating cuda.eclass for EAPI7, I will send patches to the list soon. I'm also adding a couple other functions for things I use in TF, If there are more things you want to add, they should all go in at once. -- Jason > Cheers, > —Guilherme > > 1. https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#options-for-steering-gpu-code-generation > 2. https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#gpu-feature-list >