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

[oneMath][RNG] Add geometric distribution to Device API #604

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

iMartyan
Copy link
Contributor

@iMartyan iMartyan commented Dec 11, 2024

Proposal to add geometric distribution to oneMath RNG Device API.
Overview: API similar to existing Bernoulli distribution. Supported data types: 32 and 64 integer types.

fix: changed notes style for RNG

@iMartyan iMartyan marked this pull request as ready for review December 11, 2024 16:27
Copy link
Contributor

@aelizaro aelizaro left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thank you for extending RNG device API scope

@@ -78,6 +78,10 @@ basic random number generators.
- integer
- integer
- Bernoulli distribution
* - :ref:`onemath_device_rng_geometric`
- integer
- float
Copy link
Contributor

Choose a reason for hiding this comment

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

double-checking: is it float for both int32_t/int64_t or should it be float/double ?

Copy link
Contributor Author

@iMartyan iMartyan Dec 11, 2024

Choose a reason for hiding this comment

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

You are correct, int64_t can be mapped to double in terms of type.
Here, as an idea, float refers to general floating-point data type, not exact float type.
The same is done for discrete uniform distr and integer type in general in this table.

Please share if you think it make sense to reformat this table

Copy link
Contributor

Choose a reason for hiding this comment

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

hmmm, in the table with Continuous distributions it states float/double separately. Probably it makes sense to change float to floating point and add a note that it can vary for distributions implementation depending on the integer data type size

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied. @aelizaro please take a look one more time :)

@iMartyan iMartyan changed the title [oneMath][RNG] Add geometric distribution to Device API: beta, gamma [oneMath][RNG] Add geometric distribution to Device API Dec 12, 2024
Copy link
Contributor

@andreyfe1 andreyfe1 left a comment

Choose a reason for hiding this comment

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

Looks good to me

@iMartyan iMartyan force-pushed the add_rng_geometric_engines branch from 1a5f644 to 7d33e6f Compare December 17, 2024 15:33
@aelizaro aelizaro merged commit 6da6e9d into uxlfoundation:main Dec 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants