Repository navigation
fix(linalg): build on architectures without SIMD kernels - #9446
Merged
BubbleCal merged 1 commit intoSep 28, 2026
Merged
Conversation
f32x8/f32x16, f64x4/f64x8 and i32x8 only exist on x86_64, aarch64 and loongarch64, so lance-linalg fails to compile elsewhere (riscv64, s390x, ppc64le). Back them with plain arrays under a `simd_fallback` cfg set by build.rs. Signed-off-by: Sun Yuechi <[email protected]>
4 of 14 tasks
freebsd-git
pushed a commit
to freebsd/freebsd-ports
that referenced
this pull request
Sep 24, 2026
1. Merge lance-format/lance#9446 to fix build on powerpc64*. 2. Add missing TEST_DEPENDS.
Contributor
Author
|
@Xuanwo @BubbleCal PTAL. Tested on riscv64, and FreeBSD ports already carries it |
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The author reports a successful riscv64 test, and FreeBSD ports carries the same fallback patch for powerpc64. That addresses the cross-target validation concern in my earlier review. The scalar backends preserve the existing SIMD trait behavior and provide a focused fix for unsupported-architecture builds.
BubbleCal
approved these changes
Sep 28, 2026
Contributor
|
I think we should just add the support for riscv if that's what you are using, or this can be super slow. |
luhenry
added a commit
to riseproject-dev/python-wheels
that referenced
this pull request
Oct 10, 2026
lancedb v0.40.0 pins lance-core/lance-linalg =13.0.0, and lance 13.0.0 ships the portable SIMD fallback the 0002 patch carried (lance-format/lance#9446, "fix(linalg): build on architectures without SIMD kernels"): lance-linalg's build.rs now emits `cfg(simd_fallback)` for every target_arch other than x86_64/aarch64/loongarch64, and f32x8/f32x16/f64x4/f64x8/i32x8 gain an array-backed struct plus a scalar arm in each method under that cfg, inserted right after the per-arch struct definitions -- which is why the 0002 hunks no longer apply there. Rebasing them would define each type twice on riscv64, so both patches go: with no local lance fix to point at, the 0001 Cargo.toml redirect is moot and the crates.io lance 13.0.0 in lancedb's Cargo.lock is used as released. The patch-apply and lance-checkout steps now run only when the version being built has patches under patches/lancedb/<version>/, the same hashFiles() gate build-fastparquet.yml uses, so the 0.37.1-0.39.0 path is unchanged. Checked by type-checking lance v13.0.0's simd/{f32,f64,i32,u8}.rs for riscv64gc-unknown-linux-gnu: clean with simd_fallback set, and the old "cannot find type `f32x8`" errors without it. Signed-off-by: Ludovic Henry <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
f32x8/f32x16, f64x4/f64x8 and i32x8 only exist on x86_64, aarch64 and loongarch64, so lance-linalg fails to compile elsewhere (riscv64, s390x, ppc64le).
When Ceph enables Lance by default, the RISC-V build fails: ceph/ceph#71935