GMM GPU update#127
Open
oshaughn wants to merge 7 commits into
Open
Conversation
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.
Owner
Author
|
Issues:
Most modern environments and our containers do this .... only ancient installations will fail (eg my old python3.8 environments) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
xpy port for mcsamplerEnsemble
Stabilization against future numpy versions. Broader test suite.
Portability (np.float128 not universally supported)