From: Fis Trivial <ybbs.daans@hotmail.com>
To: 32001@debbugs.gnu.org
Subject: [bug#32001] [PATCH] gnu: Add pocl.
Date: Fri, 29 Jun 2018 00:10:25 +0000 [thread overview]
Message-ID: <SN1PR16MB0511C9985B2EB285BD7FA8F1924E0@SN1PR16MB0511.namprd16.prod.outlook.com> (raw)
* gnu/packages/opencl.scm (pocl): New variable.
---
gnu/packages/opencl.scm | 53 +++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 51 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/opencl.scm b/gnu/packages/opencl.scm
index 644cd95e9..14eed5248 100644
--- a/gnu/packages/opencl.scm
+++ b/gnu/packages/opencl.scm
@@ -24,11 +24,13 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages gl)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages compression)
#:use-module (gnu packages libedit)
#:use-module (gnu packages llvm)
+ #:use-module (gnu packages mpi)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -38,8 +40,8 @@
#:use-module (gnu packages xorg))
;; This file adds OpenCL implementation related packages. Due to the fact that
-;; OpenCL devices are not available during build (store environment), tests are
-;; all disabled.
+;; OpenCL devices like GPU are not available during build (store environment),
+;; tests that require such devices are all disabled.
;; Check https://lists.gnu.org/archive/html/guix-devel/2018-04/msg00293.html
(define (make-opencl-headers major-version subversion)
@@ -288,3 +290,50 @@ functions required to initialize the device, create the command queues, the
kernels and the programs, and run them on the GPU. The code also contains a
back-end for the LLVM compiler framework.")
(license license:lgpl2.1+)))
+
+(define-public pocl
+ (package
+ (name "pocl")
+ (version "1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/pocl/pocl/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0lrw3hlb0w53xzmrf2hvbda406l70ar4gyadflvlkj4879lx138y"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("libltdl" ,libltdl)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("clang" ,clang)
+ ("hwloc" ,hwloc "lib")
+ ("llvm" ,llvm)
+ ("ocl-icd" ,ocl-icd)))
+ (arguments
+ `(#:configure-flags
+ (list "-DENABLE_ICD=ON"
+ "-DENABLE_TESTSUITES=ON"
+ ;; We are not developers, don't run conformance suite.
+ "-DENABLE_CONFORMANCE=OFF"
+ (string-append "-DEXTRA_HOST_LD_FLAGS=-L"
+ (assoc-ref %build-inputs "libc") "/lib"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'remove-headers
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (delete-file-recursively
+ (string-append out "/include")))))
+ (add-before 'check 'set-HOME
+ (lambda _
+ (setenv "HOME" "/tmp")
+ #t)))))
+ (home-page "http://portablecl.org/")
+ (synopsis "Portable Computing Language (pocl), is an OpenCL implementation")
+ (description "Pocl is being developed towards an efficient implementation
+of OpenCL standard which can be easily adapted for new targets.")
+ (license license:expat)))
--
2.14.4
next reply other threads:[~2018-06-29 0:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-29 0:10 Fis Trivial [this message]
2018-07-02 15:36 ` [bug#32001] [PATCH] gnu: Add pocl Ludovic Courtès
2018-07-02 16:27 ` Gaaming Jyun
2018-07-03 15:33 ` bug#32001: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SN1PR16MB0511C9985B2EB285BD7FA8F1924E0@SN1PR16MB0511.namprd16.prod.outlook.com \
--to=ybbs.daans@hotmail.com \
--cc=32001@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).