Skip to content

Fix 32-bit build: derive transpose_bit_tile masks from word width - #214

Merged
MIWdlB merged 1 commit into
mainfrom
claude/transpose-bit-tile-usize-ci-4coy6d
Jul 22, 2026
Merged

Fix 32-bit build: derive transpose_bit_tile masks from word width#214
MIWdlB merged 1 commit into
mainfrom
claude/transpose-bit-tile-usize-ci-4coy6d

Conversation

@MIWdlB

@MIWdlB MIWdlB commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

transpose_bit_tile used a hardcoded 64-bit mask table, whose constants overflow a 32-bit usize under #[deny(overflowing_literals)] and broke the armv7-unknown-linux-gnueabihf release build.

`transpose_bit_tile` used a hardcoded 64-bit mask table, whose constants
overflow a 32-bit `usize` under `#[deny(overflowing_literals)]` and broke
the `armv7-unknown-linux-gnueabihf` release build. Make the kernel
const-generic over the native word width `W` and derive each delta-swap
mask from `W` in-function, so no literal ever exceeds `usize`. On 64-bit
the generated masks are identical to before; on 32-bit it is a genuine
32x32 transpose.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014wgBvihvs17T57UiTrG2bJ
@codspeed-hq

codspeed-hq Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 3.48%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 4 (👁 4) regressed benchmarks
✅ 52 untouched benchmarks
⏩ 100 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
👁 Simulation test_benchmark_decode_zbasis_ensemble[128-JKMN] 205.8 ms 212.3 ms -3.06%
👁 Simulation test_benchmark_decode_zbasis_ensemble[32-JordanWigner] 51.1 ms 53.2 ms -3.85%
👁 Simulation test_benchmark_decode_zbasis_ensemble[32-Parity] 50.9 ms 52.9 ms -3.79%
👁 Simulation test_benchmark_decode_zbasis_ensemble[64-BravyiKitaev] 96.1 ms 99.3 ms -3.24%

Comparing claude/transpose-bit-tile-usize-ci-4coy6d (de98d2f) with main (2f633b2)

Open in CodSpeed

Footnotes

  1. 100 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@MIWdlB
MIWdlB merged commit 79c2cf0 into main Jul 22, 2026
4 of 5 checks passed
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