Skip to content

Commit

Permalink
openblas: improvements to 0.3.28 patch files
Browse files Browse the repository at this point in the history
  • Loading branch information
rgommers authored and jpakkane committed Dec 11, 2024
1 parent 0e2df85 commit a5fdfe2
Show file tree
Hide file tree
Showing 14 changed files with 163 additions and 112 deletions.
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -2738,6 +2738,7 @@
"openblas"
],
"versions": [
"0.3.28-2",
"0.3.28-1"
]
},
Expand Down
4 changes: 2 additions & 2 deletions subprojects/packagefiles/openblas/ctest/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ foreach lvl : lvls
executable(
op_name,
sources: mapped_sources,
link_with: [openblas_static],
dependencies: [dependency('threads')],
link_with: openblas,
dependencies: threads_dep,
include_directories: ctest_inc,
c_args: ['-DADD_', '-DCBLAS'],
)
Expand Down
5 changes: 2 additions & 3 deletions subprojects/packagefiles/openblas/driver/level2/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,10 @@ foreach _kop : driver_kops

# Iterate through each mode
foreach mode : modes
if is_win # extensions are not present on Windows
if mode in ['x', 'q']
# Extended precision modes not implemented on Windows
if mode in ['x', 'q'] and (is_win or not get_option('use_xblas'))
continue
endif
endif
# Generate the mapping for the type
__cargs = _cargs + _ckop_args
prec_mode = precision_mappings[mode]
Expand Down
6 changes: 2 additions & 4 deletions subprojects/packagefiles/openblas/interface/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
interface_args = cc.get_supported_arguments(
f'-include @_mbproot@/simd_conf.h',
)
interface_args = []
# if not build_without_cblas
# interface_args += '-DCBLAS'
# endif
Expand Down Expand Up @@ -406,7 +404,7 @@ _blas_roots = [
},
]

if not is_win
if not is_win and not get_option('build_without_lapack')
subdir('lapack')
_blas_roots += _lapack_interface_roots
endif
Expand Down
7 changes: 3 additions & 4 deletions subprojects/packagefiles/openblas/kernel/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ if CGEMM3M_UNROLL_M.to_int() > 8
CGEMM3M_UNROLL_M = 8
endif

subdir('meson_base')
subdir('x86_64')
subdir('arm64')

# TODO: This is currently following x86_64 generic for src and dir, but it needs
# to diversify
# NOTE: The def and undefs are from Makefile.L1
Expand Down Expand Up @@ -1085,9 +1081,11 @@ base_kops = [
},
]

subdir('meson_base') # defines base_dict
search_order = [base_dict]

if conf_hdat.has('ARCH_X86_64')
subdir('x86_64')
search_order = [x86_64_base_dict] + search_order
if conf_hdat.has('HASWELL')
search_order = [x86_64_haswell_dict] + search_order
Expand All @@ -1099,6 +1097,7 @@ if conf_hdat.has('ARCH_X86_64')
search_order = [x86_64_sandybridge_dict] + search_order
endif
elif conf_hdat.has('ARCH_ARM64')
subdir('arm64')
search_order = [arm64_base_dict] + search_order
if conf_hdat.has('ARMV8')
search_order = [arm64_armv8_dict] + search_order
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# _cblas3 -- Single precision complex BLAS3 routines

# _allblas -- Auxiliary routines for Level 2 and 3 BLAS
_allblas = library('_allblas',
_allblas = static_library('_allblas',
sources: [ 'lsame.f', 'xerbla.f', 'xerbla_array.f' ])


Expand Down Expand Up @@ -279,6 +279,5 @@ endif
netlib_blas = library(_netlib_blas_name,
sources: _blas_netlib_srcs,
link_with: _allblas,
version: lapack_version,
soversion: lapack_major_version,
install: true)
install: true,
kwargs: lapack_version_kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ foreach _test : _blas_input_test_array
link_with : netlib_blas,
)
test_exe = meson.current_build_dir() / _test.get(1)
input_file = meson.source_root() + '/lapack-netlib/BLAS/TESTING/' + _test.get(3)
input_file = meson.project_source_root() + '/lapack-netlib/BLAS/TESTING/' + _test.get(3)
test(_test.get(0), fortran_test_runner,
args: [test_exe, input_file],
workdir: meson.current_build_dir())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ if not use_c_lapack
'sroundup_lwork.f',
]
endif
_int_cpu = library('_int_cpu',
sources: _int_cpu_srcs,
version: lapack_version,
soversion: lapack_major_version,
install: true)
_int_cpu = static_library('_int_cpu', sources: _int_cpu_srcs)
else
_install_aux_srcs += ['ilaver.c', 'lsame.c']

Expand All @@ -58,9 +54,6 @@ else

endif

_install_aux = library('_install_aux',
sources: _install_aux_srcs,
link_with: _ia_linkwith,
version: lapack_version,
soversion: lapack_major_version,
install: true)
_install_aux = static_library('_install_aux',
sources: _install_aux_srcs,
link_with: _ia_linkwith)
36 changes: 18 additions & 18 deletions subprojects/packagefiles/openblas/lapack-netlib/SRC/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,19 @@ _allaux = [
'ilaenv.f', 'ilaenv2stage.f', 'ieeeck.f', 'lsamen.f', 'iparmq.f',
'iparam2stage.F', 'ilaprec.f', 'ilatrans.f', 'ilauplo.f', 'iladiag.f',
'chla_transtype.f', 'la_xisnan.F90', 'la_constants.f90',
'xerbla_array.f',
]

_deps = []
_libs = [ _allblas, _install_aux ]
# _auxlapack -- Auxiliary routines for lapack
_auxlapack = library('_auxlapack',
_auxlapack = static_library('_auxlapack',
sources: _allaux,
link_with: _libs,
link_with: _allblas,
link_whole: _install_aux,
)
_libs += _auxlapack


# All other sources
_lapack_netlib_srcs = []


# _slaux -- Auxiliary routines called from single precision
# Needs _int_cpu and _install_aux
# For sroundup_lwork.f
Expand Down Expand Up @@ -471,6 +468,8 @@ _zxlasrc = [
]

# Start making the lapack target
_libs = [_allblas]
_deps = []
if use_xblas
_lapack_netlib_srcs += _sxlasrc + _dxlasrc + _cxlasrc + _zxlasrc
_deps = dependency('xblas')
Expand All @@ -494,19 +493,20 @@ if prec == 'z' or build_complex16 or build_all_prec
_lapack_netlib_srcs += _zlasrc + _zclasrc + _dzlaux
endif

# Create the blas library
# Create the lapack library
netlib_lapack = library(_netlib_lapack_name,
sources: _lapack_netlib_srcs,
link_with: _libs,
version: lapack_version,
soversion: lapack_major_version,
link_whole: [_auxlapack],
install: true,
)
kwargs: lapack_version_kwargs)

pkg.generate(netlib_lapack,
name: 'lapack',
filebase: 'meson-lapack',
description: 'lapack via meson build',
version: f'@pkg_ver@_lapack',
install_dir: pkg_install_dir,
)
if not as_subproject
pkg.generate(netlib_lapack,
name: 'lapack',
filebase: 'meson-lapack',
description: 'lapack via meson build',
version: f'@pkg_ver@_lapack',
install_dir: pkg_install_dir,
)
endif
7 changes: 7 additions & 0 deletions subprojects/packagefiles/openblas/lapack-netlib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ lapack_minor_version = 12
lapack_patch_version = 0
lapack_version = f'@lapack_major_version@.@lapack_minor_version@.@lapack_patch_version@'

if as_subproject
# Avoid creation versioned .so symlinks.
lapack_version_kwargs = {}
else
lapack_version_kwargs = {'version': lapack_version, 'soversion': lapack_major_version}
endif

# Common variables
prec = get_option('realkind')
build_single = get_option('build_single')
Expand Down
Loading

0 comments on commit a5fdfe2

Please sign in to comment.