-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random module deprecations and stabilization improvements #23752
Random module deprecations and stabilization improvements #23752
Conversation
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
…dom module Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
…dule Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
…). Remove the parSafe option from randomStream, making it always parallel unsafe Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked at the test changes yet, but wanted to get my review comments about the module changes to you before I get to the test changes.
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
…precated manner Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
…tion/testGenLib related to importing 'Set' and 'NPBrandom' in 'Random' (use an associative domain instead of a set). Reproducer and issue forthcoming. Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'm worried that the tests moved to test/deprecated/random were moved with too big of a brush. Many of these are useful tests of determinism or statistical properties and I think we want to keep those tests. But, I see that many of these tests might use a deprecated feature. If you don't feel you have time to update them before merging this PR, that is OK, but I'd like to see follow-up to move them back to test/library & potentially have the .good files include the deprecation warning until we update them individually to avoid deprecated features.
test/deprecated/random/RandomStreamInterface/choiceTestArray.good
Outdated
Show resolved
Hide resolved
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
… calling the time module directly Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Thanks for the review @mppf! Based on your comments above, I'll have two follow up PRs:
|
Fix a few test failures in GPU and linear algebra testing caused by #23752. Also updates a few other tests that used deprecated Random features (but weren't failing due to NOTEST's etc.) - [x] failing gpu passing (CHPL_GPU=cpu) - [x] failing linalg tests passing on cray xc - [x] paratest [ trivial - not reviewed ]
A follow up to #23752 - fixes a few tests that were failing on 32 bit linux - evidently the PCG random number generator will produce floating point values that are more prone to floating point rounding errors on 32 bit systems (as compared to the NPB random number generator). - the tests have been adjusted to use NPB instead of PCG - removes deprecated symbols from some random module tests and adjusts good files - follow up to [this comment](#23752 (comment)) **Testing:** - [ ] failing tests passing on 32 bit linux - [x] adjusted tests passing - [x] paratest [ trivial - not reviewed ]
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
#23752 broke `reductions/thomasvandoren/test/TestSorted` by replacing the test's .good file with its .bad file. This PR corrects that mistake. Also adds a new future to track a bug related to separate compilation discovered while implementing changes to the Random module. See: #23929 - [x] clean match against .bad in reductions/thomasvandoren/test/TestSorted - [x] clean match agianst .bad in new future - [x] paratest [ trivial - not reviewed ]
Hi @jeremiah-corrado and @mppf — I didn’t catch this until now, but I don’t think the HPCC benchmarks should use NPBRandom, but Random instead. The only tests that I’m aware of that care what the random number generator is are the NAS Parallel Benchmarks (where the NPB comes from). All others should focus on using the default/standard random number generator instead to be less "weird" / rely on unstable packages and fetures. For example, stream just wants some data in the vectors, and doesn’t really care what that data is. Can you take a cleanup item (post-release at this point) to update such cases to simply use |
Yeah, I can create a follow-on PR next sprint that makes those changes. |
Remove uses of `NPBRandom` from tests and replace with `Random`, per the suggestion [here](#23752 (comment)). The tests that still use NPBRandom are: * the NAS parallel benchmarks * tests specific to the NPBRandom module (deprecation tests, correctness tests, etc.) * some constrained-generics tests that have their own copies of the Random/NPBRandom modules * the machine learning test that rely on it's relative speed * the `ssca2` tests that rely on some lower level NPBRandom features * a few miscellaneous tests use `NPBRandom.oddTimeSeed` to get a seed value since `Random` doesn't have a stable way to do that yet Testing: - [x] local paratest - [x] gasnet paratest [ reviewed by @jabraham17 ] - Thanks!
Stabilization changes to the
Random
module:RandomStreamInterface
RNG
,defaultRNG
andRandomStream
symbols used to select between PCG and NPB rngsRNG
argument in favor of those that don'trandomStream
which wraps the PCGRandomStream implementation in a slightly simplified interface:randomStream
is now type-specific (can only generate values of one type)randomStream
is not parallel safefillRandom
is now calledfill
PCGRandom
submodule in favor of usingrandomStream
NPBRandom
submodule to a standalone package modulecreateRandomStream
in favor ofnew randomStream
SeedGenerator
(and theRandomSupport
submodule in general)The
Random
module is no longer unstable as a whole. The following symbols are unstable pending further design discussions (summarized here):permutation
andrandomStream.permutation
randomStream.choice
randomStream.getNth
andrandomStream.skipToNth
randomStream.iterate
PCGRandomLib
submoduleNotes to reviewer
randomStream
instead ofPCGRandomStream
orNPBRandomStream
randomStream
is used (which sometimes involved adjusting.good
files when moving from the NPB algorithm)NPBRand
package module. This was only done for some performance tests that rely on NPB's relative speed, or in cases where adjusting the good file would not have been trivial.Random
are not testing the module itself, but are using it to create random test data or for other algorithms that require randomness (i.e., some sorting algorithms).deprecated/
or underlibrary/standard/Random/
are testing the module itself and thus should probably be reviewed more closelyTesting: