Skip to content
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

[RNG] Added experimental support of Philox counter-based PRNG #1785

Merged
merged 55 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
1b685d5
* Initial changes for Philox support
ElenaTyuleneva Jul 4, 2024
cc88633
* c param removed
ElenaTyuleneva Jul 4, 2024
0ce5e38
Stuff functions added
ElenaTyuleneva Jul 11, 2024
1115e29
Implementation is made simplier. v.1
ElenaTyuleneva Jul 16, 2024
d8cd85f
* Operator () returns the correct result
ElenaTyuleneva Jul 23, 2024
29eff6d
* discard() method is almost working
ElenaTyuleneva Jul 24, 2024
83d3f7b
* discard() works correctly
ElenaTyuleneva Jul 26, 2024
d8cc9de
* Initial changes for Philox support
ElenaTyuleneva Jul 4, 2024
5cc7358
* c param removed
ElenaTyuleneva Jul 4, 2024
a46c755
Stuff functions added
ElenaTyuleneva Jul 11, 2024
37c902d
Implementation is made simplier. v.1
ElenaTyuleneva Jul 16, 2024
ac35a03
* Operator () returns the correct result
ElenaTyuleneva Jul 23, 2024
4381b8e
* discard() method is almost working
ElenaTyuleneva Jul 24, 2024
d3e6359
* discard() works correctly
ElenaTyuleneva Jul 26, 2024
a014fdc
Merge branch 'dev/etyulene/eng_philox_engine' of https://github.com/o…
ElenaTyuleneva Jul 30, 2024
f2c8c97
* Sources clean-up
ElenaTyuleneva Aug 2, 2024
4ba638a
* State structure changed
ElenaTyuleneva Aug 2, 2024
d70a34e
* Small refactoring
ElenaTyuleneva Aug 2, 2024
0f4899e
* Operators (==, !=, >> and <<) added, as well as test for them
ElenaTyuleneva Aug 5, 2024
0c200d4
Merge remote-tracking branch 'origin/main' into dev/etyulene/eng_phil…
ElenaTyuleneva Aug 5, 2024
e20f8b1
* Interface tests fixed
ElenaTyuleneva Aug 6, 2024
d299ad7
* Implemented increase_counter_internal() with a increment as an inpu…
ElenaTyuleneva Aug 7, 2024
7edd1b0
* class API was extended to support sycl::vec
ElenaTyuleneva Aug 14, 2024
98314aa
* Refactoring done[1]
ElenaTyuleneva Aug 20, 2024
a4ea837
* Refactoring[2]
ElenaTyuleneva Aug 20, 2024
9b3a174
* Corrected review comments
ElenaTyuleneva Aug 21, 2024
8a18f46
Added device test+fixed more review comments
ElenaTyuleneva Aug 21, 2024
0811fe1
* One more iteration of review comments fix
ElenaTyuleneva Aug 21, 2024
c248fcc
* Style changes
ElenaTyuleneva Aug 21, 2024
50c586c
* namespace detail was replaced with internal
ElenaTyuleneva Aug 26, 2024
864d32e
* Public class members are put first
ElenaTyuleneva Aug 27, 2024
e73422b
* Added test for the philox2x32 and philox2x64 statistics (check that…
ElenaTyuleneva Aug 27, 2024
757d370
* Added uglifications to the class implementation
ElenaTyuleneva Aug 27, 2024
808ac4f
* Mark Philox as experimental
ElenaTyuleneva Aug 27, 2024
c502908
*clang-format applied
ElenaTyuleneva Aug 27, 2024
a9bfed4
* Changed copyrights
ElenaTyuleneva Aug 28, 2024
28273f4
* array_size was uglified
ElenaTyuleneva Sep 2, 2024
3fd3a9f
* Constants order was also changed in documentation and test logging
ElenaTyuleneva Sep 2, 2024
091819d
* Removed conversion to tuple
ElenaTyuleneva Sep 2, 2024
4102ef3
* Removed :: before std according to the latest standards
ElenaTyuleneva Sep 2, 2024
2faf49c
* Stuff from detail was moved to the class
ElenaTyuleneva Sep 2, 2024
30bb75e
* class=>typename in templates
ElenaTyuleneva Sep 3, 2024
ccc0f1f
* philox_test.pass was extended with precise corner-case testing
ElenaTyuleneva Sep 3, 2024
c7ee5a5
* set_counter() a bit simplified
ElenaTyuleneva Sep 3, 2024
0afacfe
* The logic of idx iteration is changed
ElenaTyuleneva Sep 3, 2024
bdb501e
* Statistics tests were extended testing for cases bitsize(result_typ…
ElenaTyuleneva Sep 3, 2024
d4f9186
* Added a separate unit testing with corner-case testing functions
ElenaTyuleneva Sep 3, 2024
59b2209
Merge remote-tracking branch 'origin/main' into dev/etyulene/eng_phil…
ElenaTyuleneva Sep 3, 2024
d0edaa8
* applied review comments
ElenaTyuleneva Sep 3, 2024
08cbed5
* Applied clang-format
ElenaTyuleneva Sep 3, 2024
3fd8887
Update filename in philox_engine.h
ElenaTyuleneva Sep 3, 2024
b0bd54b
* Review comments partly addressed
ElenaTyuleneva Sep 4, 2024
e969ee4
* Applied cosmetic comments
ElenaTyuleneva Sep 4, 2024
e99667f
* Changed max() method
ElenaTyuleneva Sep 4, 2024
1ff549c
* Changed max value in test and applied clang-format
ElenaTyuleneva Sep 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions documentation/library_guide/api_for_sycl_kernels/random.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Engine Description
``linear_congruential_engine`` Implements a linear congruential algorithm
``subtract_with_carry_engine`` Implements a subtract-with-carry algorithm
``discard_block_engine`` Implements a discard block adaptor
``philox_engine`` Implements a Philox algorithm
============================== =========================================================================================================

Predefined Random Number Engines
Expand All @@ -37,6 +38,8 @@ Type Descriptio
``ranlux48_base`` ``oneapi::dpl::subtract_with_carry_engine<std::uint64_t, 48, 5, 12>``
``ranlux24`` ``oneapi::dpl::discard_block_engine<ranlux24_base, 223, 23>``
``ranlux48`` ``oneapi::dpl::discard_block_engine<ranlux48_base, 389, 11>``
``philox4x32`` ``oneapi::dpl::experimental::philox_engine<std::uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85>``
``philox4x64`` ``oneapi::dpl::experimental::philox_engine<std::uint_fast64_t, 64, 4, 10, 0xCA5A826395121157, 0x9E3779B97F4A7C15, 0xD2E7470EE14C6C93, 0xBB67AE8584CAA73B>``
===================================================================== =========================================================================================================

The engines described below can efficiently generate vectors of random numbers. These types are
Expand All @@ -57,6 +60,10 @@ Type Descriptio
ranlux24 for a vector generation case
``template<std::int32_t N> ranlux48_vec<N>`` ``oneapi::dpl::discard_block_engine<ranlux48_base_vec<N>, 389, 11>``
ranlux48 for vector generation case
``template<std::int32_t N> philox4x32_vec<N>`` ``oneapi::dpl::experimental::philox_engine<sycl::vec<std::uint_fast32_t, N>, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85>``
philox4x32 for a vector generation case
``template<std::int32_t N> philox4x64_vec<N>`` ``oneapi::dpl::experimental::philox_engine<sycl::vec<std::uint_fast64_t, N>, 64, 4, 10, 0xCA5A826395121157, 0x9E3779B97F4A7C15, 0xD2E7470EE14C6C93, 0xBB67AE8584CAA73B>``
philox4x64 for a vector generation case
===================================================================== =========================================================================================================

Random Number Distributions
Expand Down
Loading
Loading