mardi 29 mai 2018

How to create numba cuda random array

Hi i try to create random array with numba cuda. For what i know this can be done by numba.cuda.random.xoroshiro128p. I need to create array like this:

minimum_bound = -5
maximum_bound = 5

variable_number = 6
row_number = 30000000

matrix_raw  = np.random.uniform(minimum_bound, maximum_bound, (row_number, variable_number))

But this is time consuming it takes over 3 sec. How to use xoroshiro to create array faster with numba kernel? Is there a way to create random matrix with cuda by simple code? Thanks for any advice :)




Aucun commentaire:

Enregistrer un commentaire