Skip to content

v0.4.0

Latest

Choose a tag to compare

@jason-fxz jason-fxz released this 13 Oct 05:59
2cf5429

Changes since 0.3.0.

Install

  • pip install flashlib no longer pulls in nvidia-cutlass-dsl or numba. Every op has a path that runs without them. (#25, #26, #28)
  • The CuTe DSL backends move to an extra: pip install 'flashlib[cutedsl]' (nvidia-cutlass-dsl>=4.4,<4.7, Linux). (#25)
    • Without it, auto-routed ops use their Triton or torch path.
    • Explicit CuTe requests (backend="cutedsl", *_cutedsl entry points) raise an ImportError that names the op and the install command. A few cutedsl backends that have a non-CuTe path (for example pca, linear_regression and random_forest) keep working.
    • If nvidia-cutlass-dsl is installed but cannot be used (version out of range, broken import), flashlib warns once. (#26)
  • numba is gone: the HDBSCAN tree helpers are C, built on first use with the compiler Triton already uses (CC, gcc or clang) and cached (set $FLASHLIB_CACHE_DIR to move the cache). Without a compiler they fall back to pure Python. (#28)
  • flashlib.diagnose() shows whether the CuTe DSL backend and the HDBSCAN C helpers are available.
  • Supports nvidia-cutlass-dsl 4.6.

Blackwell

  • k-means: a tcgen05 CuTe DSL assignment kernel for bf16 input with D in {64, 128, 256, 512, 768, 1024} (needs [cutedsl]), and tuned Triton k-means configs for B200 (#8). Faster assignment reduction (#22).
  • KNN search: a tcgen05 CuTe DSL kernel that flash_knn picks automatically for bf16 input with D a multiple of 64 up to 512, k <= 16 and at least 4096 database rows (needs [cutedsl]) (#21). Without the CuTe DSL, small-query KNN runs on Triton (#28).

Fixes

  • GEMM:
    • CuTe 3xbf16 / fp16x9 returned wrong results unless K % 8 == 0 and N % 4 == 0, and a second same-shape call overwrote the previous result. (#26)
    • The Triton INT8 GEMM behind gemm_ozaki2_triton and the fp16x3_kahan kernel had no bounds masks, so unaligned shapes gave wrong results or NaN. gemm(tol=1e-6) picks fp16x3_kahan. (#26, #30)
    • gemm_tf32_x6 left torch.backends.cuda.matmul.allow_tf32 on, which turned every later fp32 matmul in the process into TF32. (#30)
  • The sm_90-only CuTe kernels (3xbf16 / fp16x9 / ozaki2 GEMMs, IVF-PQ search) were also selected on GPUs newer than Hopper. They are now used on Hopper only. (#26)
  • LogisticRegression.fit() and TruncatedSVD.fit() always raised. (#30)
  • backend="cutedsl" raised for flash_standard_scaler, flash_umap and flash_logistic_regression. (#26, #30)
  • flash_standard_scaler failed on non-contiguous input. (#30)
  • HDBSCAN auto dispatch uses the sparse path when the dense mutual-reachability matrix does not fit in GPU memory. (#26)

Release process

Releases are now built and published to PyPI by GitHub Actions when a v* tag is pushed. (#32)

Full Changelog: v0.3.0...v0.4.0