[RNG][ARMPL] Support using OpenRNG in place of ArmPL #660
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.
Description
Introduce the possibility to use the open-source OpenRNG library instead of the one bundled in ArmPL to build the oneMath ArmPL RNG backend. It can be used in two ways:
-DENABLE_ARMPL_OPENRNG=True
The benefit of the open-source version is that it also works on x86_64 CPUs, so the backend becomes more portable. It also enables users constrained to open-source projects to use the backend.
Introduce new CMake find module for OpenRNG using the standard wrappers. This means the usual system library directories will be searched and user can also specify
-DOpenRNG_ROOT=<path>
as with other CMake modules.The only functional difference between OpenRNG and ArmPL is that the former does not (currently) provide any API for version checking, so the version check is skipped. This means the oneMath backend will not throw version-dependent
unimplemented
exceptions in case of OpenRNG even if the version used doesn't support the feature. This affects the uniform integer distributions which give faulty results in negative integer ranges in previous releases of OpenRNG/ArmPL.Minor extra changes:
Checklist
Tested the below configurations where aarch64 is a
ubuntu:24.04/arm64
docker image emulated on x86_64 using binfmt: