wgblas
    Preparing search index...

    Module devdocs/utility-functions/constants

    Single source of truth for every constant the JS dispatch side shares with a shader.

    WGSL has no import mechanism, so each shader necessarily declares its own copy of these values. That makes them a silent-corruption hazard: change BM in sgemm_large.wgsl without changing BM_LARGE here and the host dispatches the wrong grid — too few workgroups computes part of the matrix and reports success. Hoisting them here removes the JS-to-JS duplication; tests/utils/test.constants.js closes the remaining JS-to-WGSL gap by parsing the shader sources and asserting they still agree.

    Every export below names the shader declaration it mirrors. Changing one means changing both, and the test will tell you if you forget.

    BLOCK_SIZE
    BM_LARGE
    BM_SMALL
    BN_LARGE
    BN_SMALL
    DNRM2_PARTIAL_LEN
    LARGE_TILE_WORKGROUP_THRESHOLD
    SPLITK_CHUNK_ROWS
    SPLITK_CHUNK_ROWS_DD
    SSYMV_TILE
    STRSM_SMALL_RHS_PER_WG
    STRSV_TILE_ROWS
    TILE_WG_2D
    WGS