Skip to content

Commit

Permalink
Update docs on OpenBLAS dependency API
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
rgommers committed Jan 7, 2023
1 parent 2e00831 commit e213fb4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docs/markdown/Dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,20 @@ The `version` and `interface` keywords may be passed to request the use of a
specific version and interface, correspondingly:

```meson
openblas_dep = dependency('openblas', version : '>=0.3.21', interface : 'ilp64')
openblas_dep = dependency('openblas',
version : '>=0.3.21',
language: 'c', # can be c/cpp/fortran
modules: [
'interface: ilp64', # can be lp64 or ilp64 (or auto?)
'symbol-suffix: 64_', # check/auto-detect? default to 64_ or no suffix?
'cblas',
]
)
# Query properties as needed:
has_cblas = openblas.get_variable('cblas')
is_ilp64 = openblas_dep.get_variable('interface') == 'ilp64'
blas_symbol_suffix = openblas_dep.get_variable('symbol-suffix')
```

If OpenBLAS is installed in a nonstandard location *with* pkg-config files,
Expand Down
4 changes: 4 additions & 0 deletions mesonbuild/dependencies/blas_lapack.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ def detect(self, lib_dirs: T.Optional[T.List[str]] = None, inc_dirs: T.Optional[
if inc_dirs is None:
inc_dirs = []

# TODO: add the default symbol suffix for ilp64 ("64_"), check that
# symbols are present in the library, and then store a validated symbol
# suffix. Also check for availability of CBLAS interface (`dgemm_` -> `cblas_dgemm`)
# See `self.run_check` below.
if self.interface == 'lp64':
libnames = ['openblas']
elif self.interface == 'ilp64':
Expand Down

0 comments on commit e213fb4

Please sign in to comment.