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

Implementing cunumeric.random.BitGenerator #254

Merged
merged 96 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
d8537be
Implementing BitGenerator - GPU part - creation
fduguet-nv Mar 21, 2022
6f8437d
Plugging destroy
fduguet-nv Mar 23, 2022
e997e8d
skip ahead for GPU BitGenerator random_raw
fduguet-nv Mar 25, 2022
e805210
Refectoring test
fduguet-nv Mar 28, 2022
536c871
Piping done for BitGenerator.random_raw
fduguet-nv Mar 28, 2022
14304e8
LGT-260 -- implemented random_raw for CUDA
fduguet-nv Mar 29, 2022
75fea76
Implementing BitGenerator - GPU part - creation
fduguet-nv Mar 21, 2022
c436346
Plugging destroy
fduguet-nv Mar 23, 2022
bec87f7
skip ahead for GPU BitGenerator random_raw
fduguet-nv Mar 25, 2022
c3b1000
Refectoring test
fduguet-nv Mar 28, 2022
7133cf8
Piping done for BitGenerator.random_raw
fduguet-nv Mar 28, 2022
55c2d4c
LGT-260 -- implemented random_raw for CUDA
fduguet-nv Mar 29, 2022
fdb284b
Updating pre-commit
fduguet-nv Mar 29, 2022
80e2c66
Updating pre-commit
fduguet-nv Mar 29, 2022
3ffbd6c
Adding Multi-GPU support
fduguet-nv Mar 31, 2022
4b7ee28
Merge branch 'nv-legate:branch-22.05' into fduguet
fduguet-nv Mar 31, 2022
c2e71e0
Refactoring
fduguet-nv Apr 1, 2022
601dbbb
refactoring
fduguet-nv Apr 1, 2022
006cd04
CPU support - issues remain on multi-cpu mapper
fduguet-nv Apr 1, 2022
f1ae1be
Merge branch 'fduguet' of https://github.com/fduguet-nv/cunumeric int…
fduguet-nv Apr 1, 2022
e8be760
Attempts to support multi-dimension
fduguet-nv Apr 1, 2022
a6944a9
Finalizing multi-cpu implementation of BitGenerator
fduguet-nv Apr 1, 2022
3bed169
merging
fduguet-nv Apr 1, 2022
4ad2adb
Repro behavior of BitGenerator
fduguet-nv Apr 1, 2022
65d38c4
Merge branch 'nv-legate:branch-22.05' into fduguet
fduguet-nv Apr 8, 2022
5f283f2
Adding random in tests
fduguet-nv Apr 8, 2022
7b8702e
Merge branch 'fduguet' of https://github.com/fduguet-nv/cunumeric int…
fduguet-nv Apr 8, 2022
b7d103a
Fixes from code review - part 1
fduguet-nv Apr 9, 2022
b4891dc
use of logger
fduguet-nv Apr 14, 2022
7fc1643
Enums improvement
fduguet-nv Apr 15, 2022
c405020
Merge branch 'nv-legate:branch-22.05' into fduguet
fduguet-nv Apr 15, 2022
bd504af
Merge branch 'fduguet' of https://github.com/fduguet-nv/cunumeric int…
fduguet-nv Apr 15, 2022
31f44cc
More on code review
fduguet-nv Apr 19, 2022
d36140a
Merge
fduguet-nv Apr 19, 2022
7f3b9e5
Merge branch 'nv-legate:branch-22.05' into fduguet
fduguet-nv Apr 20, 2022
f373e36
code review
fduguet-nv Apr 21, 2022
1e8c615
Removing task in python destructor
fduguet-nv Apr 21, 2022
9f335ed
Merge branch 'nv-legate:branch-22.05' into fduguet
fduguet-nv Apr 21, 2022
f0a9f12
Merge branch 'fduguet' of https://github.com/fduguet-nv/cunumeric int…
fduguet-nv Apr 21, 2022
16b5bf2
Using Shape
fduguet-nv Apr 21, 2022
7b216e4
Lazy destroy also at destroy
fduguet-nv Apr 21, 2022
23ecf09
Using create_buffer for temporary buffer creation
fduguet-nv May 18, 2022
c956669
Merging with branch 22.05
fduguet-nv May 18, 2022
de7522a
Fixing bugs following merge
fduguet-nv May 18, 2022
ce39f7f
Merge remote-tracking branch 'origin/branch-22.05' into fduguet
fduguet-nv May 24, 2022
b1abb4e
Adding alternate lazy init implementation
fduguet-nv May 24, 2022
392c9db
Adding force create and force destroy
fduguet-nv May 24, 2022
57ef74b
Removing constraint in mapper
fduguet-nv May 24, 2022
00c7557
Updating test
fduguet-nv May 25, 2022
4214b1c
Fixing Eager code branch
fduguet-nv May 25, 2022
565f52c
Updating license information and adding integer generator
fduguet-nv May 25, 2022
67ffae0
Merging with branch 22.07
fduguet-nv May 30, 2022
b0b250a
PR review
fduguet-nv Jun 1, 2022
5580280
Removing reference to removed omp file
fduguet-nv Jun 1, 2022
d77163a
Changes from PR comments
fduguet-nv Jun 20, 2022
0a93761
Merge
fduguet-nv Jun 20, 2022
ad58247
Merge remote-tracking branch 'origin/branch-22.07' into fduguet
fduguet-nv Jun 28, 2022
3727c75
Adding generator.random implementation
fduguet-nv Jun 28, 2022
2cda5c4
Adding generator.lognormal implementation
fduguet-nv Jun 28, 2022
60b688c
Adding generator.normal implementation
fduguet-nv Jun 28, 2022
6218e17
Adding generator.poisson implementation
fduguet-nv Jun 28, 2022
9d23034
Refectoring randutil to allow host-only compilation without CUDA enabled
fduguet-nv Jun 29, 2022
f9e928a
Moving distributions to HOST only capable
fduguet-nv Jun 29, 2022
73e9ac1
Minor refactoring to split compilation of further distributions
fduguet-nv Jun 29, 2022
5f3e9c6
Merge remote-tracking branch 'origin/branch-22.07' into fduguet
fduguet-nv Jun 29, 2022
4cd1531
Merging
fduguet-nv Jun 30, 2022
186ca84
Merge remote-tracking branch 'origin/branch-22.07' into fduguet
fduguet-nv Jul 4, 2022
a2787ec
Fixing openmp test failure
fduguet-nv Jul 4, 2022
e87f6db
Adding random.generator.exponential
fduguet-nv Jul 4, 2022
69075cd
Adding random.generator.gumbel
fduguet-nv Jul 4, 2022
666484d
Splitting distributions in several files
fduguet-nv Jul 4, 2022
19e47ca
Actually applying the WAR
fduguet-nv Jul 5, 2022
d5ccf56
Adding random.generator.laplace
fduguet-nv Jul 5, 2022
4bd8cb0
Adding random.generator.logistic
fduguet-nv Jul 5, 2022
c1546e0
Adding random.generator.pareto
fduguet-nv Jul 5, 2022
370e94c
Adding random.generator.power
fduguet-nv Jul 5, 2022
192fb4a
Adding random.generator.rayleigh
fduguet-nv Jul 5, 2022
4ccd7d2
Adding random.generator.standard_cauchy
fduguet-nv Jul 5, 2022
a54c3df
Merge remote-tracking branch 'origin/branch-22.07' into fduguet
fduguet-nv Jul 7, 2022
7fbdf60
Adding random.generatortriangular
fduguet-nv Jul 7, 2022
78a7c87
Adding random.generator.weibul
fduguet-nv Jul 8, 2022
1449e91
Adding random.generator.bytes
fduguet-nv Jul 8, 2022
90135c9
PR review
fduguet-nv Jul 15, 2022
7364d28
PR review
fduguet-nv Jul 15, 2022
cacee28
PR review
fduguet-nv Jul 15, 2022
37df124
PR review
fduguet-nv Jul 15, 2022
f530847
merge
fduguet-nv Jul 15, 2022
2450038
fixing glitch
fduguet-nv Jul 15, 2022
ee2c203
Merge remote-tracking branch 'origin/branch-22.07' into fduguet
fduguet-nv Jul 18, 2022
1a7ff8c
More work on PR
fduguet-nv Jul 20, 2022
a40a94f
Merge remote-tracking branch 'origin/branch-22.07' into fduguet
fduguet-nv Jul 20, 2022
c3c7d7e
Fixing CURANDAPI
fduguet-nv Jul 20, 2022
6dfb548
Moving logger symbol from .cu to .cc
fduguet-nv Jul 21, 2022
185c354
removing destroy
fduguet-nv Jul 25, 2022
997e848
Merge
fduguet-nv Jul 25, 2022
68b3a01
Merge remote-tracking branch 'origin/branch-22.07' into fduguet
fduguet-nv Jul 26, 2022
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
56 changes: 56 additions & 0 deletions cunumeric/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ class CuNumericOpCode(IntEnum):
BINARY_OP = _cunumeric.CUNUMERIC_BINARY_OP
BINARY_RED = _cunumeric.CUNUMERIC_BINARY_RED
BINCOUNT = _cunumeric.CUNUMERIC_BINCOUNT
BITGENERATOR = _cunumeric.CUNUMERIC_BITGENERATOR
CHOOSE = _cunumeric.CUNUMERIC_CHOOSE
CONTRACT = _cunumeric.CUNUMERIC_CONTRACT
CONVERT = _cunumeric.CUNUMERIC_CONVERT
Expand Down Expand Up @@ -441,6 +442,61 @@ class CuNumericTunable(IntEnum):
HAS_NUMAMEM = _cunumeric.CUNUMERIC_TUNABLE_HAS_NUMAMEM


# Match these to BitGeneratorOperation in cunumeric_c.h
@unique
class BitGeneratorOperation(IntEnum):
CREATE = _cunumeric.CUNUMERIC_BITGENOP_CREATE
DESTROY = _cunumeric.CUNUMERIC_BITGENOP_DESTROY
RAND_RAW = _cunumeric.CUNUMERIC_BITGENOP_RAND_RAW
DISTRIBUTION = _cunumeric.CUNUMERIC_BITGENOP_DISTRIBUTION


# Match these to BitGeneratorType in cunumeric_c.h
@unique
class BitGeneratorType(IntEnum):
DEFAULT = _cunumeric.CUNUMERIC_BITGENTYPE_DEFAULT
XORWOW = _cunumeric.CUNUMERIC_BITGENTYPE_XORWOW
MRG32K3A = _cunumeric.CUNUMERIC_BITGENTYPE_MRG32K3A
MTGP32 = _cunumeric.CUNUMERIC_BITGENTYPE_MTGP32
MT19937 = _cunumeric.CUNUMERIC_BITGENTYPE_MT19937
PHILOX4_32_10 = _cunumeric.CUNUMERIC_BITGENTYPE_PHILOX4_32_10


# Match these to BitGeneratorDistribution in cunumeric_c.h
@unique
class BitGeneratorDistribution(IntEnum):
INTEGERS_32 = _cunumeric.CUNUMERIC_BITGENDIST_INTEGERS_32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a nitpick: maybe we should sort distributions alphabetically so that we can later spot them quickly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we push that until we have all of them ? merge would be easier that way.

INTEGERS_64 = _cunumeric.CUNUMERIC_BITGENDIST_INTEGERS_64
UNIFORM_32 = _cunumeric.CUNUMERIC_BITGENDIST_UNIFORM_32
UNIFORM_64 = _cunumeric.CUNUMERIC_BITGENDIST_UNIFORM_64
LOGNORMAL_32 = _cunumeric.CUNUMERIC_BITGENDIST_LOGNORMAL_32
LOGNORMAL_64 = _cunumeric.CUNUMERIC_BITGENDIST_LOGNORMAL_64
NORMAL_32 = _cunumeric.CUNUMERIC_BITGENDIST_NORMAL_32
NORMAL_64 = _cunumeric.CUNUMERIC_BITGENDIST_NORMAL_64
POISSON = _cunumeric.CUNUMERIC_BITGENDIST_POISSON
EXPONENTIAL_32 = _cunumeric.CUNUMERIC_BITGENDIST_EXPONENTIAL_32
EXPONENTIAL_64 = _cunumeric.CUNUMERIC_BITGENDIST_EXPONENTIAL_64
GUMBEL_32 = _cunumeric.CUNUMERIC_BITGENDIST_GUMBEL_32
GUMBEL_64 = _cunumeric.CUNUMERIC_BITGENDIST_GUMBEL_64
LAPLACE_32 = _cunumeric.CUNUMERIC_BITGENDIST_LAPLACE_32
LAPLACE_64 = _cunumeric.CUNUMERIC_BITGENDIST_LAPLACE_64
LOGISTIC_32 = _cunumeric.CUNUMERIC_BITGENDIST_LOGISTIC_32
LOGISTIC_64 = _cunumeric.CUNUMERIC_BITGENDIST_LOGISTIC_64
PARETO_32 = _cunumeric.CUNUMERIC_BITGENDIST_PARETO_32
PARETO_64 = _cunumeric.CUNUMERIC_BITGENDIST_PARETO_64
POWER_32 = _cunumeric.CUNUMERIC_BITGENDIST_POWER_32
POWER_64 = _cunumeric.CUNUMERIC_BITGENDIST_POWER_64
RAYLEIGH_32 = _cunumeric.CUNUMERIC_BITGENDIST_RAYLEIGH_32
RAYLEIGH_64 = _cunumeric.CUNUMERIC_BITGENDIST_RAYLEIGH_64
CAUCHY_32 = _cunumeric.CUNUMERIC_BITGENDIST_CAUCHY_32
CAUCHY_64 = _cunumeric.CUNUMERIC_BITGENDIST_CAUCHY_64
TRIANGULAR_32 = _cunumeric.CUNUMERIC_BITGENDIST_TRIANGULAR_32
TRIANGULAR_64 = _cunumeric.CUNUMERIC_BITGENDIST_TRIANGULAR_64
WEIBULL_32 = _cunumeric.CUNUMERIC_BITGENDIST_WEIBULL_32
WEIBULL_64 = _cunumeric.CUNUMERIC_BITGENDIST_WEIBULL_64
BYTES = _cunumeric.CUNUMERIC_BITGENDIST_BYTES


# Match these to fftType in fft_util.h
class FFTType:
def __init__(
Expand Down
Loading