Skip to content

GMM GPU update#127

Open
oshaughn wants to merge 7 commits into
rift_O4dfrom
rift_O4d_gmm_gpu
Open

GMM GPU update#127
oshaughn wants to merge 7 commits into
rift_O4dfrom
rift_O4d_gmm_gpu

Conversation

@oshaughn
Copy link
Copy Markdown
Owner

@oshaughn oshaughn commented May 4, 2026

xpy port for mcsamplerEnsemble
Stabilization against future numpy versions. Broader test suite.
Portability (np.float128 not universally supported)

Richard O'Shaughnessy and others added 7 commits May 4, 2026 07:20
Add RIFT.precision and route all extended-precision dtype use through it.

* RIFT.precision (new): RiftFloat resolves to numpy.longdouble whenever
  the platform's long double has itemsize > 8 (e.g. Linux x86_64), and
  otherwise falls back to numpy.float64. Also exports
  RIFT_FLOAT_HIGH_PRECISION and RIFT_FLOAT_NAME. Eliminates the
  import-time AttributeError when numpy.float128 is absent (macOS arm64,
  Windows MSVC, non-x86 Linux, future numpy 2.x platforms).

* Integrator package: replace every numpy.float128 / np.float128 in
    mcsampler.py, mcsamplerEnsemble.py, mcsamplerGPU.py,
    mcsamplerAdaptiveVolume.py, mcsamplerNFlow.py, mcsamplerPortfolio.py,
    statutils.py
  with RiftFloat. The dtype-equality guards in mcsamplerGPU and
  mcsamplerNFlow ("if weights_alt.dtype == numpy.float128: cast to
  float64") degrade gracefully when RiftFloat == float64 (the
  conditional astype becomes a no-op).

* likelihood/factored_likelihood.py and
  interpolators/BayesianLeastSquares.py: same RiftFloat swap, so they
  also import cleanly on platforms without np.float128.

* CI (.github/workflows/ci.yml): add rift_O4d_gmm_gpu to the trigger
  branches; expand the install matrix to 3.9-3.13; convert
  import-check and test-run into a two-lane matrix:
    - legacy : python 3.9  + numpy==1.24.4   (historical green build)
    - modern : python 3.12 + numpy>=2.0,<3.0 (forward-looking gate)
  Numpy is pinned after requirements.txt, so the unpinned 'numpy' line
  in requirements.txt is preserved. Test-log artifacts are named
  per-lane so failures from each can be uploaded independently.

No behavioral change on the existing legacy CI lane: RiftFloat is
numpy.longdouble there, which is the exact 16-byte type previously
spelled numpy.float128. The modern CI lane is the new gate.
@oshaughn
Copy link
Copy Markdown
Owner Author

oshaughn commented May 14, 2026

Issues:

  • cupyx.scipy.special.logsumexp doesn't exist until version 13 of copy; we need the same fallback mode implemented in the other wrappers.

Most modern environments and our containers do this .... only ancient installations will fail (eg my old python3.8 environments)

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