mirror of
git://git.savannah.gnu.org/guix.git
synced 2023-12-14 03:33:07 +01:00
gnu: OpenBLAS: Incorporate grafted changes.
* gnu/packages/maths.scm (openblas)[replacement]: Remove. [arguments]: Add NUM_THREADS in #:make-flags. (openblas/fixed-num-threads): Remove variable.
This commit is contained in:
parent
969aea1f03
commit
a4384dc970
1 changed files with 7 additions and 22 deletions
|
@ -3106,10 +3106,6 @@ parts of it.")
|
|||
|
||||
(define-public openblas
|
||||
(package
|
||||
;; TODO: Incorporate 'openblas/fixed-num-threads' changes on the next
|
||||
;; rebuild cycle.
|
||||
(replacement openblas/fixed-num-threads)
|
||||
|
||||
(name "openblas")
|
||||
(version "0.3.6")
|
||||
(source
|
||||
|
@ -3137,6 +3133,13 @@ parts of it.")
|
|||
(list (string-append "PREFIX=" (assoc-ref %outputs "out"))
|
||||
"SHELL=bash"
|
||||
"MAKE_NB_JOBS=0" ;use jobserver for submakes
|
||||
|
||||
;; This is the maximum number of threads OpenBLAS will ever use (that
|
||||
;; is, if $OPENBLAS_NUM_THREADS is greater than that, then NUM_THREADS
|
||||
;; is used.) If we don't set it, the makefile sets it to the number
|
||||
;; of cores of the build machine, which is obviously wrong.
|
||||
"NUM_THREADS=128"
|
||||
|
||||
;; Build the library for all supported CPUs. This allows
|
||||
;; switching CPU targets at runtime with the environment variable
|
||||
;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
|
||||
|
@ -3191,24 +3194,6 @@ parts of it.")
|
|||
(synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)")
|
||||
(license license:bsd-3)))
|
||||
|
||||
(define openblas/fixed-num-threads
|
||||
;; TODO: Move that to 'openblas' proper on the next rebuild cycle.
|
||||
(package
|
||||
(inherit openblas)
|
||||
(version (match (string-split (package-version openblas) #\.)
|
||||
((numbers ... (= string-length len))
|
||||
(string-join (append numbers
|
||||
(list (make-string len #\a)))
|
||||
"."))))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments openblas)
|
||||
((#:make-flags flags ''())
|
||||
;; This is the maximum number of threads OpenBLAS will ever use (that
|
||||
;; is, if $OPENBLAS_NUM_THREADS is greater than that, then NUM_THREADS
|
||||
;; is used.) If we don't set it, the makefile sets it to the number
|
||||
;; of cores of the build machine, which is obviously wrong.
|
||||
`(cons "NUM_THREADS=128" ,flags))))))
|
||||
|
||||
(define* (make-blis implementation #:optional substitutable?)
|
||||
"Return a BLIS package with the given IMPLEMENTATION (see config/ in the
|
||||
source tree for a list of implementations.)
|
||||
|
|
Loading…
Reference in a new issue