Conversation
Ports lancedb 0.37.1 (maturin/pyo3, abi3-py310) to riscv64. Builds one cp310-abi3 wheel on cp312 with the same OOM/timeout mitigations build-deltalake.yml uses for a comparably sized Cargo workspace (~750 resolved crates for riscv64gc-unknown-linux-gnu): swap space, thin LTO/codegen-units=16 in place of the shipped fat-LTO release profile, and CARGO_BUILD_JOBS=2. protoc comes from Rocky 10's CRB repo, same as build-statsig-python-core.yml. Test suite mirrors run_tests/action.yml's non-integration path, with six files excluded for unconditional `import polars`/`import lance` (pylance) module-scope imports that have no riscv64 wheel.
lance-core's SIMD_SUPPORT static and lance-linalg's f32x8/f32x16/i32x8/ f64x4/f64x8 SIMD types compile only for x86_64/aarch64/loongarch64 upstream, so the first CI run failed at lance-core with "expected SimdSupport, found ()". Redirects both crates (pinned at =10.0.0) to a sibling checkout of the same tag carrying a portable scalar fallback, mirroring u8x16/u8x32's existing shape. Workflow clones that checkout and applies both patches before invoking cibuildwheel.
\`git -C lance apply ../python-wheels/...\` resolves the patch file's own path relative to lance/ once git changes into it, but bash still expands the *shell glob* (0002*.patch) relative to its own cwd ($GITHUB_WORKSPACE) before git ever runs, so it never matches and the literal, unexpanded path fails to open. \`cd lance &&\` makes both the glob expansion and git's path resolution agree.
CI run 33791589510 built the wheel successfully but failed at test time: 12 tests in test_db.py/test_hybrid_query.py/test_permutation.py/test_query.py import lance (pylance) or polars lazily inside the test body rather than at module scope, so they collect fine (unlike the six files already excluded via --ignore) but fail at runtime since neither package has a riscv64 wheel. The 13th, test_package_metadata.py::test_pyo3_abi_matches_minimum_supported_python, reads python/Cargo.toml relative to its own file path; CIBW_TEST_SOURCES only stages pyproject.toml and python/tests, so it always FileNotFoundErrors regardless of platform - it's a repo-metadata sanity check with nothing to verify against an installed wheel, not a riscv64-specific failure. Deselected individually rather than dropping the whole files, since each file has other tests that already pass (726 passed, 39 skipped, 45 deselected in the same run).
CI run 33843581031 built the wheel fine but failed at test time with the exact same 13 failures the prior commit's --deselect list targets -- the deselects never took effect. cibuildwheel runs CIBW_TEST_COMMAND from the parent of the CIBW_TEST_SOURCES tree (test_cwd/), which has no pyproject.toml of its own; that file only exists one level down at test_cwd/python/pyproject.toml. pytest's rootdir/inifile search only walks upward from the cwd, never into subdirectories, so it silently finds no config there -- confirmed locally by reproducing the exact cwd/config layout: --deselect nodeids that print identically either way only match once a config file is actually found. `cd python &&` before the pytest invocation puts pyproject.toml back in the search path (verified this restores --deselect matching), so paths in the test command drop one `python/` level to match the new cwd. Checked lancedb's python/pyproject.toml: its `--strict-markers` addopt is safe (the only markers the suite uses -- slow, asyncio, s3_test -- are exactly the ones it registers) and its --ignore-glob targets the source package, not tests, so this doesn't change what already passed.
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.
lancedb0.37.1Compiles LanceDB's Rust core (arrow, lance, datafusion, lance-index) into a pyo3 abi3 extension via maturin. Upstream publishes no riscv64 wheel.
Mirrors upstream's
pypi-publish.yml.Differs from upstream
build-statsig-python-core.ymllancedb-compatpackage andfp16kernelsfeature - no riscv64 equivalentMatrix: cp312 only - pyo3 carries
abi3-py310unconditionally, so one build covers every interpreter (asbuild-deltalake.ymldoes)Testing
run_tests/action.yml(-m "not slow and not s3_test")test_table.py,test_util.py,test_embeddings.py,test_namespace_integration.py,docs/test_guide_tables.py,docs/test_python.py- unconditionalimport polars/import lance(pylance), neither has a riscv64 wheelLicense: OK
Patches
0001-cargo-redirect-lance-core-lance-linalg-to-a-riscv64.patch- Inappropriate. Redirects lance-core/lance-linalg to a patched sibling checkout; reproduces on riscv64 only.0002-lance-linalg-add-a-portable-riscv64-simd-fallback.patch- To upstream. Adds a portable fallback for SIMD types that only compile on x86_64/aarch64/loongarch64; reproduces on riscv64 only.Built on cp312; TBD passed, TBD skipped.