xref: /OK3568_Linux_fs/buildroot/package/openblas/Config.in (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1config BR2_PACKAGE_OPENBLAS_DEFAULT_TARGET
2	string
3	default "P2"           if BR2_x86_pentium2
4	default "KATMAI"       if BR2_x86_pentium3
5	default "NORTHWOOD"    if BR2_x86_pentium4
6	default "PRESCOTT"     if BR2_x86_prescott || BR2_x86_nocona
7	default "BANIAS"       if BR2_x86_pentium_m
8	default "CORE2"        if BR2_x86_core2
9	default "NEHALEM"      if BR2_x86_corei7 || BR2_x86_silvermont || BR2_x86_westmere
10	default "SANDYBRIDGE"  if BR2_x86_corei7_avx
11	default "HASWELL"      if BR2_x86_core_avx2
12	default "ATOM"         if BR2_x86_atom
13	default "ATHLON"       if BR2_x86_athlon || BR2_x86_athlon_4
14	default "OPTERON"      if BR2_x86_opteron
15	default "OPTERON_SSE3" if BR2_x86_opteron_sse3
16	default "BARCELONA"    if BR2_x86_barcelona
17	default "BOBCAT"       if BR2_x86_jaguar
18	default "STEAMROLLER"  if BR2_x86_steamroller
19	default "VIAC3"        if BR2_x86_c3 || BR2_x86_c32
20	default "POWER4"       if BR2_powerpc_power4
21	default "POWER5"       if BR2_powerpc_power5
22	default "POWER6"       if BR2_powerpc_power6
23	default "POWER7"       if BR2_powerpc_power7
24	default "POWER8"       if BR2_powerpc_power8
25	default "PPCG4"        if BR2_powerpc_7400 || BR2_powerpc_7450
26	default "PPC970"       if BR2_powerpc_970
27	default "PPC440"       if BR2_powerpc_440
28	default "PPC440FP2"    if BR2_powerpc_440fp
29	# P5600 is built with MSA support which is only available in Codescape toolchains
30	default "P5600"        if BR2_mips_p5600 && BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
31	default "SICORTEX"     if BR2_MIPS_CPU_MIPS64
32	# I6400 is built with MSA support which is only available in Codescape toolchains
33	default "I6400"        if BR2_mips_i6400 && BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
34	# OpenBLAS assumes SPARC=Sparc v9
35	default "SPARC"        if BR2_sparc_v9
36	# Cortex-A15 always have a VFPv4
37	default "CORTEXA15"    if (BR2_cortex_a15 && BR2_ARM_EABIHF)
38	# Cortex-A9 have an optional VFPv3, so we need to make sure it
39	# is available
40	default "CORTEXA9"     if (BR2_cortex_a9 && BR2_ARM_EABIHF && \
41				   BR2_ARM_CPU_HAS_VFPV3)
42	default "ARMV5"        if BR2_ARM_CPU_ARMV5
43	# On ARMv6, OpenBLAS assumes that a VFP is available, and
44	# EABIhf is used
45	default "ARMV6"        if (BR2_ARM_CPU_ARMV6 && BR2_ARM_EABIHF && \
46				   BR2_ARM_CPU_HAS_VFPV2)
47	# On ARMv7, OpenBLAS assumes that a full VFPv3+ is available
48	# (and not the more limited D16 variant), and that EABIhf is
49	# used.
50	default "ARMV7"        if (BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF && \
51				   BR2_ARM_CPU_HAS_VFPV3)
52	default "ARMV8"        if BR2_aarch64 || BR2_aarch64_be
53	help
54	  OpenBLAS target CPU. See TargetList.txt in the source tree for
55	  the possible target strings. A possible value is set
56	  automatically based on your Target Architecture Variant.
57
58config BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS
59	bool
60	default y if BR2_PACKAGE_OPENBLAS_DEFAULT_TARGET != ""
61
62config BR2_PACKAGE_OPENBLAS
63	bool "openblas"
64	depends on BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS
65	help
66	  An optimized BLAS library based on GotoBLAS2 1.13 BSD version.
67
68	  https://www.openblas.net/
69
70if BR2_PACKAGE_OPENBLAS
71
72config BR2_PACKAGE_OPENBLAS_TARGET
73	string "OpenBLAS target CPU"
74	default BR2_PACKAGE_OPENBLAS_DEFAULT_TARGET
75
76config BR2_PACKAGE_OPENBLAS_USE_THREAD
77	bool "use multithreading"
78	default y
79	depends on BR2_TOOLCHAIN_HAS_THREADS
80	depends on !BR2_STATIC_LIBS
81	help
82	  Tell OpenBLAS to use multithreading, by passing USE_THREAD=1.
83
84config BR2_PACKAGE_OPENBLAS_USE_LOCKING
85	bool "use locking"
86	default y
87	depends on BR2_TOOLCHAIN_HAS_THREADS
88	depends on !BR2_PACKAGE_OPENBLAS_USE_THREAD
89	help
90	  Tell OpenBLAS to use locking, by passing USE_LOCKING=1.
91	  Locking is implicitly enabled when USE_THREAD=1.
92	  However, if USE_THREAD=0 (i.e. OpenBLAS itself will run in
93	  single-threaded mode) but an application makes OpenBLAS
94	  function calls from multiple threads, then locking is
95	  mandatory for correct operation.
96
97endif
98