Skip to content

sparse_strips: Fix issues on big-endian targets - #1845

Open
LaurenzV wants to merge 3 commits into
mainfrom
laurenz/big-endian
Open

sparse_strips: Fix issues on big-endian targets#1845
LaurenzV wants to merge 3 commits into
mainfrom
laurenz/big-endian

Conversation

@LaurenzV

@LaurenzV LaurenzV commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

First commit adds a CI step that runs (only scalar) tests from vello_sparse_tests on a big-endian target. As you can see, it's completetly broken.

Second commit fixes this by making the u8_to_f32 and f32_to_u8 methods aware of endianness

@LaurenzV
LaurenzV requested a review from grebmeg August 25, 2026 11:07
@LaurenzV
LaurenzV marked this pull request as ready for review August 25, 2026 11:09
Comment thread .github/workflows/ci.yml Outdated
Comment on lines +349 to +381
test-stable-big-endian:
name: cargo test (big-endian, powerpc64)
needs: prime-lfs-cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Restore lfs cache
id: lfs-cache
uses: actions/cache/restore@v4
with:
path: .git/lfs
key: vello-lfs-${{ needs.prime-lfs-cache.outputs.lfs-hash }}
enableCrossOsArchive: true

- name: Checkout LFS files
run: git lfs checkout '${{ join(fromJson(env.LFS_FILES), ''' ''') }}'
continue-on-error: true

- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_STABLE_VER }}

- name: install cross
uses: taiki-e/install-action@v2
with:
tool: cross

- name: cargo test
run: cross test -p vello_sparse_tests --test tests --locked --release --target powerpc64-unknown-linux-gnu _scalar
env:
CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS: "true"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given how rare big-endian targets are and our already long, capacity-constrained CI, does this justify running the full scalar suite on every PR? Also, I'm cursiour, how did you discover this issue originally?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, as mentioned in the Zulip thread, happy to remove the CI part. To be honest I don't really remember anymore. 😅 I think it was when reviewing a fearless_simd PR where we discovered an issue with endianness and that's how I thought of taking a look at whether vello has similar issues.

@LaurenzV
LaurenzV requested a review from grebmeg August 28, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants