From owner-freebsd-hackers@freebsd.org Mon Oct 9 00:35:21 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 C797FE440BF for ; Mon, 9 Oct 2017 00:35:21 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-pf0-x22c.google.com (mail-pf0-x22c.google.com [IPv6:2607:f8b0:400e:c00::22c]) (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 46A6577E2B for ; Mon, 9 Oct 2017 00:35:21 +0000 (UTC) (envelope-from artemb@gmail.com) Received: by mail-pf0-x22c.google.com with SMTP id n14so10247895pfh.8 for ; Sun, 08 Oct 2017 17:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=mjfhSa9hz4uriiOReunW3z9EK52SmwCwKVHKvVgFN9g=; b=uSwFKgA3J/RrNN+IKRCwxknG/oYaQGQVKBjm/IFISSexZxsozKRw0n6e6lQmrgAsRn /mdZyhmb8Et5hFsjLGG0ZS6titrgdkNtcJMv4xX/914Fn4ee8UggHuEYDeXUfGv7go6F pDnWJ1Gp9VqTU7btd3SqHibfUAVFEpwlZot4Y2herM8cD5WL4P1q+0SJB5JXUf9vmUBt nTnlHDkTXmBfGYDUMNGzK/5LKbBHucKg7msEnF8cWe/iQH1GIe7uHAL+7wwLWb12nkqm nYotabVxvjV4H6KtHPnvTtpOd40FZoEnnR5lwUcyKgOYp8bUCHg7Cnit8+PH3Iy2d80L u3mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=mjfhSa9hz4uriiOReunW3z9EK52SmwCwKVHKvVgFN9g=; b=M/5vLXX1EOl2pFDj15KsExy4j25ggYiA4MEy4NMnOb0XBYn3mMz+Dr3j4dc0p8Lf1I UNp5zk5Mc9yWL3Jm7Y9MDfrka5T3OlJVUjKcCjcckC9zahMVmTsGHgQVvD/lIpBZ0sbC q+BM5zziWKb/n5yEmjSjT9JZ4+Lt4kdpRyBaJYos00LxQDOYDp7zRr9YNoZfI7A2cC6L BVvmC05lp97oBY72NsKI6rnI39ozPmxTKVsnNROU7KFF5+dd6PRBE9REPwvjH1uwljW6 dv6GyqO530Nyk+iqtjzvqYWwjlR1+AooaatFUUl0DEasdr/sWmne7x9Z/LZkYD7ThgHN bP6w== X-Gm-Message-State: AMCzsaXHx7ZvUmbmwgg4lsg1aQnXQdzHiucRfN4q9ZiwRYVEcY5mDiuw B8W8lWLDCbl/R9ovgLhJPHM284uTilp9oV2bdWtnuw== X-Google-Smtp-Source: AOwi7QDZhaePkmRJMc9nrlvFLbsJ7Xhu8/j9x5dYIG6TduuohPYXqGU4MMIzx9+JZIuyz+UAYdYZdMt5zRG11acvBcE= X-Received: by 10.84.194.3 with SMTP id g3mr7879062pld.246.1507509320525; Sun, 08 Oct 2017 17:35:20 -0700 (PDT) MIME-Version: 1.0 Sender: artemb@gmail.com Received: by 10.100.192.14 with HTTP; Sun, 8 Oct 2017 17:35:19 -0700 (PDT) In-Reply-To: References: <65001830-5520-cd20-fd71-130d28c7aadf@bsd.com.br> From: Artem Belevich Date: Sun, 8 Oct 2017 17:35:19 -0700 X-Google-Sender-Auth: 7sR6Xq0XRU5CuzYBSSOgJshlAwo Message-ID: Subject: Fwd: CUDA and FreeBSD To: =?UTF-8?B?T3RhY8OtbGlv?= Cc: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 00:35:22 -0000 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=C3=ADlio wr= ote: > What are the issues that prevent programs using CUDA from running on > FreeBSD? > > []'s > > -Otacilio > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " >