-
Notifications
You must be signed in to change notification settings - Fork 23
ENH: dpnp backend fallback to classic MKL; update random.beta
#493
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
Conversation
@shssf this PR is ready for review/merge. |
@samir-nasibli It looks like we need to rename Also, it is not quite clear why you removed please note, I didn't check this on GPU. |
Yes, we can do in on other PR. |
No, this is not typo. We do not use |
We can wait with merge, it it is needed. We can do it after adding gtest tests for backend. |
/** | ||
* Use get/set functions to access/modify this variable | ||
*/ | ||
static VSLStreamStatePtr rng_stream = nullptr; | ||
|
||
static void set_rng_stream(size_t seed = 1) | ||
{ | ||
if (rng_stream) | ||
{ | ||
vslDeleteStream(&rng_stream); | ||
rng_stream = nullptr; | ||
} | ||
|
||
vslNewStream(&rng_stream, VSL_BRNG_MT19937, seed); | ||
} | ||
|
||
static VSLStreamStatePtr get_rng_stream() | ||
{ | ||
if (!rng_stream) | ||
{ | ||
set_rng_stream(); | ||
} | ||
|
||
return rng_stream; | ||
} | ||
|
||
void dpnp_srand_c(size_t seed) | ||
{ | ||
backend_sycl::backend_sycl_rng_engine_init(seed); | ||
set_rng_stream(seed); | ||
} | ||
|
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 don't think that this is simpler.
I vote to save it as it was and revert you changes, except throw exception.
Description
radnom.beta
backend func, when GPU selectorTODO
backend_sycl
-> other PR