Skip to content

Fix 32-bit regressions in ndarray encode/decode and stochastic rounding tests - #60

Merged
awf merged 3 commits into
graphcore-research:mainfrom
awf:issue-57-fix
Apr 17, 2026
Merged

awf merged 3 commits into
graphcore-research:mainfrom
awf:issue-57-fix

Conversation

@awf

@awf awf commented Apr 17, 2026

Copy link
Copy Markdown
Collaborator

Title

Fix 32-bit regressions in ndarray encode/decode and stochastic rounding tests

Description

Summary

This PR resolves issue #57 by removing temporary 32-bit xfails and fixing the underlying dtype/bit-packing issues that caused i386 failures.

Changes

  • Fixes ndarray decode path to use 32-bit-safe ldexp exponent/input dtypes.
  • Fixes ndarray encode path bitfield packing to avoid sign-extension/overflow behavior on 32-bit.
  • Updates stochastic-rounding test random-bit generation to use explicit int64 so 2**32 bounds work on 32-bit Python.
  • Restores intended stochastic test coverage (srnumbits=32) after dtype-safe generation.
  • Updates linux/386 test script argument handling so:
    • trailing args are forwarded to pytest
    • default test target is only used when no args are supplied
    • sh ... invocation remains robust

Validation

  • sh etc/test-linux-386.sh run -vv test/test_encode.py::test_encode[binary32] ✅
  • sh etc/test-linux-386.sh run ✅ (913 passed, 3 skipped)
  • Local focused suite on modified areas ✅ (872 passed)

Context

Closes #57.

@awf
awf merged commit 23b27ad into graphcore-research:main Apr 17, 2026
2 checks passed
@orlitzky orlitzky mentioned this pull request Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant