|
Uni20
Asynchronous tensor and runtime library.
|
Uni20 can optionally use MPLAPACK 3.0.0 or newer as its binary128 BLAS/LAPACK backend. This enables uni20::float128, its complex counterpart, and the scalar-generic tensor, BlockTensor, Krylov, and tensor-network paths backed by those provider operations.
The default dependency mode is AUTO: CMake prefers a compatible installed MPLAPACK package with the binary128 component and otherwise fetches the MPLAPACK 3.0.0 release. Configure the ordinary fetched path with:
The fetched build selects reference components for the enabled scalar families: binary128, native binary80 when available (UNI20_ENABLE_FLOAT80=AUTO), and the MPFR/MPC backend when UNI20_ENABLE_MPREAL=ON. MPLAPACK's other scalar backends, optimized duplicate library, examples, tests, benchmarks, CUDA, and OpenCL targets remain disabled.
With UNI20_BACKEND_MPLAPACK=OFF, float128 and complex256 still work: the binary128 package supplies scalar headers and math, but Uni20 does not register its BLAS/LAPACK kernels. See scalar configuration.
Use UNI20_USE_SYSTEM_MPLAPACK to select the normal Uni20 dependency modes:
| value | behavior |
|---|---|
AUTO | Prefer an installed MPLAPACK 3.0.0 or newer package with binary128; otherwise fetch v3.0.0. |
ON | Require a compatible installed package and fail if it is unavailable. |
OFF | Always fetch the pinned v3.0.0 source. |
MPLAPACK 3.0.0 exposes one self-contained library per precision. Uni20 consumes:
The pre-release split between separate mpblas_binary128 and mplapack_binary128 libraries is not part of the supported package contract.
To provide a system package explicitly, build MPLAPACK 3.0.0 or newer as GNU++23 with only the required backend:
The configure output should report a real binary128 backend, for example:
Then require that installed package when configuring Uni20:
Pointing directly at the MPLAPACK build tree also works while developing MPLAPACK itself:
Build and run the MPLAPACK-gated Uni20 probes:
Uni20 requires the public MPLAPACK 3.0.0 package surface. The fetched dependency is pinned to tag v3.0.0; compatible installed packages must report version 3.0.0 or newer and provide the binary128 component.
Do not build a system MPLAPACK package for Uni20 in GNU++17 mode. The package may build successfully in GNU++17 mode, but the installed headers can record GNU++17 feature-test results. When those headers are later consumed from Uni20's C++23 build, fallback overload decisions may not match the consuming translation unit. Building MPLAPACK itself as GNU++23 keeps the installed configuration aligned with Uni20. The fetched configuration sets this automatically.
If UNI20_USE_SYSTEM_MPLAPACK=ON cannot find MPLAPACK, check the package path:
Then pass either the install prefix through CMAKE_PREFIX_PATH or the directory containing mplapackConfig.cmake through mplapack_DIR.
If Uni20 configures but binary128 wrappers are disabled or tests are skipped, inspect the generated MPLAPACK configuration:
MPLAPACK_BINARY128_MODE_LDBL is not accepted as Uni20's binary128 backend; use a real binary128 mode such as _Float128 or quadmath.