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] Updated Device API #574

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

andreyfe1
Copy link
Contributor

Description

Added following distributions:

  • beta
  • gamma.

Added support of int64_t, uint64_t for uniform.
Added support of int8_t, uint8_t, int16_t, uint16_t for bernoulli.

Checklist

All Submissions

  • Do all unit tests pass locally? Attach a log.
  • Have you formatted the code using clang-format?

New interfaces

  • Have you provided motivation for adding a new feature as part of RFC and
    it was accepted? # (RFC)
  • What version of oneAPI spec the interface is targeted?
    v1.4-provisional-rev-1
  • Complete New features checklist

New features

  • Have you provided motivation for adding a new feature?
  • Have you added relevant tests?

Copy link
Contributor

@iMartyan iMartyan left a comment

Choose a reason for hiding this comment

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

Please also expand tests for new types for uniform and Bernoulli distributions

@@ -56,7 +56,7 @@ constexpr sycl::vec<std::uint64_t, VecSize> select_vector_a_mcg31m1() {
// hipSYCL (AdaptiveCpp) doesn't support constexpr sycl::vec constructor
// that's why in case of hipSYCL backend sycl::vec is created as a local variable
#ifndef __HIPSYCL__
template <std::int32_t VecSize>
template <std::uint64_t VecSize>
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please explain why change length of vecsize?

include/oneapi/mkl/rng/device/detail/uniform_impl.hpp Outdated Show resolved Hide resolved
uniform() : uniform(static_cast<Type>(0.0f), static_cast<Type>(1.0f)) {}
uniform()
: uniform(static_cast<Type>(0.0f),
std::is_integral<Type>::value
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to add similar if for 64 bit integers here similar to device/distributions/hpp ?

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.

2 participants