Skip to content

FEAT: Add meson build + ctypes/pytest test driver with MPFR oracle#11

Draft
seiko2plus wants to merge 1 commit into
numpy:mainfrom
seiko2plus:new/test
Draft

FEAT: Add meson build + ctypes/pytest test driver with MPFR oracle#11
seiko2plus wants to merge 1 commit into
numpy:mainfrom
seiko2plus:new/test

Conversation

@seiko2plus

Copy link
Copy Markdown
Member

Top-level meson build compiles each op's test kernels into their own dlopen-able plugin, with Highway as a build-time subproject. The numpy_sr package dlopens the plugins and dispatches over numpy buffers via ctypes; tests are plain pytest.

  • Targets per ISA with ops exposed at module scope (numpy_sr.sin), accuracy= keyword taking Precise() profiles, fenv context manager.
  • Correctly-rounded MPFR reference kernels as oracle.
  • ULP assertion helpers and reusable test-data generators; first suite covers sin/cos.
  • Random test seed by default (NPSR_SEED overrides), shared across xdist workers so all sweep identical data.
  • spin build/test commands
  • CI smoke + stress.

Top-level meson build compiles each op's test kernels into their own
dlopen-able plugin, with Highway as a build-time subproject. The
numpy_sr package dlopens the plugins and dispatches over numpy buffers
via ctypes; tests are plain pytest.

- Targets per ISA with ops exposed at module scope (numpy_sr.sin),
  accuracy= keyword taking Precise() profiles, fenv context manager.
- Correctly-rounded MPFR reference kernels as oracle.
- ULP assertion helpers and reusable test-data generators; first suite
  covers sin/cos.
- Random test seed by default (NPSR_SEED overrides), shared across
  xdist workers so all sweep identical data.
- spin build/test commands
- CI smoke + stress.
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.

1 participant