Skip to content

Corrupted GEMM results on macOS arm64 (M1 / firestorm) #930

Closed

Description

@ogrisel

A scheduled lock file update caused the macOS arm64 CI of scikit-learn to use blis instead of the usual OpenBLAS and uncovered at least one bug in blis on that platform as a result.

I asked an agent to isolate a minimal reproducer in Python and C. It boils down to a single faulty DGEMM call. Here is a PR created by the agent that uses the macOS arm64 runner of GitHub Actions to reproduce the problem:

ogrisel/cursor-sandbox#10

All the info to reproduce the corruption are available in the linked PR but I can extract some of it here if you prefer.

Activity

  1. changed the title [-]Incorrect GEMM results on macOS arm64 (M1 / firestorm)[/-] [+]Corrupted GEMM results on macOS arm64 (M1 / firestorm)[/+] on Jun 4, 2026
  2. ogrisel commented on Jun 10, 2026

    @ogrisel
    Author

    For the sake of making this bug report self sufficient, here are the main repro files from the linked PR above:

    C code
    // Fixed-data BLIS reproducer for the faulty step:
    //
    //     C = (V * S) @ V.T
    //
    // where V is 100x10, S is length 10, and (V * S) denotes scaling each
    // column of V by S[j].  The data files are plain ASCII:
    //
    //     rows cols
    //     value_00 value_01 ...
    //     ...
    //
    // This program has no parser dependency; it only needs CBLAS for dgemm.
    
    #include <errno.h>
    #include <math.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    
    // Minimal CBLAS declarations to avoid depending on a packaged cblas.h header.
    // Values follow the standard Netlib CBLAS ABI used by BLIS/OpenBLAS/Accelerate.
    enum CBLAS_ORDER { CblasRowMajor = 101, CblasColMajor = 102 };
    enum CBLAS_TRANSPOSE { CblasNoTrans = 111, CblasTrans = 112, CblasConjTrans = 113 };
    void cblas_dgemm(
        const enum CBLAS_ORDER Order,
        const enum CBLAS_TRANSPOSE TransA,
        const enum CBLAS_TRANSPOSE TransB,
        const int M,
        const int N,
        const int K,
        const double alpha,
        const double *A,
        const int lda,
        const double *B,
        const int ldb,
        const double beta,
        double *C,
        const int ldc
    );
    
    static double *read_matrix(const char *path, int *rows, int *cols) {
        FILE *f = fopen(path, "r");
        if (f == NULL) {
            fprintf(stderr, "Cannot open %s: %s\n", path, strerror(errno));
            exit(2);
        }
        if (fscanf(f, "%d %d", rows, cols) != 2 || *rows <= 0 || *cols <= 0) {
            fprintf(stderr, "Invalid header in %s\n", path);
            exit(2);
        }
        size_t n = (size_t)(*rows) * (size_t)(*cols);
        double *data = (double *)malloc(n * sizeof(double));
        if (data == NULL) {
            fprintf(stderr, "Out of memory reading %s\n", path);
            exit(2);
        }
        for (size_t i = 0; i < n; ++i) {
            if (fscanf(f, "%lf", &data[i]) != 1) {
                fprintf(stderr, "Expected %zu values in %s, stopped at %zu\n", n, path, i);
                exit(2);
            }
        }
        fclose(f);
        return data;
    }
    
    int main(int argc, char **argv) {
        const char *fixture_dir = argc > 1 ? argv[1] : "blis_eigsh_reproducer/fixtures";
        char v_path[4096];
        char s_path[4096];
        snprintf(v_path, sizeof(v_path), "%s/V_100_10.txt", fixture_dir);
        snprintf(s_path, sizeof(s_path), "%s/S_100_10.txt", fixture_dir);
    
        int rows_v, cols_v, rows_s, cols_s;
        double *V = read_matrix(v_path, &rows_v, &cols_v);
        double *S = read_matrix(s_path, &rows_s, &cols_s);
        if (rows_v != 100 || cols_v != 10 || rows_s != 10 || cols_s != 1) {
            fprintf(
                stderr,
                "Unexpected shapes: V=%dx%d S=%dx%d (expected V=100x10 S=10x1)\n",
                rows_v, cols_v, rows_s, cols_s
            );
            return 2;
        }
    
        const int n = rows_v;
        const int rank = cols_v;
        double *VS = (double *)malloc((size_t)n * rank * sizeof(double));
        double *C_blas = (double *)calloc((size_t)n * n, sizeof(double));
        double *C_ref = (double *)malloc((size_t)n * n * sizeof(double));
        if (VS == NULL || C_blas == NULL || C_ref == NULL) {
            fprintf(stderr, "Out of memory\n");
            return 2;
        }
    
        // VS = V @ diag(S), implemented as direct column scaling to keep the
        // reproducer focused on the faulty final dgemm.
        for (int i = 0; i < n; ++i) {
            for (int j = 0; j < rank; ++j) {
                VS[(size_t)i * rank + j] = V[(size_t)i * rank + j] * S[j];
            }
        }
    
        // Faulty step on BLIS macOS arm64:
        //     C_blas = VS @ V.T
        cblas_dgemm(
            CblasRowMajor,
            CblasNoTrans,
            CblasTrans,
            n,
            n,
            rank,
            1.0,
            VS,
            rank,
            V,
            rank,
            0.0,
            C_blas,
            n
        );
        // Non-BLAS reference for B=V.T without materializing it.
        for (int i = 0; i < n; ++i) {
            for (int j = 0; j < n; ++j) {
                double acc = 0.0;
                for (int p = 0; p < rank; ++p) {
                    acc += VS[(size_t)i * rank + p] * V[(size_t)j * rank + p];
                }
                C_ref[(size_t)i * n + j] = acc;
            }
        }
    
        double max_abs = 0.0;
        double max_ref = 0.0;
        double max_out = 0.0;
        int finite = 1;
        for (int i = 0; i < n * n; ++i) {
            double err = fabs(C_blas[i] - C_ref[i]);
            if (err > max_abs) max_abs = err;
            double ar = fabs(C_ref[i]);
            if (ar > max_ref) max_ref = ar;
            double ao = fabs(C_blas[i]);
            if (ao > max_out) max_out = ao;
            if (!isfinite(C_blas[i])) finite = 0;
        }
        double rel = max_abs / (max_ref == 0.0 ? 1.0 : max_ref);
        int bad = rel > 1e-9 || !finite;
        printf(
            "C dgemm fixed-data V*[email protected]: max_abs_err=%.17e rel_err=%.17e max|out|=%.17e%s\n",
            max_abs,
            rel,
            max_out,
            bad ? "   <<< MISMATCH (bug reproduced)" : "   (ok)"
        );
    
        free(V);
        free(S);
        free(VS);
        free(C_blas);
        free(C_ref);
        return bad ? 1 : 0;
    }
    
    S_100_10.txt
    10 1
    1.41218200507754403e+02
    1.33748597855376005e+02
    1.33393146468360897e+02
    1.21300364523961719e+02
    1.12369169480198508e+02
    9.92541644984692937e+01
    8.75392929959697739e+01
    7.44735215419381404e+01
    6.74215093547071831e+01
    5.31867402781026897e+01
    
    V_100_10.txt
    100 10
    1.09215501082360569e-01 -1.14722070632865228e-01 -1.39858295114750064e-01 2.33082303791690357e-02 5.75132008025639810e-02 -1.87747065551055435e-02 1.11350477299985318e-01 -5.02848513798855104e-02 1.15596240553217461e-01 -1.14393044636243460e-01
    8.38910922685375121e-02 1.62432199108834940e-01 1.22775011668430384e-01 9.82890533109938014e-02 5.98487269881362166e-02 -1.65017093812732080e-01 4.94442791730596506e-03 -6.56352139664604511e-03 -1.10749732987926189e-01 4.05554536033930074e-02
    2.62770952714126649e-01 5.68571942580633066e-02 -6.83324947828702761e-02 5.26274133513639775e-02 7.16826889455454141e-02 1.27323658060781858e-02 -6.98405463541885356e-04 8.46960995292782119e-03 -1.72438411664068592e-01 -5.45115944332143568e-02
    8.02495922190417238e-02 1.09720949277160668e-01 -3.71057745054418978e-02 1.34055620356994080e-02 5.31951950275867252e-02 2.53402285878817135e-01 8.98486540312905431e-03 1.85201973299339656e-01 1.01917170394165008e-01 7.91005505259487762e-02
    2.64447422059433841e-02 1.35770561901452314e-01 -5.42076630997590445e-02 -6.09035038929566508e-02 5.05112323708655896e-03 -3.33243026145073427e-03 -9.36436685172246652e-02 -2.09242374381777146e-01 -9.77019432515245922e-02 -1.15563105151095039e-02
    -4.27390537385985217e-02 -9.32537534531381329e-02 -3.52365912434250417e-01 -4.88162136689481510e-02 4.53107495970168500e-02 -9.08010111581541018e-02 -3.87773941391309357e-02 -8.90520839501523914e-02 -7.28611329406930325e-02 8.76936163628123794e-02
    6.51971073358574987e-02 3.06017218513205611e-02 -7.09489352513512517e-04 -2.10426110727001292e-01 1.02046042595041672e-01 3.95333643798440673e-02 -1.07054003030589581e-01 1.79964975476399336e-01 6.49765344551366253e-02 1.44969234858498830e-01
    2.93271929286723632e-02 5.55735577548253316e-03 -5.88724412125906996e-02 -7.19258353709271020e-02 -2.05300723190890433e-01 -2.97324339107942689e-02 9.35595546008616144e-04 -1.69081323998838684e-02 -4.40858204320154975e-02 -2.09653267116170217e-01
    -1.66799140922537399e-02 -1.07981456113851418e-01 2.11910228359236924e-01 2.04937366920793715e-02 -2.32158129231961163e-01 -1.37928651635705751e-01 1.66476543731071090e-02 -7.64592890568945721e-02 8.09085170313287028e-02 7.36175966617258204e-02
    -1.12151271016512566e-01 -6.59152963207289555e-02 1.60035455866401582e-01 -3.73547325984107947e-02 -1.36236483170955158e-01 -9.61440703057839241e-02 -6.05446742935294643e-02 1.22963211262640572e-02 4.53800824671117629e-03 4.99845673828099718e-02
    4.33585901803442558e-03 -1.35852093141840247e-03 -8.83563883702692676e-02 2.68439189427465037e-02 -6.98699281058248883e-02 1.52834521190897465e-01 6.15254299698480833e-02 4.27455237796140752e-02 1.17941360169161631e-02 -9.31240051098229521e-02
    -1.79615323845358887e-01 2.74924698762488463e-02 1.35560995386910271e-01 -1.32796387199480448e-01 7.85187205841436919e-02 -2.36464865133296037e-01 -2.60846938506257599e-02 -7.27083573606697037e-02 -1.99639713114216688e-01 -4.95555276825417751e-02
    -1.33689958400331710e-01 6.98221038228840074e-02 -3.19947300817257432e-02 -2.37051451665320712e-01 1.13930782679972073e-01 7.31329620244558359e-02 -4.94655817768701045e-02 -5.65275534102576832e-02 8.32659970365426903e-03 -2.63140014770959878e-02
    1.00205175551626974e-01 8.17306645132105380e-02 -1.83701627503052856e-02 -1.10798297011170541e-01 -1.92773216978364220e-01 -1.63670874683843004e-01 1.22021001007312474e-01 -3.74246163074328855e-02 1.25547358946894727e-02 3.01180963554675517e-02
    -6.95084961595353323e-02 1.35174953894983164e-02 -3.67983618960038908e-02 4.40934131716393674e-02 -8.88925698659659286e-02 2.34403851348933198e-02 -2.09168362350570819e-01 -4.68084178841306695e-02 -9.69492651870814959e-02 7.69185142851238762e-02
    -4.87725660715229853e-02 8.54685463222636665e-02 -5.34863884644233706e-02 4.37128139370555613e-02 -1.51337929479633621e-01 3.66345145018032725e-02 5.26147570648960242e-02 -6.16821412613889966e-02 3.27578507082656387e-02 7.16158265025638729e-02
    2.38137130036795264e-01 -9.70262055136898449e-02 4.03507427635133101e-02 6.20640569313316223e-02 -5.91486429751477832e-02 -7.48181988448604340e-02 -2.58408684897285454e-02 -9.39400571206636531e-02 1.54524091979398565e-01 1.85029367697481129e-01
    1.25220110726794783e-02 8.41358945871341912e-02 4.42062524734912962e-02 -9.35486877945231332e-02 7.80215044386623757e-02 -1.48006358438081159e-01 8.78268893000207045e-03 3.77285473433910529e-02 1.49424571038217241e-01 -1.31130327646323513e-01
    3.07711891445649251e-03 2.88548136281107870e-01 -1.50595036083006895e-01 1.25625631460761583e-01 -2.68131164054013840e-02 8.34675774603027415e-02 1.43826079877447638e-01 1.78071335099076994e-01 -9.52824577245497961e-03 -2.84314350529764025e-02
    -8.02967098773064644e-03 1.73141961073538346e-02 4.07879549732990260e-02 -3.43939307286717719e-02 1.42236156811894499e-01 -4.76336463273819774e-03 6.46900415381850835e-02 -2.49635390050814754e-01 -4.42748611605806794e-02 -1.00089931063552379e-01
    2.58384380055355599e-02 -9.87948093377212649e-02 -1.08783830436978743e-01 7.24289279855040019e-02 4.96306937898967626e-02 1.07827402724732055e-01 2.72129303833870614e-02 6.96927302237939639e-02 5.89391554900686558e-03 -4.72632883113698263e-02
    1.80076981005513059e-02 -1.35110076070686841e-01 2.62343439098926684e-02 -1.00417494900854071e-02 -2.01231306636022560e-02 -1.02796943806227462e-01 -5.67027169905681902e-02 1.13673582939400664e-01 -2.82978418402654655e-02 5.45111072784399062e-02
    1.49560620132836233e-02 8.77908026885836357e-02 1.35184439812331830e-02 4.56523763232544438e-03 -9.18417007176105665e-02 5.04727200307026995e-03 -2.01040629697713316e-02 -1.14331681263462590e-01 1.28349428639062374e-01 9.12526052943433558e-02
    -1.34902568850710114e-01 1.35222100058917966e-01 -3.53992725715206041e-02 2.47268313686695690e-01 2.02482207207374643e-01 -4.86922089505664110e-02 6.56126161888365746e-06 2.09396034880883847e-01 1.29254833897830185e-01 -1.73228690454191245e-02
    -1.64012203699385350e-01 5.64756851860941378e-02 2.90685777386657629e-01 1.20176711851399248e-01 -2.32643799291153627e-02 -7.89856560537619962e-02 2.74636796462983390e-02 6.92656049261535373e-02 5.38101730094230762e-02 -1.10282514903100884e-01
    -9.03561967959833623e-02 -1.08733407928805453e-01 8.38918912233118513e-02 1.77923122627673992e-02 -1.20953038322832149e-01 1.21895915298643687e-01 -1.73404931668263290e-02 7.79350142237397320e-02 -4.21551326002543303e-02 1.43924242617047369e-02
    -2.07208538632468686e-01 3.15288346499885616e-02 -4.07380415930618800e-02 -3.36067199391703320e-02 1.04975287361571013e-02 2.33438088006509559e-02 2.38777447101618689e-01 5.43878903064311768e-03 -1.60292794218424017e-01 1.70932713177207735e-01
    -1.32007819014582750e-01 1.58794375037655838e-01 1.28533178647885465e-01 -8.17273647986259677e-02 -7.89110315392165945e-02 1.93160564130952700e-01 -1.87520379551853661e-01 7.24585697220313089e-04 3.93560775963030796e-02 8.79304382447096827e-02
    -1.10342776848564333e-01 4.87449744259983511e-02 -1.47465884223534766e-01 1.36290006743097158e-01 -6.83566426879532868e-02 8.21267836521731437e-02 -4.65207626486283873e-02 -9.12361948704341723e-03 8.77845556677471495e-02 2.26417753675246074e-02
    -6.19081829615164836e-02 -1.06721467379406715e-01 -3.51011239329668337e-02 1.20432317118311843e-01 -9.92185335339852981e-02 -1.15490302441230597e-01 -1.98458348107909965e-01 1.02865298671088623e-01 -2.59878713199823835e-02 -3.26407730924331771e-02
    1.44394394768769252e-01 1.11777805049313547e-01 5.93441228503890708e-02 1.51939148439127175e-01 -7.86298671836416219e-02 6.18958853345059814e-03 -1.54820704041335466e-01 -5.57691723697598257e-02 -6.01993184878850396e-02 -9.45004836529000913e-02
    8.96166222341496926e-02 7.92096546318124539e-02 -1.34221511287420409e-01 -3.06883469391117436e-01 -2.20356379720305084e-02 -3.88864096677225407e-02 -1.45180341612688057e-01 -1.90036315246992181e-02 -7.35735672718014766e-02 -5.19041027053715257e-02
    -1.42995860464266832e-02 5.60850598985222562e-02 -1.36229787522311130e-01 1.67474009484612274e-01 -4.25886644019273994e-02 -3.29278368544579370e-02 -1.54163227339123410e-01 1.21586020458336521e-02 -1.44769643535327702e-01 1.38411673407367486e-01
    -1.08817471635979837e-01 -1.27202778622431650e-01 -1.77552207157623487e-01 4.66693996112104315e-03 -8.42234646595663855e-02 9.87480298208223417e-02 -1.13022637848766483e-01 1.52441151947423664e-01 -2.81873722484344731e-02 -8.15480702159561560e-02
    1.58472184818611195e-01 2.55956713881440561e-04 -8.62386077674940077e-02 -4.77518975117195571e-02 2.45407798721297005e-01 2.48672703414487245e-01 1.63000282232041334e-02 -7.99937582254880153e-02 6.39023609397019049e-02 6.89874498400018937e-02
    6.08775774950653242e-02 -8.39103770511169522e-02 1.40042873255476624e-01 -5.40654802904637147e-02 7.75820593627288974e-02 -9.25092638057727762e-02 -1.44931102805234968e-01 3.38327721643653656e-02 -3.40505254514200661e-02 2.17961100664202032e-02
    7.76736901665428386e-02 2.05672919153390227e-01 -6.62919926192163528e-02 -5.77884095278054580e-02 -1.51811900574404315e-02 -1.80865486736715542e-01 1.82979876590378954e-02 1.11830754836019938e-01 5.77069442297033081e-02 -2.38277424865293505e-02
    -2.37339275563637798e-02 -1.16257169123443020e-02 1.15935828913811892e-01 2.03331579154671302e-02 1.12783526331927703e-01 1.56641053126804264e-01 1.40230292337205371e-02 4.57852632768691939e-02 -1.32058640973468672e-01 -2.07083533311344020e-01
    5.22311010782809063e-03 3.19387469529889972e-02 -8.47282014061230965e-02 -6.58409767198128021e-02 1.30788321237289423e-01 4.41104396285713352e-02 -2.10612789319770538e-01 -3.28539415402140100e-02 9.80013489789491599e-02 -4.38421839415625292e-02
    -5.93707751899728159e-02 7.65528557342414623e-02 4.57523344570890320e-02 1.40464214094401935e-01 1.40354033655911786e-01 -3.94627403040154617e-02 -2.02632176735532049e-01 7.29701449006286695e-02 -3.34217983775262906e-02 6.49050769077230277e-02
    -1.87850397459710730e-02 -5.91418887477716468e-02 9.15242851800624757e-02 -1.30899860883980063e-01 -5.93695254907452494e-02 1.33451781019910981e-01 -1.83017002125769046e-02 4.09946284452034973e-02 3.05706957412968175e-02 3.87189250733466980e-02
    1.12377900381524314e-03 8.61844226210652163e-04 -2.27742227729465715e-02 2.32732827099731629e-02 -5.58801354075181486e-02 -6.82239482451684198e-02 -5.11694311223971771e-02 -2.17062872075359957e-03 9.71181087714030888e-02 1.29484905496967222e-02
    4.31957831450705612e-02 7.48203868256290885e-04 -7.73583168251848891e-02 -7.31782867144412878e-03 1.10081923645790919e-01 -1.91456783904162847e-01 -9.12197153263269445e-02 4.84518499800618216e-02 -1.65807910821292981e-01 7.14126918262108779e-02
    1.48991817161595430e-01 3.99393575370316084e-02 -1.07249522750541920e-01 1.06748768557769991e-01 -8.36636273015529258e-02 2.48584788517225951e-02 -2.41479232734245555e-02 6.59849303101898849e-02 -1.83963274237497726e-01 -8.31866163538759473e-02
    -2.24724887253479506e-02 1.04851567742941187e-01 1.48490748937507605e-01 -2.49040976675854175e-02 -7.85205485604977271e-02 8.65437055157642354e-02 -9.14152311752614195e-03 -8.74949836863933572e-02 -1.11341802738205389e-01 -1.12652858788654352e-02
    7.75131891628115521e-02 -6.55613588060044161e-02 9.22678635231295174e-02 -5.73796558310633795e-02 3.92326097964098494e-02 -7.51177358464368561e-02 -1.39678224981667903e-02 1.82810037514285151e-01 7.69734446309870146e-02 -1.27302786552134312e-01
    5.84657853878850428e-02 -3.89108434801938921e-02 5.09232572627747390e-02 -1.41006631315172243e-01 4.46164611790635310e-02 3.97327217403273328e-02 1.94825368525629011e-01 8.64169872099706943e-02 -8.46742769651243760e-02 8.46355380297226373e-02
    -7.06431749925699182e-02 -6.58747607835598326e-02 2.44207356866959907e-02 -7.67287173184161703e-02 -2.78199730929096674e-02 1.33097830802288791e-01 7.29233596122791285e-03 -2.83542717190018966e-02 1.47782086225512442e-03 9.72367729995407132e-02
    -3.02996748471735210e-02 -1.76188518624931706e-01 -9.76034671856659125e-02 -3.44968537587821075e-02 4.62447970382319426e-02 -5.31183890039311352e-02 -3.82395351179344659e-02 -2.88396660139717959e-02 -2.38036306466407277e-01 1.22802135912120025e-01
    1.13054854306018611e-03 1.01811903771747064e-01 4.69749780530847316e-02 1.49581925884302493e-02 -1.63376210945097355e-01 1.82964076652165353e-02 5.51253621045804804e-02 -1.61906645411075099e-02 2.43142611448236096e-01 7.11354965833850272e-02
    -1.63826189165690472e-01 -2.57144910695612100e-02 -4.86208461271992118e-02 -4.63175877089399418e-02 -1.68676904896763596e-02 -2.68097857517357666e-02 5.63389657192683996e-02 -9.98925454562347298e-02 8.79016592825260512e-02 -1.20682804022626336e-02
    -1.17646411426852535e-02 8.60601138913488495e-02 7.86827572550604509e-02 1.37199995484034304e-01 -6.86620014142702156e-02 -2.45995645248059183e-02 1.70555373957485795e-01 1.69824891900193453e-01 -1.28695704318196769e-01 -1.20447811433543106e-01
    1.22780170609349940e-01 -5.54780648310319660e-02 6.68632057571845202e-03 -7.17502595831725903e-02 8.61263165659984092e-02 5.50936477465153313e-02 1.57679020340746268e-01 8.58815429279342207e-02 5.48328375632291601e-02 1.68420347794671604e-01
    -1.22259967645488316e-02 5.78317565418576957e-02 -1.07556152125199200e-01 -8.53785812962780666e-02 -2.86374088826443045e-02 4.65182581169027026e-02 7.12344651833929782e-02 -9.15535232386042487e-03 -8.88310176118433936e-02 -2.74053705619502833e-02
    5.92992503611593641e-02 -1.76234058164778967e-01 -2.54599459872470735e-02 -7.34215582933581273e-02 -4.60594467101469868e-02 5.35288908899052701e-02 -6.33548345077387665e-02 -4.82960649380086843e-02 1.01725753122062761e-02 5.83065776289343821e-02
    -1.35997590211656777e-01 2.92321819098248607e-02 -1.29862387208681374e-01 -1.65921442812483250e-01 -3.55578846100352078e-02 -2.78327666821634456e-02 9.48595148583185332e-03 5.73656590779679162e-03 3.85058313105310079e-02 1.25744572971932644e-01
    1.28223936357791425e-02 8.40267671457624876e-02 7.94574027233961727e-02 8.16908532041088348e-02 1.53815383502713537e-01 -6.35624433694493424e-02 -8.15627943102923969e-02 -3.33374482993433127e-02 1.08354468768287707e-01 2.13080547967722300e-01
    -1.55563250663111552e-01 -1.91250955338301450e-02 -1.75946623586368950e-02 -1.44998778012728952e-01 7.68377657476826126e-02 -8.71648618242724660e-02 9.28434247328223938e-02 4.57913547025170092e-02 -8.61349631303574420e-02 1.38081841428453117e-01
    1.36177458312146504e-01 -1.61788505727519849e-01 -8.10455034759206133e-02 2.31654519290476479e-02 1.12616474068347724e-01 -1.66754611532209496e-01 -1.08756009048977514e-02 -2.48634770444109802e-02 -3.06315281687534920e-02 -1.19686470257831731e-01
    1.61137519089649461e-01 -9.38886330012305564e-02 7.90135618231291442e-02 3.87399214454826890e-02 2.60462289311995839e-02 7.23253736584944518e-02 4.38955832191779884e-03 -1.00684470356560751e-01 -5.01469500702076271e-02 -5.05900460533440857e-02
    9.75794634062437244e-02 4.52391399004632450e-03 1.08233409483213291e-01 -1.45696503291611934e-01 -2.00959622445274592e-02 2.13686008787897543e-02 -4.29276038223458389e-02 -2.34297995569127497e-02 -1.55292502289215706e-01 6.50156218572747746e-02
    -4.26611946965248165e-02 -8.17564941737639606e-02 4.10165561329401615e-02 -2.69342017971165503e-03 1.47797637390763459e-01 1.20077302787792051e-01 -3.92194308132366304e-02 -3.71724437423885737e-02 -9.39890838083645846e-02 -9.48836418943251325e-02
    -2.23351492425683633e-02 3.50683467686178016e-02 -8.72777520051550570e-02 3.60519799277820366e-02 -1.08243767930643636e-01 9.18118739814123702e-02 4.60312481660283199e-02 -5.80327613457046615e-02 1.88988265675306188e-01 -8.46793023526676986e-02
    1.98704577135589873e-02 1.42878796788136503e-01 -6.85957174143766585e-02 -6.80667546651372163e-02 -1.44733023675089695e-01 3.21583355677332386e-02 -3.63882480997425664e-02 4.35935932755773525e-02 -1.68462647078639532e-01 -4.24627109010752065e-03
    -5.17750713666297532e-02 -1.69535391010096709e-01 -7.31202771411846447e-02 1.45365174162101068e-01 1.26358938751379296e-01 4.17226659811313072e-02 -6.94166894044311172e-02 -9.91334984193152219e-02 1.75125673578427603e-03 5.03690556095576433e-02
    1.50630496304884925e-01 1.53028150090765702e-01 9.22872979298464263e-02 -2.41118626151218540e-02 1.19012998414348092e-01 8.04277465117638063e-02 -8.25351961530011169e-02 -1.25930087147190534e-01 -6.68489365435566141e-02 -8.51071062559419084e-02
    -1.30128093012164880e-01 -3.99599562476184583e-02 2.33841477855359602e-02 7.23608569530462698e-03 -5.35341511856441505e-04 1.69467084328551953e-01 -1.91147223192551591e-01 -8.67011378391896320e-02 -1.07327126679377938e-01 -1.21811033874500693e-01
    7.65839482346323125e-02 -1.72052753802953928e-01 2.37720413590642825e-02 1.96317739836590482e-01 -1.48984083792413818e-01 -4.22227063234415570e-02 9.15374137167469376e-02 -1.29767088538172953e-01 -1.65549341839331676e-01 -6.40569944957728593e-02
    -3.13323192117104174e-02 -1.24319692198422135e-01 2.75146939543436005e-02 7.62016728152045131e-02 5.92415251714018196e-02 -1.33842339236015018e-01 8.81722000891427271e-02 -4.10788723136243442e-02 -9.79339924508020598e-02 1.27201681396692301e-01
    -8.91869064284019769e-02 -9.36313358225668579e-02 -5.46789538949573901e-03 3.03236715733020586e-02 5.64419982593211828e-02 4.50788451507867644e-02 1.52100291380480312e-01 -8.52089173171600850e-02 5.02514268014347051e-02 1.97176142762008275e-02
    -6.97210543260607524e-03 4.68219108104860823e-02 4.95965803186654286e-02 6.08063634696165839e-02 3.21519462075649312e-02 9.38496177904154516e-02 9.94257948534768149e-02 -2.88212210120027852e-02 1.95827548513073553e-02 -8.02016884596547242e-02
    -1.07210954678939249e-01 -1.34374506462861115e-01 -1.48040716957147406e-01 -3.67645984996153447e-02 -8.13739888194988104e-02 -2.72742281822452026e-02 1.10900962365389530e-01 -1.76865772617301270e-01 -4.26554900177196841e-03 -1.87430478581109172e-01
    -4.46201723787269591e-02 4.00264688207749436e-02 8.57163620099445078e-02 6.52933059413076528e-02 1.70550608976755225e-01 3.49961041947035867e-02 2.08082949395623718e-01 -2.16279563796176022e-01 2.36322172603051460e-02 -3.87180255149878819e-02
    3.56055899034596096e-04 1.25769314979795460e-01 6.58248773984000148e-03 7.64891818376524091e-02 -1.04222699467146959e-02 2.24562446609334922e-02 1.08505721195725699e-01 -1.29686938993435169e-01 -2.36255458233958077e-02 6.73060622591546698e-02
    6.08575109957644536e-02 -1.19546117102173090e-02 -3.57607324086988837e-02 1.52733932623130841e-01 -1.13076593625828434e-02 1.92247811758162523e-01 -1.05843843360124160e-01 1.35592601902102844e-01 -4.24605966115522565e-02 5.39101609087444533e-02
    4.73166971357205993e-02 6.96467019060873910e-02 2.02047948086582885e-01 5.72160678529390551e-02 4.22879818219780851e-02 9.35527210378539337e-02 -1.18614736598575686e-04 -2.92492681740618744e-02 -6.14997600978488684e-02 5.96593975503407620e-02
    -1.17997718959200096e-01 -2.75464993648000048e-02 8.06169256047189892e-02 3.69413845277238029e-02 7.13454660732466689e-02 2.23322363541978049e-02 1.27663869566322363e-01 1.82060318697331053e-01 -1.19420825882321557e-01 1.17727152618213995e-01
    1.03818377349666521e-01 1.64907388787589371e-01 2.34888229382261525e-02 -5.41353070776689899e-02 -1.07361248782097837e-01 -1.13246849146277653e-01 -4.36245387134196402e-02 -7.75464223055334217e-02 6.73790066101058599e-02 -1.15723313046140086e-01
    -2.12455239480492247e-01 1.98020308842080606e-01 -1.02745401570810996e-01 1.22634284931478793e-01 -5.17959929264211402e-02 -4.15884883718880202e-02 -8.77091332218302502e-03 -5.19444636849527297e-02 -1.14815827833438772e-01 3.37904976118539382e-02
    -8.32072058038949187e-03 8.05536346142763648e-02 -1.20372045374999334e-01 2.85926547261875115e-02 -1.48056879231510700e-03 -6.84626931771080069e-03 -1.44135817432119367e-01 4.93781972515064740e-02 5.68113559204003749e-02 -2.25348883090373785e-02
    1.28935550163049362e-01 2.98819656373710205e-02 -3.81488701583972759e-02 -2.26031221557645504e-02 -3.40931823038846324e-02 7.88001572993711485e-02 9.29252757320184336e-02 -1.16153027983468868e-01 -1.65489971796574015e-01 1.23506238439429206e-01
    1.36410456527689822e-02 5.77921008502068484e-02 -2.38657485145723526e-02 -1.10974597542455547e-01 -8.09350545465825355e-02 7.20379437659128125e-02 2.36749965274415247e-03 8.37916459204603031e-02 2.55578684517057120e-02 -1.12273935103696931e-02
    -1.03415859123963047e-01 7.35861362213384995e-02 1.31178191858243837e-01 8.45952525011161860e-02 9.91182457397356276e-02 2.73389644783592657e-02 -6.66244167870754939e-02 -7.60968707051336637e-03 -2.09871164133938470e-01 -1.70679966312358794e-01
    1.57608694814681122e-01 3.69517415136373564e-03 1.92408235628126686e-02 -7.51635716255826588e-03 7.47527082620528527e-02 -5.28579694946783099e-02 -3.06858983282299012e-02 -3.52100011238381250e-02 1.25851313512979374e-01 -2.13187309512005152e-01
    3.28085802874677201e-02 -5.87972535115959746e-02 -6.57213231341220866e-02 1.07375305844752508e-01 -1.67683340282459903e-01 5.31564443315952900e-02 -1.06729928582543460e-01 -2.29613407771691286e-01 1.26802960111666668e-01 4.22022167557474948e-03
    -1.80686434532511021e-02 -8.12918943342236938e-02 -9.04040612427607082e-02 7.97706855536738091e-02 -8.83661429841306745e-02 -7.78944915204625443e-02 1.25534788167605632e-01 1.80120478097329589e-01 -3.20724845347404542e-03 8.18291253819415781e-02
    -9.03999645802317994e-03 9.99626455296310362e-02 8.12377933816431363e-03 -7.65300009856563629e-02 1.32078112195526190e-02 9.71661869423427194e-02 1.90764070985770723e-01 7.42469042602749742e-03 -9.76721945475606673e-02 -1.05090588185244596e-01
    -5.62660082340957421e-02 1.76816673503736219e-03 -7.63175556315539988e-02 2.30366224839854750e-01 4.92051401682245537e-02 -3.94189872025697483e-02 9.74640301133034986e-02 -1.40209565114446350e-01 3.39303499395198285e-02 1.55308900662585264e-01
    -1.65459997164297962e-01 -2.39821476261495199e-02 1.31044689808800602e-01 -4.63714928893272094e-02 -3.94794690065271500e-02 -8.86703665842517863e-02 2.89989725360444740e-02 -4.86062738675683351e-02 1.58916016839405039e-01 -9.14271124305158084e-02
    -1.44423341576964848e-01 -2.80611994485146267e-02 -8.99711050514951510e-02 3.71108161744474890e-02 2.28537172742155514e-01 -1.11723501062885255e-01 -2.95236711732004128e-03 7.11692447875202083e-02 1.78942444118660809e-01 -8.75340814417394086e-02
    -1.48360560479752684e-01 1.16535753874516645e-01 -2.17742351889734037e-01 -6.65551604438375521e-02 1.24440068611627166e-01 -1.91228314549702461e-01 1.88459399996564018e-02 -6.02666131874475680e-02 -3.89997642120214691e-02 -1.18742929472359482e-01
    1.07751642703169587e-01 1.86533868450487667e-01 -5.80782365897668587e-02 1.38142122236988213e-01 1.12109476064133476e-01 -6.22051351052294588e-02 -1.38412667803965630e-02 -2.02433456576261578e-01 1.21697227483438426e-02 2.18479210926094847e-01
    -1.44280604273651830e-01 -1.32364146604823318e-01 -9.25793931286025967e-02 1.39750572595428394e-02 -6.17041279866479345e-02 2.03259104424896836e-01 1.93246729336388166e-02 -4.99086459621172623e-02 -3.05606559957445308e-04 -1.43329757052769430e-01
    2.66084810881382743e-02 1.15225055589461930e-01 -1.28154272992535678e-01 5.23116242521786609e-02 -1.57796894308387364e-01 -1.49916701895845883e-01 -6.19696828371670561e-02 8.21644186930022419e-02 -2.87587218042010366e-02 -1.13319216766660222e-01
    -4.26033073097696613e-02 -1.29656768770216063e-01 6.35690656889695560e-02 1.66826178027514954e-01 -6.14615421291639999e-02 2.30690848922159193e-02 -1.61674122711448598e-01 6.53389250676345013e-02 -6.82935828699165193e-02 7.03152780529395782e-02
    1.48551262478482909e-01 -1.37583886685489626e-01 -1.74499166634521398e-02 1.17617614902976342e-01 5.03149864371025893e-02 -7.12150789696274489e-02 1.01672169573838983e-01 6.43461601094327401e-02 4.00236115292948169e-02 -3.97279260467759895e-02
    2.66063065048308192e-02 8.73819784479286932e-02 -1.18625316698603911e-03 5.37538665017446918e-02 -1.50618151657099436e-01 3.97809390283589831e-02 1.34113424211609295e-01 -8.01548122172028588e-02 -8.44053726016261857e-02 4.97751816802356334e-02
    -1.91092648870599610e-02 -8.50929576025533790e-02 7.85487363686313694e-02 -3.41836092755637838e-02 4.20381051028083652e-02 -1.73766949294015122e-02 -1.44508455686062881e-01 -6.58640837130629320e-02 3.48109114332232350e-02 2.60790194660812172e-02
    -7.70121379379154849e-04 -3.31431750353456955e-02 -1.53926262915564686e-03 1.41119129818959022e-01 1.08551548696881814e-01 -8.25091311738487126e-03 2.70407959149674484e-02 -2.17773358446265754e-02 1.40455781730591169e-02 -1.96079959634484491e-01
    -1.80441999056539043e-01 8.42238102209568879e-02 1.18088685858934693e-02 6.21405118129513753e-02 6.52306293322488240e-02 4.37271692869432155e-02 -1.14146782700039376e-01 -2.11034645408589822e-01 9.67761787507305932e-02 3.64676470826537716e-02
    
  3. devinamatthews commented on Jun 23, 2026

    @devinamatthews
    Member

    Confirmed. Looks like it fails for all N which are multiples of 6 + 7 or 22 and RANK > 1.

  4. devinamatthews commented on Jun 24, 2026

    @devinamatthews
    Member

    This is definitely a high-severity bug so thanks for reporting and sorry I couldn't get to it sooner! Can you please see if #933 fixes your downstream issue? I have some other PRs and issues queued up so when I work through those I will backport this and anything else pressing to the 1.x, 2.x, and 3.x release series.

  5. devinamatthews commented on Jun 24, 2026

    @devinamatthews
    Member

    FYI I added a couple layers of protection to catch other kernel errors in the future.

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