diff --git a/.github/workflows/build_linux_wheel/action.yml b/.github/workflows/build_linux_wheel/action.yml index 8c3e02f3..fd9e7377 100644 --- a/.github/workflows/build_linux_wheel/action.yml +++ b/.github/workflows/build_linux_wheel/action.yml @@ -14,6 +14,10 @@ inputs: # Note: this does *not* mean the host is arm64, since we might be cross-compiling. required: false default: "false" + manylinux: + description: "The manylinux version to build for" + required: false + default: "2_17" runs: using: "composite" steps: @@ -28,7 +32,7 @@ runs: command: build working-directory: python target: x86_64-unknown-linux-gnu - manylinux: "2_17" + manylinux: ${{ inputs.manylinux }} args: ${{ inputs.args }} before-script-linux: | set -e @@ -43,7 +47,7 @@ runs: command: build working-directory: python target: aarch64-unknown-linux-gnu - manylinux: "2_24" + manylinux: ${{ inputs.manylinux }} args: ${{ inputs.args }} before-script-linux: | set -e diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 66605cc9..aacd5848 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -6,13 +6,23 @@ on: jobs: linux: + name: Python ${{ matrix.config.platform }} manylinux${{ matrix.config.manylinux }} timeout-minutes: 60 strategy: matrix: python-minor-version: ["8"] - platform: - - x86_64 - - aarch64 + config: + - platform: x86_64 + manylinux: "2_17" + extra_args: "" + - platform: x86_64 + manylinux: "2_28" + extra_args: "--features fp16kernels" + - platform: aarch64 + manylinux: "2_24" + extra_args: "" + # We don't build fp16 kernels for aarch64, because it uses + # cross compilation image, which doesn't have a new enough compiler. runs-on: "ubuntu-22.04" steps: - uses: actions/checkout@v4 @@ -26,8 +36,9 @@ jobs: - uses: ./.github/workflows/build_linux_wheel with: python-minor-version: ${{ matrix.python-minor-version }} - args: "--release --strip" - arm-build: ${{ matrix.platform == 'aarch64' }} + args: "--release --strip ${{ matrix.config.extra_args }}" + arm-build: ${{ matrix.config.platform == 'aarch64' }} + manylinux: ${{ matrix.config.manylinux }} - uses: ./.github/workflows/upload_wheel with: token: ${{ secrets.LANCEDB_PYPI_API_TOKEN }} @@ -58,7 +69,7 @@ jobs: - uses: ./.github/workflows/build_mac_wheel with: python-minor-version: ${{ matrix.python-minor-version }} - args: "--release --strip --target ${{ matrix.config.target }}" + args: "--release --strip --target ${{ matrix.config.target }} --features fp16kernels" - uses: ./.github/workflows/upload_wheel with: python-minor-version: ${{ matrix.python-minor-version }} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d9c5358f..464bc01a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -31,6 +31,10 @@ jobs: run: shell: bash working-directory: rust + env: + # Need up-to-date compilers for kernels + CC: gcc-12 + CXX: g++-12 steps: - uses: actions/checkout@v4 with: @@ -54,6 +58,10 @@ jobs: run: shell: bash working-directory: rust + env: + # Need up-to-date compilers for kernels + CC: gcc-12 + CXX: g++-12 steps: - uses: actions/checkout@v4 with: diff --git a/python/Cargo.toml b/python/Cargo.toml index 0811b692..45186383 100644 --- a/python/Cargo.toml +++ b/python/Cargo.toml @@ -31,3 +31,6 @@ pyo3-build-config = { version = "0.20.3", features = [ "extension-module", "abi3-py38", ] } + +[features] +fp16kernels = ["lancedb/fp16kernels"] diff --git a/rust/lancedb/Cargo.toml b/rust/lancedb/Cargo.toml index 538edde6..ee7e4ba2 100644 --- a/rust/lancedb/Cargo.toml +++ b/rust/lancedb/Cargo.toml @@ -50,3 +50,4 @@ walkdir = "2" [features] default = ["remote"] remote = ["dep:reqwest"] +fp16kernels = ["lance-linalg/fp16kernels"] \ No newline at end of file