Skip to content

Test fails on arm64 blis 2.0 build #904

Open

Description

@ggardet

Test fails on arm64 blis 2.0 build on openSUSE Tumbleweed aarch64.
Configuration used:

[   19s] + export 'CFLAGS=-mbranch-protection=standard -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type  -g'
[   19s] + CFLAGS='-mbranch-protection=standard -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type  -g'
[   19s] + ./configure --disable-rpath --disable-static --enable-verbose-make --enable-cblas --enable-debug=opt --prefix=/usr --libdir=/usr/lib64 --enable-threading=openmp,pthreads arm64
[   19s] configure: detected Linux kernel version 6.17.2-1-default.
[   19s] configure: python interpreter search list is: python python3 python2.
[   19s] configure: found 'python3'.
[   19s] configure: using 'python3' as python interpreter.
[   19s] configure: found python version 3.13.7 (maj: 3, min: 13, rev: 7).
[   19s] configure: python 3.13.7 appears to be supported.
[   19s] configure: C compiler search list is: gcc clang cc.
[   19s] configure: found 'gcc'.
[   19s] configure: using 'gcc' as C compiler.
[   19s] configure: found gcc version 15.2.1 (maj: 15, min: 2, rev: 1).
[   19s] configure: checking for blacklisted configurations due to gcc 15.2.1.
[   19s] configure: warning: gcc 15.2.1 does not support 'knl'; adding to blacklist.
[   19s] configure: checking gcc 15.2.1 against known consequential version ranges.
[   19s] configure: found assembler ('as') version 2.43.1 (maj: 2, min: 43, rev: 1).
[   19s] configure: checking for blacklisted configurations due to as 2.43.1.
[   19s] configure: warning: assembler ('as' 2.43.1) does not support 'bulldozer'; adding to blacklist.
[   19s] configure: warning: assembler ('as' 2.43.1) does not support 'sandybridge'; adding to blacklist.
[   19s] configure: warning: assembler ('as' 2.43.1) does not support 'haswell'; adding to blacklist.
[   19s] configure: warning: assembler ('as' 2.43.1) does not support 'piledriver'; adding to blacklist.
[   19s] configure: warning: assembler ('as' 2.43.1) does not support 'steamroller'; adding to blacklist.
[   19s] configure: warning: assembler ('as' 2.43.1) does not support 'excavator'; adding to blacklist.
[   19s] configure: warning: assembler ('as' 2.43.1) does not support 'skx'; adding to blacklist.
[   19s] configure: configuration blacklist:
[   19s] configure:   knl bulldozer sandybridge haswell piledriver steamroller excavator skx
[   19s] configure: C++ compiler search list is: g++ clang++ c++.
[   19s] configure: found 'g++'.
[   19s] configure: using 'g++' as C++ compiler.
[   19s] configure: Fortran compiler search list is: gfortran ifort ifx nvfortran.
[   19s] configure: found 'gfortran'.
[   19s] configure: using 'gfortran' as Fortran compiler.
[   19s] configure: library archiver search list is: ar.
[   19s] configure: found 'ar'.
[   19s] configure: using 'ar' as library archiver.
[   19s] configure: archive indexer search list is: ranlib.
[   19s] configure: found 'ranlib'.
[   19s] configure: using 'ranlib' as archive indexer.
[   22s] configure: reading configuration registry...done.
[   22s] configure: determining default version string.
[   22s] configure: could not find '.git' directory; using unmodified version file.
[   22s] configure: starting configuration of BLIS 2.0.
[   22s] configure: configuring with official version string.
[   22s] configure: found shared library .so version '4.0.0'.
[   22s] configure:   .so major version: 4
[   22s] configure:   .so minor.build version: 0.0
[   22s] configure: manual configuration requested; configuring with 'arm64'.
[   22s] configure: checking configuration against contents of 'config_registry'.
[   22s] configure: configuration 'arm64' is registered.
[   22s] configure: 'arm64' is defined as having the following sub-configurations:
[   22s] configure:    armsve firestorm thunderx2 cortexa57 cortexa53 generic
[   22s] configure: which collectively require the following kernels:
[   22s] configure:    armsve armv8a generic
[   22s] configure: checking sub-configurations:
[   22s] configure:   'armsve' is registered...and exists.
[   22s] configure:   'firestorm' is registered...and exists.
[   22s] configure:   'thunderx2' is registered...and exists.
[   22s] configure:   'cortexa57' is registered...and exists.
[   22s] configure:   'cortexa53' is registered...and exists.
[   22s] configure:   'generic' is registered...and exists.
[   22s] configure: checking sub-configurations' requisite kernels:
[   22s] configure:   'armsve' kernels...exist.
[   22s] configure:   'armv8a' kernels...exist.
[   22s] configure:   'generic' kernels...exist.
[   23s] configure: detected --prefix='/usr'.
[   23s] configure: no install exec_prefix option given; defaulting to PREFIX.
[   23s] configure: detected --libdir='/usr/lib64'.
[   23s] configure: no install includedir option given; defaulting to PREFIX/include.
[   23s] configure: no install sharedir option given; defaulting to PREFIX/share.
[   23s] configure: final installation directories:
[   23s] configure:   prefix:      /usr
[   23s] configure:   exec_prefix: /usr
[   23s] configure:   libdir:      /usr/lib64
[   23s] configure:   includedir:  /usr/include
[   23s] configure:   sharedir:    /usr/share
[   23s] configure: NOTE: the variables above can be overridden when running make.
[   23s] configure: detected preset CFLAGS; prepending:
[   23s] configure:   -mbranch-protection=standard -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type  -g
[   23s] configure: no preset CXXFLAGS detected.
[   23s] configure: no preset LDFLAGS detected.
[   23s] configure: enabling verbose make output. (disable with 'make V=0'.)
[   23s] configure: disabling ARG_MAX hack.
[   23s] configure: enabling debug symbols with optimizations.
[   23s] configure: AddressSanitizer support disabled.
[   23s] configure: building BLIS as a shared library (static library disabled).
[   23s] configure: exporting only public symbols within shared library.
[   23s] configure: enabling operating system support.
[   23s] configure: enabling thread-local storage (TLS) support.
[   23s] configure: enabling support for threading via OpenMP.
[   23s] configure: enabling support for threading via pthreads.
[   23s] configure: enabling support for single-threading.
[   23s] configure: threading will default to OpenMP.
[   23s] configure: requesting slab work partitioning in jr and/or ir loops.
[   23s] configure: internal memory pools for packing blocks are enabled.
[   23s] configure: internal memory pools for small blocks are enabled.
[   23s] configure: memory tracing output is disabled.
[   23s] configure: ScaLAPACK compatibility is disabled.
[   23s] configure: libmemkind not found; disabling.
[   23s] configure: compiler appears to support #pragma omp simd.
[   23s] configure: the BLAS compatibility layer is enabled.
[   23s] configure: the CBLAS compatibility layer is enabled.
[   23s] configure: sup (skinny/unpacked) matrix handling is enabled.
[   23s] configure: trsm diagonal element pre-inversion is enabled.
[   23s] configure: the BLIS API integer size is automatically determined.
[   23s] configure: the BLAS/CBLAS API integer size is 32-bit.
[   23s] configure: AMD-specific framework files will not be considered.
[   23s] configure: configuring with no addons.
[   23s] configure: configuring for conventional gemm implementation.
[   23s] configure: configuring complex return type as "gnu".
[   23s] configure: creating ./config.mk from ./build/config.mk.in
[   23s] configure: creating ./bli_config.h from ./build/bli_config.h.in
[   23s] configure: creating ./bli_addon.h from ./build/bli_addon.h.in
[   23s] configure: creating ./obj/arm64
[   23s] configure: creating ./obj/arm64/config/armsve
[   23s] configure: creating ./obj/arm64/config/firestorm
[   23s] configure: creating ./obj/arm64/config/thunderx2
[   23s] configure: creating ./obj/arm64/config/cortexa57
[   23s] configure: creating ./obj/arm64/config/cortexa53
[   23s] configure: creating ./obj/arm64/config/generic
[   23s] configure: creating ./obj/arm64/kernels/armsve
[   23s] configure: creating ./obj/arm64/kernels/armv8a
[   23s] configure: creating ./obj/arm64/kernels/generic
[   23s] configure: creating ./obj/arm64/ref_kernels/armsve
[   23s] configure: creating ./obj/arm64/ref_kernels/firestorm
[   23s] configure: creating ./obj/arm64/ref_kernels/thunderx2
[   23s] configure: creating ./obj/arm64/ref_kernels/cortexa57
[   23s] configure: creating ./obj/arm64/ref_kernels/cortexa53
[   23s] configure: creating ./obj/arm64/ref_kernels/generic
[   23s] configure: creating ./obj/arm64/frame
[   23s] configure: creating ./obj/arm64/blastest
[   23s] configure: creating ./obj/arm64/testsuite
[   23s] configure: creating ./lib/arm64
[   23s] configure: creating ./include/arm64
[   23s] configure: mirroring ./config/armsve to ./obj/arm64/config/armsve
[   23s] configure: mirroring ./config/firestorm to ./obj/arm64/config/firestorm
[   23s] configure: mirroring ./config/thunderx2 to ./obj/arm64/config/thunderx2
[   23s] configure: mirroring ./config/cortexa57 to ./obj/arm64/config/cortexa57
[   23s] configure: mirroring ./config/cortexa53 to ./obj/arm64/config/cortexa53
[   23s] configure: mirroring ./config/generic to ./obj/arm64/config/generic
[   23s] configure: mirroring ./config/arm64 to ./obj/arm64/config/arm64
[   23s] configure: mirroring ./kernels/armsve to ./obj/arm64/kernels/armsve
[   23s] configure: mirroring ./kernels/armv8a to ./obj/arm64/kernels/armv8a
[   23s] configure: mirroring ./kernels/generic to ./obj/arm64/kernels/generic
[   23s] configure: mirroring ./ref_kernels to ./obj/arm64/ref_kernels
[   23s] configure: mirroring ./ref_kernels to ./obj/arm64/ref_kernels/armsve
[   23s] configure: mirroring ./ref_kernels to ./obj/arm64/ref_kernels/firestorm
[   23s] configure: mirroring ./ref_kernels to ./obj/arm64/ref_kernels/thunderx2
[   23s] configure: mirroring ./ref_kernels to ./obj/arm64/ref_kernels/cortexa57
[   23s] configure: mirroring ./ref_kernels to ./obj/arm64/ref_kernels/cortexa53
[   23s] configure: mirroring ./ref_kernels to ./obj/arm64/ref_kernels/generic
[   23s] configure: mirroring ./frame to ./obj/arm64/frame
[   24s] configure: creating makefile fragments in ./obj/arm64/config/arm64
[   24s] configure: creating makefile fragments in ./obj/arm64/config/armsve
[   24s] configure: creating makefile fragments in ./obj/arm64/config/firestorm
[   24s] configure: creating makefile fragments in ./obj/arm64/config/thunderx2
[   24s] configure: creating makefile fragments in ./obj/arm64/config/cortexa57
[   24s] configure: creating makefile fragments in ./obj/arm64/config/cortexa53
[   24s] configure: creating makefile fragments in ./obj/arm64/config/generic
[   24s] configure: creating makefile fragments in ./obj/arm64/kernels/armsve
[   24s] configure: creating makefile fragments in ./obj/arm64/kernels/armv8a
[   24s] configure: creating makefile fragments in ./obj/arm64/kernels/generic
[   24s] configure: creating makefile fragments in ./obj/arm64/ref_kernels
[   24s] configure: creating makefile fragments in ./obj/arm64/frame
[   26s] configure: configured to build within top-level directory of source distribution.

Test log:

[  152s] Executing(%check): /usr/bin/bash -e /var/tmp/rpm-tmp.jCM7i2
[  152s] + umask 022
[  152s] + cd /home/abuild/rpmbuild/BUILD/blis-2.0-build
[  152s] + cd blis-2.0
[  152s] + pushd testsuite
[  152s] ~/rpmbuild/BUILD/blis-2.0-build/blis-2.0/testsuite ~/rpmbuild/BUILD/blis-2.0-build/blis-2.0
[  152s] + ./test_libblis.x
[  152s] % no -g option given; defaulting to "input.general" for parameters filename.
[  152s] % no -o option given; defaulting to "input.operations" for operations filename.
[  152s] 
[  152s] libblis: frame/base/bli_gks.c (line 257):
[  152s] libblis: Default MC is non-multiple of MR for one or more datatypes.
[  152s] libblis: Aborting.
[  152s] /var/tmp/rpm-tmp.jCM7i2: line 34:  7633 Aborted                    ./test_libblis.x

Activity

  1. devinamatthews commented on Oct 20, 2025

    @devinamatthews
    Member

    Hello, what architecture are your running this on? My guess would be armsve is calculating the register block sizes incorrectly (or should just be disabled).

  2. ggardet commented on Oct 21, 2025

    @ggardet
    Author

    I build on armv8 machines. SVE should not be used for armv8.0 targets.

  3. alglib-project commented on Jun 5, 2026

    @alglib-project

    Hi! I also ran across the same issue while using BLIS in my own projects, below is Codex CLI report (tasked it with reproducing it in controllable setup, without relying on my specifics).

    I think that I can fix it at my side by disabling SVE support at BLIS as suggested , but I feel that the whole setup logic needs correction here.

    I think that I will be able to propose a minimal fix in several weeks. But it would be good to hear from you, whether you confirm the finding or not.

    ////////////////////////////////////////////////////

    I can reproduce what looks like the same failure in a minimal program; it is not specific to the BLAS caller.

    Minimal reproducer:

    #include "blis.h"
    
    int main(void)
    {
        bli_init();
        bli_finalize();
        return 0;
    }
    
    Built against an arm64 BLIS configuration, this aborts on non-SVE AArch64 hardware with:
    
    libblis: frame/base/bli_gks.c (line 257):
    libblis: Default MC is non-multiple of MR for one or more datatypes.
    libblis: Aborting.
    
    The reason appears to be that the arm64 family registers all sub-configurations during bli_gks_init(), not only the detected runtime architecture:
    
    arm64: armsve firestorm thunderx2 cortexa57 cortexa53 generic
    
    armsve is registered first. In bli_cntx_init_armsve(), the code initializes the reference context, checks CPU features, and returns early when SVE is not present:
    
    bli_cntx_init_armsve_ref( cntx );
    
    #ifdef BLIS_FAMILY_ARM64
    ...
    if ( ! bli_cpuid_has_features( features, FEATURE_SVE ) )
        return;
    #endif
    
    But config/armsve/bli_kernel_defs_armsve.h intentionally has invalid reference MR values:
    
    #define BLIS_MR_s   -1
    #define BLIS_MR_d   -1
    #define BLIS_MR_c   -1
    #define BLIS_MR_z   -1
    
    On a non-SVE system, probing the initialized armsve context before global registration showed values like:
    
    armsve s: MR=0 NR=10 KR=1 MC=256/256
    armsve d: MR=0 NR=10 KR=1 MC=128/128
    armsve c: MR=0 NR=10 KR=1 MC=128/128
    armsve z: MR=0 NR=10 KR=1 MC=64/64
    
    So the global context validation fails at bli_check_valid_mc_mod_mult(mc, mr) before BLIS ever gets to use the actually detected architecture.
    
    I also verified that BLIS_ARCH_TYPE=thunderx2 and BLIS_ARCH_TYPE=generic do not avoid the abort, because the failure happens during unconditional context registration.
    
    As a workaround, changing the arm64 aggregate to exclude armsve:
    
    arm64: firestorm thunderx2 cortexa57 cortexa53 generic
    
    and rebuilding BLIS fixes the abort on the same machine. A single-architecture thunderx2 build also works. This suggests that armsve should either not be part of the generic arm64 aggregate for non-
    SVE-safe builds, or BLIS should skip registering/validating the armsve native context when SVE is unavailable.
    
    
    Source context I checked: the existing issue already shows `arm64` expanding to `armsve firestorm thunderx2 cortexa57 cortexa53 generic` in its configure log.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions