I would like to know how to generate an array of binomial random variates on the gpu from tensorflow. The following
with tf.device("gpu"):
g = tf.random.get_global_generator()
samples = g.binomial(shape = shape, counts = counts, probs = probs)
gives the error
No registered 'StatefulRandomBinomial' OpKernel for 'GPU' devices compatible with node
. Registered: device='CPU'; dtype in [DT_INT64]; T in [DT_DOUBLE]
That makes me wonder whether binomials are supported.
In addition, how can I accurately time this process? I'm trying to figure out which implementation, across multiple libraries/packages, is fastest.
Aucun commentaire:
Enregistrer un commentaire