From owner-freebsd-hackers@freebsd.org Mon Oct 9 14:50:45 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78662E3247D for ; Mon, 9 Oct 2017 14:50:45 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: from mail-qt0-x230.google.com (mail-qt0-x230.google.com [IPv6:2607:f8b0:400d:c0d::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2022E6FDF9 for ; Mon, 9 Oct 2017 14:50:45 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: by mail-qt0-x230.google.com with SMTP id z50so38531576qtj.4 for ; Mon, 09 Oct 2017 07:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=/TYPKQQCJ7heJrrkXriKeiIU4pPgjKixl8TxOyy+bbg=; b=TcTrznyJW6q2hg9va37I1LrLWysoAvW6X1nWTG4kOY6jQnWE2X4/hnpBboBHDRbhM2 xe0rLZykBHNqbfxdoWGGqFQ+TyzROjKLrdg4tL6AFoC0QHKToNj+uwWBcGIj5TTAy89u 18KC3zUm7gooFVNqxfu0xwZRBC0j3BQlPFITk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=/TYPKQQCJ7heJrrkXriKeiIU4pPgjKixl8TxOyy+bbg=; b=O8c6hyYJYPsq6UWRt+tmC44MZoqVJ9znUQ89hn6MF1ZSo++wyJ8tgY5IMGgXVdmLUH j221G554uDeKSN3lvoZkW2jyxnRvWheA1gDtLrk96rwUugdoXuwRBXF1bJP4bBEC0lL5 GuymzJv6bzk+Q7WuGw2IWw0GEudiSFQYOOcEIET83N4vjrA2AkFhMnBbobKroowTwVvn QyRbubd5g8MYGNOe5fh2+MnJKHBQx2R7ShIogvJNlejmvmUrODGgoj395ZdQY4UquUjl WWiFyn38c3QtqaipV9nzWvffPvdyF3+qGLHqIrrPDYAZlBVunQvXerYB0+j47mRaaEcN Mvbg== X-Gm-Message-State: AMCzsaU+OAkMZVW0COI7twrHmpX7FmG/2zLTY7LEuA439tahkF5MM3Rz O4xuA31RbmWHWBixC4E/uuZnfWXVhXo= X-Google-Smtp-Source: AOwi7QDTo4a5h5f8NLTxKnnRymTp96PLbfGJIvV3DE6CND5JMJ0mf85uVzYHNFpe7Z4vZn5qnB+qrA== X-Received: by 10.237.60.50 with SMTP id t47mr15643518qte.49.1507560643708; Mon, 09 Oct 2017 07:50:43 -0700 (PDT) Received: from ?IPv6:2804:54:19ef:cc00:c0c5:44f7:3ce:1e03? ([2804:54:19ef:cc00:c0c5:44f7:3ce:1e03]) by smtp.gmail.com with ESMTPSA id q2sm1733485qtf.78.2017.10.09.07.50.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Oct 2017 07:50:42 -0700 (PDT) Subject: Re: Fwd: CUDA and FreeBSD To: Artem Belevich Cc: FreeBSD Hackers References: <65001830-5520-cd20-fd71-130d28c7aadf@bsd.com.br> From: Otacilio Message-ID: <27144872-11f5-26ba-4967-dd5350ba54a6@bsd.com.br> Date: Mon, 9 Oct 2017 11:50:38 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Oct 2017 14:50:45 -0000 Em 08/10/2017 21:35, Artem Belevich escreveu: > Your question is rather vague. Could you elaborate on what exactly you > have in mind? > > Last time I checked, linux CUDA programs did run under linuxulator. > It's been a while, though. > > Getting native CUDA binaries to compiler/run on FreeBSD is somewhat > more complicated. > CUDA SDK does not support freebsd, so you can't use nvcc to compile > any CUDA binaries on FreeBSD. > Recent Clang (~5.0 or newer) is capable of compiling CUDA programs, so > getting it to compile CUDA source to an object file on FreeBSD should > not be particularly hard. However, you would not be able to link > anything that relies on standard CUDA features (e.g. using > foo<<<..>>>() syntax to launch a kernel or using many cudaXXXX() > calls) as they depend on libcudart and NVidia does not provide it for > FreeBSD. You would need to write your own replacement for the CUDA > runtime which would use raw driver API under the hood. It's somewhat > complicated by the fact that the API provided by libcudart for > compiler use is largely undocumented. > > You also can't use cuBLAS, cuFFT, cuDNN, etc, because NVidia does not > provide those for FreeBSD, either. :-( That rules FreeBSD out for > things like GPU support in Tensorflow. > > --Artem > > On Wed, Oct 4, 2017 at 5:41 AM, OtacĂ­lio > wrote: > > What are the issues that prevent programs using CUDA from running > on FreeBSD? > > []'s > > -Otacilio > Thank you so much for your answer. It was just this overview I was looking for. []'s -Otacilio