[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Attempt to fix OpenBLAS on MIPS.

From: Ricardo Wurmus
Subject: [PATCH] Attempt to fix OpenBLAS on MIPS.
Date: Mon, 20 Jul 2015 15:11:37 +0200

Attached is a patch that *might* fix the build of OpenBLAS on MIPS.

The LOONGSON3A and LOONGSON3B targets both enable the use of special
extended instructions which may not be available on other MIPS CPUs.
This patch forces the SICORTEX target to be used, which should limit the
code to only standard MIPS instructions.

I don’t know if this would actually work and I note that SICORTEX is
listed as a “mips” target, rather than “mips64”, so maybe this is doomed
to fail.  I would appreciate it if someone with a MIPS machine could
test this patch.

Thanks in advance!

~~ Ricardo

>From fd611c8d8ccc5159487a1a80bb7950a8a759cfc6 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
Date: Mon, 20 Jul 2015 15:05:55 +0200
Subject: [PATCH] gnu: openblas: Force SICORTEX target for MIPS.

* gnu/packages/maths.scm (openblas)[arguments]: Add "TARGET=SICORTEX" to make
  flags on MIPS.
 gnu/packages/maths.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index d365481..f2d303a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1485,8 +1485,12 @@ constant parts of it.")
              ;; switching CPU targets at runtime with the environment variable
              ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
              ;; Unfortunately, this is not supported on MIPS.
+             ;; On MIPS we force the SICORTEX TARGET, as for the other two
+             ;; available MIPS targets special Loongson extended instructions
+             ;; are used.
              ,@(if (string-prefix? "mips" (%current-system))
-                   '()
+                   '("TARGET=SICORTEX")
        ;; no configure script
        #:phases (alist-delete 'configure %standard-phases)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]