All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 next] openblas: new package
@ 2016-05-19 10:10 Vicente Olivert Riera
  2016-05-19 10:17 ` Baruch Siach
  2016-05-19 12:21 ` Thomas Petazzoni
  0 siblings, 2 replies; 12+ messages in thread
From: Vicente Olivert Riera @ 2016-05-19 10:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
Changes v2 -> v3:
 - Switch version to HEAD of develop branch as it contains support for
   MIPS32.
 - Add a patch to fix build failure of P5600 and I6400 targets.
 - Add support for OpenMP when toolchain has NPTL threads.

Changes v1 -> v2:
 - Multi-threading is not available for static-only since it uses
   dlfcn.h, so modify the "ifeq" statement accordingly.

 package/Config.in              |   1 +
 package/openblas/Config.in     | 240 +++++++++++++++++++++++++++++++++++++++++
 package/openblas/openblas.hash |   3 +
 package/openblas/openblas.mk   |  54 ++++++++++
 4 files changed, 298 insertions(+)
 create mode 100644 package/openblas/Config.in
 create mode 100644 package/openblas/openblas.hash
 create mode 100644 package/openblas/openblas.mk

diff --git a/package/Config.in b/package/Config.in
index 0056beb..b59c2f1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1270,6 +1270,7 @@ endif
 	source "package/msgpack/Config.in"
 	source "package/mtdev2tuio/Config.in"
 	source "package/netbsd-queue/Config.in"
+	source "package/openblas/Config.in"
 	source "package/orc/Config.in"
 	source "package/p11-kit/Config.in"
 	source "package/poco/Config.in"
diff --git a/package/openblas/Config.in b/package/openblas/Config.in
new file mode 100644
index 0000000..6025aec
--- /dev/null
+++ b/package/openblas/Config.in
@@ -0,0 +1,240 @@
+config BR2_PACKAGE_OPENBLAS
+	bool "openblas"
+	depends on BR2_i386 || BR2_x86_64 || \
+		BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \
+		BR2_mips || BR2_mipsel || \
+		BR2_mips64 || BR2_mips64el || \
+		BR2_sparc || BR2_sparc64 || \
+		BR2_arm || BR2_armeb || \
+		BR2_aarch64 || BR2_aarch64_be
+	help
+	  An optimized BLAS library based on GotoBLAS2 1.13 BSD version.
+
+	  https://www.openblas.net/
+
+if BR2_PACKAGE_OPENBLAS
+
+choice
+	prompt "OpenBLAS target CPU"
+	help
+	  OpenBLAS target CPU
+
+config BR2_PACKAGE_OPENBLAS_TARGET_P2
+	bool "P2"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_KATMAI
+	bool "KATMAI"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_COPPERMINE
+	bool "COPPERMINE"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_NORTHWOOD
+	bool "NORTHWOOD"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_PRESCOTT
+	bool "PRESCOTT"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_BANIAS
+	bool "BANIAS"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_YONAH
+	bool "YONAH"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_CORE2
+	bool "CORE2"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_PENRYN
+	bool "PENRYN"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_DUNNINGTON
+	bool "DUNNINGTON"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_NEHALEM
+	bool "NEHALEM"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_SANDYBRIDGE
+	bool "SANDYBRIDGE"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_HASWELL
+	bool "HASWELL"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_ATOM
+	bool "ATOM"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_ATHLON
+	bool "ATHLON"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_OPTERON
+	bool "OPTERON"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_OPTERON_SSE3
+	bool "OPTERON_SSE3"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_BARCELONA
+	bool "BARCELONA"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_SHANGHAI
+	bool "SHANGHAI"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_ISTANBUL
+	bool "ISTANBUL"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_BOBCAT
+	bool "BOBCAT"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_BULLDOZER
+	bool "BULLDOZER"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_PILEDRIVER
+	bool "PILEDRIVER"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_STEAMROLLER
+	bool "STEAMROLLER"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_EXCAVATOR
+	bool "EXCAVATOR"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_SSE_GENERIC
+	bool "SSE_GENERIC"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_VIAC3
+	bool "VIAC3"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_NANO
+	bool "NANO"
+	depends on BR2_i386 || BR2_x86_64
+config BR2_PACKAGE_OPENBLAS_TARGET_POWER4
+	bool "POWER4"
+	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+config BR2_PACKAGE_OPENBLAS_TARGET_POWER5
+	bool "POWER5"
+	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+config BR2_PACKAGE_OPENBLAS_TARGET_POWER6
+	bool "POWER6"
+	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+config BR2_PACKAGE_OPENBLAS_TARGET_POWER7
+	bool "POWER7"
+	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+config BR2_PACKAGE_OPENBLAS_TARGET_POWER8
+	bool "POWER8"
+	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+config BR2_PACKAGE_OPENBLAS_TARGET_PPCG4
+	bool "PPCG4"
+	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+config BR2_PACKAGE_OPENBLAS_TARGET_PPC970
+	bool "PPC970"
+	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+config BR2_PACKAGE_OPENBLAS_TARGET_PPC970MP
+	bool "PPC970MP"
+	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+config BR2_PACKAGE_OPENBLAS_TARGET_PPC440
+	bool "PPC440"
+	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+config BR2_PACKAGE_OPENBLAS_TARGET_PPC440FP2
+	bool "PPC440FP2"
+	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+config BR2_PACKAGE_OPENBLAS_TARGET_CELL
+	bool "CELL"
+	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+config BR2_PACKAGE_OPENBLAS_TARGET_P5600
+	bool "P5600"
+	depends on BR2_mips || BR2_mipsel
+config BR2_PACKAGE_OPENBLAS_TARGET_SICORTEX
+	bool "SICORTEX"
+	depends on BR2_mips64 || BR2_mips64el
+config BR2_PACKAGE_OPENBLAS_TARGET_LOONGSON3A
+	bool "LOONGSON3A"
+	depends on BR2_mips64 || BR2_mips64el
+config BR2_PACKAGE_OPENBLAS_TARGET_LOONGSON3B
+	bool "LOONGSON3B"
+	depends on BR2_mips64 || BR2_mips64el
+config BR2_PACKAGE_OPENBLAS_TARGET_I6400
+	bool "I6400"
+	depends on BR2_mips64 || BR2_mips64el
+config BR2_PACKAGE_OPENBLAS_TARGET_SPARC
+	bool "SPARC"
+	depends on BR2_sparc || BR2_sparc64
+config BR2_PACKAGE_OPENBLAS_TARGET_SPARCV7
+	bool "SPARCV7"
+	depends on BR2_sparc || BR2_sparc64
+config BR2_PACKAGE_OPENBLAS_TARGET_CORTEXA15
+	bool "CORTEXA15"
+	depends on BR2_arm || BR2_armeb
+config BR2_PACKAGE_OPENBLAS_TARGET_CORTEXA9
+	bool "CORTEXA9"
+	depends on BR2_arm || BR2_armeb
+config BR2_PACKAGE_OPENBLAS_TARGET_ARMV7
+	bool "ARMV7"
+	depends on BR2_arm || BR2_armeb
+config BR2_PACKAGE_OPENBLAS_TARGET_ARMV6
+	bool "ARMV6"
+	depends on BR2_arm || BR2_armeb
+config BR2_PACKAGE_OPENBLAS_TARGET_ARMV5
+	bool "ARMV5"
+	depends on BR2_arm || BR2_armeb
+config BR2_PACKAGE_OPENBLAS_TARGET_ARMV8
+	bool "ARMV8"
+	depends on BR2_aarch64 || BR2_aarch64_be
+config BR2_PACKAGE_OPENBLAS_TARGET_CORTEXA57
+	bool "CORTEXA57"
+	depends on BR2_aarch64 || BR2_aarch64_be
+
+endchoice
+
+config BR2_PACKAGE_OPENBLAS_TARGET
+	string
+	default "P2"           if BR2_PACKAGE_OPENBLAS_TARGET_P2
+	default "KATMAI"       if BR2_PACKAGE_OPENBLAS_TARGET_KATMAI
+	default "COPPERMINE"   if BR2_PACKAGE_OPENBLAS_TARGET_COPPERMINE
+	default "NORTHWOOD"    if BR2_PACKAGE_OPENBLAS_TARGET_NORTHWOOD
+	default "PRESCOTT"     if BR2_PACKAGE_OPENBLAS_TARGET_PRESCOTT
+	default "BANIAS"       if BR2_PACKAGE_OPENBLAS_TARGET_BANIAS
+	default "YONAH"        if BR2_PACKAGE_OPENBLAS_TARGET_YONAH
+	default "CORE2"        if BR2_PACKAGE_OPENBLAS_TARGET_CORE2
+	default "PENRYN"       if BR2_PACKAGE_OPENBLAS_TARGET_PENRYN
+	default "DUNNINGTON"   if BR2_PACKAGE_OPENBLAS_TARGET_DUNNINGTON
+	default "NEHALEM"      if BR2_PACKAGE_OPENBLAS_TARGET_NEHALEM
+	default "SANDYBRIDGE"  if BR2_PACKAGE_OPENBLAS_TARGET_SANDYBRIDGE
+	default "HASWELL"      if BR2_PACKAGE_OPENBLAS_TARGET_HASWELL
+	default "ATOM"         if BR2_PACKAGE_OPENBLAS_TARGET_ATOM
+	default "ATHLON"       if BR2_PACKAGE_OPENBLAS_TARGET_ATHLON
+	default "OPTERON"      if BR2_PACKAGE_OPENBLAS_TARGET_OPTERON
+	default "OPTERON_SSE3" if BR2_PACKAGE_OPENBLAS_TARGET_OPTERON_SSE3
+	default "BARCELONA"    if BR2_PACKAGE_OPENBLAS_TARGET_BARCELONA
+	default "SHANGHAI"     if BR2_PACKAGE_OPENBLAS_TARGET_SHANGHAI
+	default "ISTANBUL"     if BR2_PACKAGE_OPENBLAS_TARGET_ISTANBUL
+	default "BOBCAT"       if BR2_PACKAGE_OPENBLAS_TARGET_BOBCAT
+	default "BULLDOZER"    if BR2_PACKAGE_OPENBLAS_TARGET_BULLDOZER
+	default "PILEDRIVER"   if BR2_PACKAGE_OPENBLAS_TARGET_PILEDRIVER
+	default "STEAMROLLER"  if BR2_PACKAGE_OPENBLAS_TARGET_STEAMROLLER
+	default "EXCAVATOR"    if BR2_PACKAGE_OPENBLAS_TARGET_EXCAVATOR
+	default "SSE_GENERIC"  if BR2_PACKAGE_OPENBLAS_TARGET_SSE_GENERIC
+	default "VIAC3"        if BR2_PACKAGE_OPENBLAS_TARGET_VIAC3
+	default "NANO"         if BR2_PACKAGE_OPENBLAS_TARGET_NANO
+	default "POWER4"       if BR2_PACKAGE_OPENBLAS_TARGET_POWER4
+	default "POWER5"       if BR2_PACKAGE_OPENBLAS_TARGET_POWER5
+	default "POWER6"       if BR2_PACKAGE_OPENBLAS_TARGET_POWER6
+	default "POWER7"       if BR2_PACKAGE_OPENBLAS_TARGET_POWER7
+	default "POWER8"       if BR2_PACKAGE_OPENBLAS_TARGET_POWER8
+	default "PPCG4"        if BR2_PACKAGE_OPENBLAS_TARGET_PPCG4
+	default "PPC970"       if BR2_PACKAGE_OPENBLAS_TARGET_PPC970
+	default "PPC970MP"     if BR2_PACKAGE_OPENBLAS_TARGET_PPC970MP
+	default "PPC440"       if BR2_PACKAGE_OPENBLAS_TARGET_PPC440
+	default "PPC440FP2"    if BR2_PACKAGE_OPENBLAS_TARGET_PPC440FP2
+	default "CELL"         if BR2_PACKAGE_OPENBLAS_TARGET_CELL
+	default "P5600"        if BR2_PACKAGE_OPENBLAS_TARGET_P5600
+	default "SICORTEX"     if BR2_PACKAGE_OPENBLAS_TARGET_SICORTEX
+	default "LOONGSON3A"   if BR2_PACKAGE_OPENBLAS_TARGET_LOONGSON3A
+	default "LOONGSON3B"   if BR2_PACKAGE_OPENBLAS_TARGET_LOONGSON3B
+	default "I6400"        if BR2_PACKAGE_OPENBLAS_TARGET_I6400
+	default "SPARC"        if BR2_PACKAGE_OPENBLAS_TARGET_SPARC
+	default "SPARCV7"      if BR2_PACKAGE_OPENBLAS_TARGET_SPARCV7
+	default "CORTEXA15"    if BR2_PACKAGE_OPENBLAS_TARGET_CORTEXA15
+	default "CORTEXA9"     if BR2_PACKAGE_OPENBLAS_TARGET_CORTEXA9
+	default "ARMV7"        if BR2_PACKAGE_OPENBLAS_TARGET_ARMV7
+	default "ARMV6"        if BR2_PACKAGE_OPENBLAS_TARGET_ARMV6
+	default "ARMV5"        if BR2_PACKAGE_OPENBLAS_TARGET_ARMV5
+	default "ARMV8"        if BR2_PACKAGE_OPENBLAS_TARGET_ARMV8
+	default "CORTEXA57"    if BR2_PACKAGE_OPENBLAS_TARGET_CORTEXA57
+
+endif
diff --git a/package/openblas/openblas.hash b/package/openblas/openblas.hash
new file mode 100644
index 0000000..c537f8f
--- /dev/null
+++ b/package/openblas/openblas.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 745650877bc7550f52eaf1f07bc691b9fd645f0d33eaacfc7c760a3e2a9f87dd  openblas-7a190653698ecd6576653109adbae5b805278c7e.tar.gz
+sha256 c0aa38db2eee30d2c23735b55b814f77cf0d39c12c50dfe617b8ebf941573ea5  e12cff87b86615f5a4643d246a6c1963a0e81ca5.patch
diff --git a/package/openblas/openblas.mk b/package/openblas/openblas.mk
new file mode 100644
index 0000000..5e6f417
--- /dev/null
+++ b/package/openblas/openblas.mk
@@ -0,0 +1,54 @@
+################################################################################
+#
+# openblas
+#
+################################################################################
+
+OPENBLAS_VERSION = 7a190653698ecd6576653109adbae5b805278c7e
+OPENBLAS_SITE = $(call github,xianyi,OpenBLAS,$(OPENBLAS_VERSION))
+OPENBLAS_LICENSE = BSD-3
+OPENBLAS_LICENSE_FILES = LICENSE
+OPENBLAS_INSTALL_STAGING = YES
+OPENBLAS_PATCH = https://github.com/vriera/OpenBLAS/commit/e12cff87b86615f5a4643d246a6c1963a0e81ca5.patch
+
+# Disable fortran if the fortran compiler doesn't actually exist.
+ifeq ($(wildcard $(TARGET_FC)),)
+OPENBLAS_MAKE_OPTS += ONLY_CBLAS=1
+endif
+
+# Enable/Disable multi-threading (not for static-only since it uses dlfcn.h)
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)x$(BR2_STATIC_LIBS),yx)
+OPENBLAS_MAKE_OPTS += USE_THREAD=1
+# Take advantage of OpenMP if we have support for it
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y)
+OPENBLAS_MAKE_OPTS += USE_OPENMP=1
+else
+OPENBLAS_MAKE_OPTS += USE_OPENMP=0
+endif
+else
+OPENBLAS_MAKE_OPTS += USE_THREAD=0
+endif
+
+# Static-only/Shared-only toggle
+ifeq ($(BR2_STATIC_LIBS),y)
+OPENBLAS_MAKE_OPTS += NO_SHARED=1
+else ifeq ($(BR2_SHARED_LIBS),y)
+OPENBLAS_MAKE_OPTS += NO_STATIC=1
+endif
+
+define OPENBLAS_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) $(OPENBLAS_MAKE_OPTS) \
+		CROSS=1 TARGET=$(BR2_PACKAGE_OPENBLAS_TARGET) -C $(@D)
+endef
+
+define OPENBLAS_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(OPENBLAS_MAKE_OPTS) \
+		-C $(@D) install PREFIX=$(STAGING_DIR)/usr
+endef
+
+define OPENBLAS_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(OPENBLAS_MAKE_OPTS) \
+		-C $(@D) install PREFIX=$(TARGET_DIR)/usr
+endef
+
+$(eval $(generic-package))
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH v3 next] openblas: new package
  2016-05-19 10:10 [Buildroot] [PATCH v3 next] openblas: new package Vicente Olivert Riera
@ 2016-05-19 10:17 ` Baruch Siach
  2016-05-19 10:55   ` Vicente Olivert Riera
  2016-05-19 12:21 ` Thomas Petazzoni
  1 sibling, 1 reply; 12+ messages in thread
From: Baruch Siach @ 2016-05-19 10:17 UTC (permalink / raw)
  To: buildroot

Hi Vicente,

On Thu, May 19, 2016 at 11:10:02AM +0100, Vicente Olivert Riera wrote:
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
> Changes v2 -> v3:
>  - Switch version to HEAD of develop branch as it contains support for
>    MIPS32.
>  - Add a patch to fix build failure of P5600 and I6400 targets.

Where is this patch?

>  - Add support for OpenMP when toolchain has NPTL threads.
> 
> Changes v1 -> v2:
>  - Multi-threading is not available for static-only since it uses
>    dlfcn.h, so modify the "ifeq" statement accordingly.
> 
>  package/Config.in              |   1 +
>  package/openblas/Config.in     | 240 +++++++++++++++++++++++++++++++++++++++++
>  package/openblas/openblas.hash |   3 +
>  package/openblas/openblas.mk   |  54 ++++++++++
>  4 files changed, 298 insertions(+)
>  create mode 100644 package/openblas/Config.in
>  create mode 100644 package/openblas/openblas.hash
>  create mode 100644 package/openblas/openblas.mk

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH v3 next] openblas: new package
  2016-05-19 10:17 ` Baruch Siach
@ 2016-05-19 10:55   ` Vicente Olivert Riera
  2016-05-19 11:12     ` Baruch Siach
  0 siblings, 1 reply; 12+ messages in thread
From: Vicente Olivert Riera @ 2016-05-19 10:55 UTC (permalink / raw)
  To: buildroot

Hello Baruch,

On 19/05/16 11:17, Baruch Siach wrote:
> Hi Vicente,
> 
> On Thu, May 19, 2016 at 11:10:02AM +0100, Vicente Olivert Riera wrote:
>> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>> ---
>> Changes v2 -> v3:
>>  - Switch version to HEAD of develop branch as it contains support for
>>    MIPS32.
>>  - Add a patch to fix build failure of P5600 and I6400 targets.
> 
> Where is this patch?

referenced in the openblas.mk file, in OPENBLAS_PATCH variable:

OPENBLAS_PATCH =
https://github.com/vriera/OpenBLAS/commit/e12cff87b86615f5a4643d246a6c1963a0e81ca5.patch

Regards,

Vincent.

>>  - Add support for OpenMP when toolchain has NPTL threads.
>>
>> Changes v1 -> v2:
>>  - Multi-threading is not available for static-only since it uses
>>    dlfcn.h, so modify the "ifeq" statement accordingly.
>>
>>  package/Config.in              |   1 +
>>  package/openblas/Config.in     | 240 +++++++++++++++++++++++++++++++++++++++++
>>  package/openblas/openblas.hash |   3 +
>>  package/openblas/openblas.mk   |  54 ++++++++++
>>  4 files changed, 298 insertions(+)
>>  create mode 100644 package/openblas/Config.in
>>  create mode 100644 package/openblas/openblas.hash
>>  create mode 100644 package/openblas/openblas.mk
> 
> baruch
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH v3 next] openblas: new package
  2016-05-19 10:55   ` Vicente Olivert Riera
@ 2016-05-19 11:12     ` Baruch Siach
  0 siblings, 0 replies; 12+ messages in thread
From: Baruch Siach @ 2016-05-19 11:12 UTC (permalink / raw)
  To: buildroot

Hi Vicente,

On Thu, May 19, 2016 at 11:55:58AM +0100, Vicente Olivert Riera wrote:
> On 19/05/16 11:17, Baruch Siach wrote:
> > On Thu, May 19, 2016 at 11:10:02AM +0100, Vicente Olivert Riera wrote:
> >> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> >> ---
> >> Changes v2 -> v3:
> >>  - Switch version to HEAD of develop branch as it contains support for
> >>    MIPS32.
> >>  - Add a patch to fix build failure of P5600 and I6400 targets.
> > 
> > Where is this patch?
> 
> referenced in the openblas.mk file, in OPENBLAS_PATCH variable:
> 
> OPENBLAS_PATCH =
> https://github.com/vriera/OpenBLAS/commit/e12cff87b86615f5a4643d246a6c1963a0e81ca5.patch

Right, I missed that. Please add a link to your pull request 
(https://github.com/xianyi/OpenBLAS/pull/886) in a comment.

Thanks,
baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH v3 next] openblas: new package
  2016-05-19 10:10 [Buildroot] [PATCH v3 next] openblas: new package Vicente Olivert Riera
  2016-05-19 10:17 ` Baruch Siach
@ 2016-05-19 12:21 ` Thomas Petazzoni
  2016-05-19 13:42   ` Vicente Olivert Riera
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas Petazzoni @ 2016-05-19 12:21 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 19 May 2016 11:10:02 +0100, Vicente Olivert Riera wrote:

> +choice
> +	prompt "OpenBLAS target CPU"
> +	help
> +	  OpenBLAS target CPU
> +
> +config BR2_PACKAGE_OPENBLAS_TARGET_P2
> +	bool "P2"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_KATMAI
> +	bool "KATMAI"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_COPPERMINE
> +	bool "COPPERMINE"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_NORTHWOOD
> +	bool "NORTHWOOD"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_PRESCOTT
> +	bool "PRESCOTT"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_BANIAS
> +	bool "BANIAS"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_YONAH
> +	bool "YONAH"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_CORE2
> +	bool "CORE2"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_PENRYN
> +	bool "PENRYN"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_DUNNINGTON
> +	bool "DUNNINGTON"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_NEHALEM
> +	bool "NEHALEM"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_SANDYBRIDGE
> +	bool "SANDYBRIDGE"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_HASWELL
> +	bool "HASWELL"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_ATOM
> +	bool "ATOM"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_ATHLON
> +	bool "ATHLON"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_OPTERON
> +	bool "OPTERON"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_OPTERON_SSE3
> +	bool "OPTERON_SSE3"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_BARCELONA
> +	bool "BARCELONA"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_SHANGHAI
> +	bool "SHANGHAI"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_ISTANBUL
> +	bool "ISTANBUL"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_BOBCAT
> +	bool "BOBCAT"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_BULLDOZER
> +	bool "BULLDOZER"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_PILEDRIVER
> +	bool "PILEDRIVER"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_STEAMROLLER
> +	bool "STEAMROLLER"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_EXCAVATOR
> +	bool "EXCAVATOR"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_SSE_GENERIC
> +	bool "SSE_GENERIC"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_VIAC3
> +	bool "VIAC3"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_NANO
> +	bool "NANO"
> +	depends on BR2_i386 || BR2_x86_64
> +config BR2_PACKAGE_OPENBLAS_TARGET_POWER4
> +	bool "POWER4"
> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
> +config BR2_PACKAGE_OPENBLAS_TARGET_POWER5
> +	bool "POWER5"
> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
> +config BR2_PACKAGE_OPENBLAS_TARGET_POWER6
> +	bool "POWER6"
> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
> +config BR2_PACKAGE_OPENBLAS_TARGET_POWER7
> +	bool "POWER7"
> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
> +config BR2_PACKAGE_OPENBLAS_TARGET_POWER8
> +	bool "POWER8"
> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
> +config BR2_PACKAGE_OPENBLAS_TARGET_PPCG4
> +	bool "PPCG4"
> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
> +config BR2_PACKAGE_OPENBLAS_TARGET_PPC970
> +	bool "PPC970"
> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
> +config BR2_PACKAGE_OPENBLAS_TARGET_PPC970MP
> +	bool "PPC970MP"
> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
> +config BR2_PACKAGE_OPENBLAS_TARGET_PPC440
> +	bool "PPC440"
> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
> +config BR2_PACKAGE_OPENBLAS_TARGET_PPC440FP2
> +	bool "PPC440FP2"
> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
> +config BR2_PACKAGE_OPENBLAS_TARGET_CELL
> +	bool "CELL"
> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
> +config BR2_PACKAGE_OPENBLAS_TARGET_P5600
> +	bool "P5600"
> +	depends on BR2_mips || BR2_mipsel
> +config BR2_PACKAGE_OPENBLAS_TARGET_SICORTEX
> +	bool "SICORTEX"
> +	depends on BR2_mips64 || BR2_mips64el
> +config BR2_PACKAGE_OPENBLAS_TARGET_LOONGSON3A
> +	bool "LOONGSON3A"
> +	depends on BR2_mips64 || BR2_mips64el
> +config BR2_PACKAGE_OPENBLAS_TARGET_LOONGSON3B
> +	bool "LOONGSON3B"
> +	depends on BR2_mips64 || BR2_mips64el
> +config BR2_PACKAGE_OPENBLAS_TARGET_I6400
> +	bool "I6400"
> +	depends on BR2_mips64 || BR2_mips64el
> +config BR2_PACKAGE_OPENBLAS_TARGET_SPARC
> +	bool "SPARC"
> +	depends on BR2_sparc || BR2_sparc64
> +config BR2_PACKAGE_OPENBLAS_TARGET_SPARCV7
> +	bool "SPARCV7"
> +	depends on BR2_sparc || BR2_sparc64
> +config BR2_PACKAGE_OPENBLAS_TARGET_CORTEXA15
> +	bool "CORTEXA15"
> +	depends on BR2_arm || BR2_armeb
> +config BR2_PACKAGE_OPENBLAS_TARGET_CORTEXA9
> +	bool "CORTEXA9"
> +	depends on BR2_arm || BR2_armeb
> +config BR2_PACKAGE_OPENBLAS_TARGET_ARMV7
> +	bool "ARMV7"
> +	depends on BR2_arm || BR2_armeb
> +config BR2_PACKAGE_OPENBLAS_TARGET_ARMV6
> +	bool "ARMV6"
> +	depends on BR2_arm || BR2_armeb
> +config BR2_PACKAGE_OPENBLAS_TARGET_ARMV5
> +	bool "ARMV5"
> +	depends on BR2_arm || BR2_armeb
> +config BR2_PACKAGE_OPENBLAS_TARGET_ARMV8
> +	bool "ARMV8"
> +	depends on BR2_aarch64 || BR2_aarch64_be
> +config BR2_PACKAGE_OPENBLAS_TARGET_CORTEXA57
> +	bool "CORTEXA57"
> +	depends on BR2_aarch64 || BR2_aarch64_be

Do we really need this choice? What about directly using the
architecture symbols?

I.e, replace what you have below by:

config BR2_PACKAGE_OPENBLAS_TARGET
	string
	default "ATOM"	if BR2_x86_atom
	default "CORE2"	if BR2_x86_core2
	...
	default "CORTEXA15" if BR2_cortex_a15
	...

> new file mode 100644
> index 0000000..5e6f417
> --- /dev/null
> +++ b/package/openblas/openblas.mk
> @@ -0,0 +1,54 @@
> +################################################################################
> +#
> +# openblas
> +#
> +################################################################################
> +
> +OPENBLAS_VERSION = 7a190653698ecd6576653109adbae5b805278c7e
> +OPENBLAS_SITE = $(call github,xianyi,OpenBLAS,$(OPENBLAS_VERSION))
> +OPENBLAS_LICENSE = BSD-3
> +OPENBLAS_LICENSE_FILES = LICENSE
> +OPENBLAS_INSTALL_STAGING = YES
> +OPENBLAS_PATCH = https://github.com/vriera/OpenBLAS/commit/e12cff87b86615f5a4643d246a6c1963a0e81ca5.patch

I think that for such small patches, that are not taken from upstream,
my preference is to have them in Buildroot itself rather than
downloaded by <pkg>_PATCH.

> +
> +# Disable fortran if the fortran compiler doesn't actually exist.
> +ifeq ($(wildcard $(TARGET_FC)),)

I don't really like this way of testing if we have Fortran support. We
probably want some kind of BR2_TOOLCHAIN_HAS_FORTRAN hidden config
option. Talk with Samuel, I think he had some patches that were adding
this kind of stuff for the external toolchains.

> +OPENBLAS_MAKE_OPTS += ONLY_CBLAS=1
> +endif
> +
> +# Enable/Disable multi-threading (not for static-only since it uses dlfcn.h)
> +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)x$(BR2_STATIC_LIBS),yx)
> +OPENBLAS_MAKE_OPTS += USE_THREAD=1
> +# Take advantage of OpenMP if we have support for it
> +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y)
> +OPENBLAS_MAKE_OPTS += USE_OPENMP=1

It seems weird that OpenMP is related to NPTL thread support. OpenMP is
a separate feature of the toolchain, see the option
BR2_GCC_ENABLE_OPENMP for internal toolchains.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH v3 next] openblas: new package
  2016-05-19 12:21 ` Thomas Petazzoni
@ 2016-05-19 13:42   ` Vicente Olivert Riera
  2016-05-19 14:00     ` Thomas Petazzoni
  0 siblings, 1 reply; 12+ messages in thread
From: Vicente Olivert Riera @ 2016-05-19 13:42 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On 19/05/16 13:21, Thomas Petazzoni wrote:
> Hello,
> 
> On Thu, 19 May 2016 11:10:02 +0100, Vicente Olivert Riera wrote:
> 
>> +choice
>> +	prompt "OpenBLAS target CPU"
>> +	help
>> +	  OpenBLAS target CPU
>> +
>> +config BR2_PACKAGE_OPENBLAS_TARGET_P2
>> +	bool "P2"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_KATMAI
>> +	bool "KATMAI"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_COPPERMINE
>> +	bool "COPPERMINE"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_NORTHWOOD
>> +	bool "NORTHWOOD"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_PRESCOTT
>> +	bool "PRESCOTT"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_BANIAS
>> +	bool "BANIAS"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_YONAH
>> +	bool "YONAH"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_CORE2
>> +	bool "CORE2"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_PENRYN
>> +	bool "PENRYN"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_DUNNINGTON
>> +	bool "DUNNINGTON"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_NEHALEM
>> +	bool "NEHALEM"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_SANDYBRIDGE
>> +	bool "SANDYBRIDGE"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_HASWELL
>> +	bool "HASWELL"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_ATOM
>> +	bool "ATOM"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_ATHLON
>> +	bool "ATHLON"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_OPTERON
>> +	bool "OPTERON"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_OPTERON_SSE3
>> +	bool "OPTERON_SSE3"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_BARCELONA
>> +	bool "BARCELONA"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_SHANGHAI
>> +	bool "SHANGHAI"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_ISTANBUL
>> +	bool "ISTANBUL"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_BOBCAT
>> +	bool "BOBCAT"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_BULLDOZER
>> +	bool "BULLDOZER"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_PILEDRIVER
>> +	bool "PILEDRIVER"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_STEAMROLLER
>> +	bool "STEAMROLLER"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_EXCAVATOR
>> +	bool "EXCAVATOR"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_SSE_GENERIC
>> +	bool "SSE_GENERIC"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_VIAC3
>> +	bool "VIAC3"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_NANO
>> +	bool "NANO"
>> +	depends on BR2_i386 || BR2_x86_64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_POWER4
>> +	bool "POWER4"
>> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
>> +config BR2_PACKAGE_OPENBLAS_TARGET_POWER5
>> +	bool "POWER5"
>> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
>> +config BR2_PACKAGE_OPENBLAS_TARGET_POWER6
>> +	bool "POWER6"
>> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
>> +config BR2_PACKAGE_OPENBLAS_TARGET_POWER7
>> +	bool "POWER7"
>> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
>> +config BR2_PACKAGE_OPENBLAS_TARGET_POWER8
>> +	bool "POWER8"
>> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
>> +config BR2_PACKAGE_OPENBLAS_TARGET_PPCG4
>> +	bool "PPCG4"
>> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
>> +config BR2_PACKAGE_OPENBLAS_TARGET_PPC970
>> +	bool "PPC970"
>> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
>> +config BR2_PACKAGE_OPENBLAS_TARGET_PPC970MP
>> +	bool "PPC970MP"
>> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
>> +config BR2_PACKAGE_OPENBLAS_TARGET_PPC440
>> +	bool "PPC440"
>> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
>> +config BR2_PACKAGE_OPENBLAS_TARGET_PPC440FP2
>> +	bool "PPC440FP2"
>> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
>> +config BR2_PACKAGE_OPENBLAS_TARGET_CELL
>> +	bool "CELL"
>> +	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
>> +config BR2_PACKAGE_OPENBLAS_TARGET_P5600
>> +	bool "P5600"
>> +	depends on BR2_mips || BR2_mipsel
>> +config BR2_PACKAGE_OPENBLAS_TARGET_SICORTEX
>> +	bool "SICORTEX"
>> +	depends on BR2_mips64 || BR2_mips64el
>> +config BR2_PACKAGE_OPENBLAS_TARGET_LOONGSON3A
>> +	bool "LOONGSON3A"
>> +	depends on BR2_mips64 || BR2_mips64el
>> +config BR2_PACKAGE_OPENBLAS_TARGET_LOONGSON3B
>> +	bool "LOONGSON3B"
>> +	depends on BR2_mips64 || BR2_mips64el
>> +config BR2_PACKAGE_OPENBLAS_TARGET_I6400
>> +	bool "I6400"
>> +	depends on BR2_mips64 || BR2_mips64el
>> +config BR2_PACKAGE_OPENBLAS_TARGET_SPARC
>> +	bool "SPARC"
>> +	depends on BR2_sparc || BR2_sparc64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_SPARCV7
>> +	bool "SPARCV7"
>> +	depends on BR2_sparc || BR2_sparc64
>> +config BR2_PACKAGE_OPENBLAS_TARGET_CORTEXA15
>> +	bool "CORTEXA15"
>> +	depends on BR2_arm || BR2_armeb
>> +config BR2_PACKAGE_OPENBLAS_TARGET_CORTEXA9
>> +	bool "CORTEXA9"
>> +	depends on BR2_arm || BR2_armeb
>> +config BR2_PACKAGE_OPENBLAS_TARGET_ARMV7
>> +	bool "ARMV7"
>> +	depends on BR2_arm || BR2_armeb
>> +config BR2_PACKAGE_OPENBLAS_TARGET_ARMV6
>> +	bool "ARMV6"
>> +	depends on BR2_arm || BR2_armeb
>> +config BR2_PACKAGE_OPENBLAS_TARGET_ARMV5
>> +	bool "ARMV5"
>> +	depends on BR2_arm || BR2_armeb
>> +config BR2_PACKAGE_OPENBLAS_TARGET_ARMV8
>> +	bool "ARMV8"
>> +	depends on BR2_aarch64 || BR2_aarch64_be
>> +config BR2_PACKAGE_OPENBLAS_TARGET_CORTEXA57
>> +	bool "CORTEXA57"
>> +	depends on BR2_aarch64 || BR2_aarch64_be
> 
> Do we really need this choice? What about directly using the
> architecture symbols?
> 
> I.e, replace what you have below by:
> 
> config BR2_PACKAGE_OPENBLAS_TARGET
> 	string
> 	default "ATOM"	if BR2_x86_atom
> 	default "CORE2"	if BR2_x86_core2
> 	...
> 	default "CORTEXA15" if BR2_cortex_a15
> 	...

No, we cannot do that because there isn't only one OpenBLAS target per
BR arch symbol. For instance, for mips64 there are 3 OpenBLAS targets
available. For x86 there are lots of them. Same for x86_64. Plust the
user may want to build a generic buildroot (because it doesn't have
specific support for certain core) and build OpenBLAS for that core.

>> new file mode 100644
>> index 0000000..5e6f417
>> --- /dev/null
>> +++ b/package/openblas/openblas.mk
>> @@ -0,0 +1,54 @@
>> +################################################################################
>> +#
>> +# openblas
>> +#
>> +################################################################################
>> +
>> +OPENBLAS_VERSION = 7a190653698ecd6576653109adbae5b805278c7e
>> +OPENBLAS_SITE = $(call github,xianyi,OpenBLAS,$(OPENBLAS_VERSION))
>> +OPENBLAS_LICENSE = BSD-3
>> +OPENBLAS_LICENSE_FILES = LICENSE
>> +OPENBLAS_INSTALL_STAGING = YES
>> +OPENBLAS_PATCH = https://github.com/vriera/OpenBLAS/commit/e12cff87b86615f5a4643d246a6c1963a0e81ca5.patch
> 
> I think that for such small patches, that are not taken from upstream,
> my preference is to have them in Buildroot itself rather than
> downloaded by <pkg>_PATCH.

I remember someone told me that we prefer this method when possible...
Anyway my pull request has been merged so if I have to respin this patch
I will just bump the version and get rid of the patch.

>> +
>> +# Disable fortran if the fortran compiler doesn't actually exist.
>> +ifeq ($(wildcard $(TARGET_FC)),)
> 
> I don't really like this way of testing if we have Fortran support. We
> probably want some kind of BR2_TOOLCHAIN_HAS_FORTRAN hidden config
> option. Talk with Samuel, I think he had some patches that were adding
> this kind of stuff for the external toolchains.

Yeah, that would be great, but we don't have it right now. I wrote a
patch for SSP toolchain support and it's taking ages to get applied. I
don't know if I want to wait for another patch for the
BR2_TOOLCHAIN_HAS_FORTRAN stuff to get applied before adding this
package to Buildroot. Why don't do that in the future? Add the package
now. When we have that toolchain-has-fortran thing available, then we
modify the package to use it.

>> +OPENBLAS_MAKE_OPTS += ONLY_CBLAS=1
>> +endif
>> +
>> +# Enable/Disable multi-threading (not for static-only since it uses dlfcn.h)
>> +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)x$(BR2_STATIC_LIBS),yx)
>> +OPENBLAS_MAKE_OPTS += USE_THREAD=1
>> +# Take advantage of OpenMP if we have support for it
>> +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y)
>> +OPENBLAS_MAKE_OPTS += USE_OPENMP=1
> 
> It seems weird that OpenMP is related to NPTL thread support. OpenMP is
> a separate feature of the toolchain, see the option
> BR2_GCC_ENABLE_OPENMP for internal toolchains.

Well, I've read here [1] that "OpenMP is available for most platforms
that support POSIX threads".

1: https://wiki.linaro.org/WorkingGroups/ToolChain/OptimizationDescriptions

Regards,

Vincent.

> Thomas
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH v3 next] openblas: new package
  2016-05-19 13:42   ` Vicente Olivert Riera
@ 2016-05-19 14:00     ` Thomas Petazzoni
  2016-05-19 21:15       ` Arnout Vandecappelle
  2016-05-20  8:31       ` Vicente Olivert Riera
  0 siblings, 2 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2016-05-19 14:00 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 19 May 2016 14:42:46 +0100, Vicente Olivert Riera wrote:

> > config BR2_PACKAGE_OPENBLAS_TARGET
> > 	string
> > 	default "ATOM"	if BR2_x86_atom
> > 	default "CORE2"	if BR2_x86_core2
> > 	...
> > 	default "CORTEXA15" if BR2_cortex_a15
> > 	...  
> 
> No, we cannot do that because there isn't only one OpenBLAS target per
> BR arch symbol. For instance, for mips64 there are 3 OpenBLAS targets
> available. For x86 there are lots of them. Same for x86_64. Plust the
> user may want to build a generic buildroot (because it doesn't have
> specific support for certain core) and build OpenBLAS for that core.

For x86 and x86_64, we have sub-options that specify which CPU is being
used. Look at my example above, which shows that ATOM and CORE2 can be
found by looking at the BR2_x86_<foo> options.

Regarding MIPS64, what are the practical differences between the
following options?

+config BR2_PACKAGE_OPENBLAS_TARGET_SICORTEX
+	bool "SICORTEX"
+	depends on BR2_mips64 || BR2_mips64el
+config BR2_PACKAGE_OPENBLAS_TARGET_LOONGSON3A
+	bool "LOONGSON3A"
+	depends on BR2_mips64 || BR2_mips64el
+config BR2_PACKAGE_OPENBLAS_TARGET_LOONGSON3B
+	bool "LOONGSON3B"
+	depends on BR2_mips64 || BR2_mips64el
+config BR2_PACKAGE_OPENBLAS_TARGET_I6400
+	bool "I6400"
+	depends on BR2_mips64 || BR2_mips64el

If there are some practical differences in terms of gcc options being
used, then it probably means that we need to add additional
sub-architectures in arch/Config.in.mips.

> > I think that for such small patches, that are not taken from upstream,
> > my preference is to have them in Buildroot itself rather than
> > downloaded by <pkg>_PATCH.  
> 
> I remember someone told me that we prefer this method when possible...

Yeah, we don't have a very fixed policy on this. My own thinking is
that it's fine to use <pkg>_PATCH to fetch patches that are already
otherwise available (from another distribution or from upstream), but
when it's done by "us", it's better to have the patch in Buildroot
itself. But I agree that the line between both solutions is thin.

> Anyway my pull request has been merged so if I have to respin this patch
> I will just bump the version and get rid of the patch.

Good!

> >> +# Disable fortran if the fortran compiler doesn't actually exist.
> >> +ifeq ($(wildcard $(TARGET_FC)),)  
> > 
> > I don't really like this way of testing if we have Fortran support. We
> > probably want some kind of BR2_TOOLCHAIN_HAS_FORTRAN hidden config
> > option. Talk with Samuel, I think he had some patches that were adding
> > this kind of stuff for the external toolchains.  
> 
> Yeah, that would be great, but we don't have it right now. I wrote a
> patch for SSP toolchain support and it's taking ages to get applied.
> I don't know if I want to wait for another patch for the
> BR2_TOOLCHAIN_HAS_FORTRAN stuff to get applied before adding this
> package to Buildroot. Why don't do that in the future? Add the package
> now. When we have that toolchain-has-fortran thing available, then we
> modify the package to use it.

So, for the moment, just disable Fortran support unconditionally, and
in a follow-up patch you can enable Fortran support.

> > It seems weird that OpenMP is related to NPTL thread support. OpenMP is
> > a separate feature of the toolchain, see the option
> > BR2_GCC_ENABLE_OPENMP for internal toolchains.  
> 
> Well, I've read here [1] that "OpenMP is available for most platforms
> that support POSIX threads".

If the support has been enabled in the compiler, which is what I'm
talking about. Have you tried your packages with a Buildroot internal
toolchain, with OpenMP support disabled?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH v3 next] openblas: new package
  2016-05-19 14:00     ` Thomas Petazzoni
@ 2016-05-19 21:15       ` Arnout Vandecappelle
  2016-05-20  8:31       ` Vicente Olivert Riera
  1 sibling, 0 replies; 12+ messages in thread
From: Arnout Vandecappelle @ 2016-05-19 21:15 UTC (permalink / raw)
  To: buildroot

On 05/19/16 16:00, Thomas Petazzoni wrote:
> Hello,
> 
> On Thu, 19 May 2016 14:42:46 +0100, Vicente Olivert Riera wrote:
[snip]
>>> > > I think that for such small patches, that are not taken from upstream,
>>> > > my preference is to have them in Buildroot itself rather than
>>> > > downloaded by <pkg>_PATCH.  
>> > 
>> > I remember someone told me that we prefer this method when possible...
>
> Yeah, we don't have a very fixed policy on this. My own thinking is
> that it's fine to use <pkg>_PATCH to fetch patches that are already
> otherwise available (from another distribution or from upstream), but
> when it's done by "us", it's better to have the patch in Buildroot
> itself. But I agree that the line between both solutions is thin.

 I indeed once wrote "we prefer to download patches through FOO_PATCH rather
than including it". I think in that particular case it was a patch from a
different distro. Anyway, I didn't really think it through at the time. I
certainly agree that it should only be for upstream patches, and maybe also
patches from different distros.

 Regards,
 Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH v3 next] openblas: new package
  2016-05-19 14:00     ` Thomas Petazzoni
  2016-05-19 21:15       ` Arnout Vandecappelle
@ 2016-05-20  8:31       ` Vicente Olivert Riera
  2016-05-20  9:00         ` Thomas Petazzoni
  1 sibling, 1 reply; 12+ messages in thread
From: Vicente Olivert Riera @ 2016-05-20  8:31 UTC (permalink / raw)
  To: buildroot

Hello Samuel,

On 19/05/16 15:00, Thomas Petazzoni wrote:
>>>> > >> +# Disable fortran if the fortran compiler doesn't actually exist.
>>>> > >> +ifeq ($(wildcard $(TARGET_FC)),)  
>>> > > 
>>> > > I don't really like this way of testing if we have Fortran support. We
>>> > > probably want some kind of BR2_TOOLCHAIN_HAS_FORTRAN hidden config
>>> > > option. Talk with Samuel, I think he had some patches that were adding
>>> > > this kind of stuff for the external toolchains.  

do you have those patches Thomas is talking about? If so, do you plan to
send them to the ML?

Regards,

Vincent.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH v3 next] openblas: new package
  2016-05-20  8:31       ` Vicente Olivert Riera
@ 2016-05-20  9:00         ` Thomas Petazzoni
  2016-05-20 21:07           ` Samuel Martin
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Petazzoni @ 2016-05-20  9:00 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 20 May 2016 09:31:51 +0100, Vicente Olivert Riera wrote:

> do you have those patches Thomas is talking about? If so, do you plan to
> send them to the ML?

See: https://github.com/tSed/buildroot/commits/sma/ext-toolchain-options

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH v3 next] openblas: new package
  2016-05-20  9:00         ` Thomas Petazzoni
@ 2016-05-20 21:07           ` Samuel Martin
  2016-05-23  9:16             ` Vicente Olivert Riera
  0 siblings, 1 reply; 12+ messages in thread
From: Samuel Martin @ 2016-05-20 21:07 UTC (permalink / raw)
  To: buildroot

Hi Vicente, all,

On Fri, May 20, 2016 at 11:00 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Fri, 20 May 2016 09:31:51 +0100, Vicente Olivert Riera wrote:
>
>> do you have those patches Thomas is talking about? If so, do you plan to
>> send them to the ML?
>
> See: https://github.com/tSed/buildroot/commits/sma/ext-toolchain-options

Yes, I will send them at some point ;-)
In its current state the branch should be easily rebased on master I think.
But there is some part of this work that could benefit from the shell
module work from this series [1], so I'm waiting for this series [1]
to be merged before.
I plan to poke people about [1] as soon as the 2016.05 release is out,
and continue works based on it.


[1] http://patchwork.ozlabs.org/bundle/smartin/rpath_v9_part01/

Regards,

-- 
Samuel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH v3 next] openblas: new package
  2016-05-20 21:07           ` Samuel Martin
@ 2016-05-23  9:16             ` Vicente Olivert Riera
  0 siblings, 0 replies; 12+ messages in thread
From: Vicente Olivert Riera @ 2016-05-23  9:16 UTC (permalink / raw)
  To: buildroot

Thanks Samuel.

Regards,

Vincent.

On 20/05/16 22:07, Samuel Martin wrote:
> Hi Vicente, all,
> 
> On Fri, May 20, 2016 at 11:00 AM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
>> Hello,
>>
>> On Fri, 20 May 2016 09:31:51 +0100, Vicente Olivert Riera wrote:
>>
>>> do you have those patches Thomas is talking about? If so, do you plan to
>>> send them to the ML?
>>
>> See: https://github.com/tSed/buildroot/commits/sma/ext-toolchain-options
> 
> Yes, I will send them at some point ;-)
> In its current state the branch should be easily rebased on master I think.
> But there is some part of this work that could benefit from the shell
> module work from this series [1], so I'm waiting for this series [1]
> to be merged before.
> I plan to poke people about [1] as soon as the 2016.05 release is out,
> and continue works based on it.
> 
> 
> [1] http://patchwork.ozlabs.org/bundle/smartin/rpath_v9_part01/
> 
> Regards,
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-05-23  9:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-19 10:10 [Buildroot] [PATCH v3 next] openblas: new package Vicente Olivert Riera
2016-05-19 10:17 ` Baruch Siach
2016-05-19 10:55   ` Vicente Olivert Riera
2016-05-19 11:12     ` Baruch Siach
2016-05-19 12:21 ` Thomas Petazzoni
2016-05-19 13:42   ` Vicente Olivert Riera
2016-05-19 14:00     ` Thomas Petazzoni
2016-05-19 21:15       ` Arnout Vandecappelle
2016-05-20  8:31       ` Vicente Olivert Riera
2016-05-20  9:00         ` Thomas Petazzoni
2016-05-20 21:07           ` Samuel Martin
2016-05-23  9:16             ` Vicente Olivert Riera

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.