I'm trying to get TensorFlow's random_poisson function to run on my GPU; given that this TensorFlow source page has a function testCPUGPUMatch that compares the outputs of random_poisson when run on the CPU and on the GPU, it seems like it should be possible. However, when testing with the code:
import tensorflow as tf
with tf.Session() as sess:
with tf.device("/gpu:0"):
test = sess.run(tf.random_poisson(1.0, [], dtype=tf.float64))
print(test)
I get the error:
InvalidArgumentError: Cannot assign a device for operation 'random_poisson/RandomPoissonV2': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available. Registered kernels: device='CPU'; R in [DT_INT64]; dtype in [DT_INT64] device='CPU'; R in [DT_INT64]; dtype in [DT_INT32] device='CPU'; R in [DT_INT64]; dtype in [DT_DOUBLE]
device='CPU'; R in [DT_INT64]; dtype in [DT_FLOAT] device='CPU'; R in [DT_INT64]; dtype in [DT_HALF] device='CPU'; R in [DT_INT32]; dtype in [DT_INT64] device='CPU'; R in [DT_INT32]; dtype in [DT_INT32] device='CPU'; R in [DT_INT32]; dtype in [DT_DOUBLE]
device='CPU'; R in [DT_INT32]; dtype in [DT_FLOAT] device='CPU'; R in [DT_INT32]; dtype in [DT_HALF] device='CPU'; R in [DT_DOUBLE]; dtype in [DT_INT64] device='CPU'; R in [DT_DOUBLE]; dtype in [DT_INT32] device='CPU'; R in [DT_DOUBLE]; dtype in [DT_DOUBLE]
device='CPU'; R in [DT_DOUBLE]; dtype in [DT_FLOAT] device='CPU'; R in [DT_DOUBLE]; dtype in [DT_HALF] device='CPU'; R in [DT_FLOAT]; dtype in [DT_INT64] device='CPU'; R in [DT_FLOAT]; dtype in [DT_INT32] device='CPU'; R in [DT_FLOAT]; dtype in [DT_DOUBLE]
device='CPU'; R in [DT_FLOAT]; dtype in [DT_FLOAT] device='CPU'; R in [DT_FLOAT]; dtype in [DT_HALF] device='CPU'; R in [DT_HALF]; dtype in [DT_INT64] device='CPU'; R in [DT_HALF]; dtype in [DT_INT32] device='CPU'; R in [DT_HALF]; dtype in [DT_DOUBLE]
device='CPU'; R in [DT_HALF]; dtype in [DT_FLOAT] device='CPU'; R in [DT_HALF]; dtype in [DT_HALF][[Node: random_poisson/RandomPoissonV2 = RandomPoissonV2[R=DT_DOUBLE, S=DT_INT32, dtype=DT_DOUBLE, seed=0, seed2=0, _device="/device:GPU:0"](random_poisson/shape, random_poisson/RandomPoissonV2/rate)]]
which lists no registered GPU kernels. The code behaves as expected when run on my CPU, as does similar code with uniform_random when run on my GPU. Am I somehow missing the GPU kernel for random_poisson? Does one not exist, even though the linked source page implies that one does? And if one does not exist, is there an implementation that runs on the GPU? This is currently the bottleneck in a fairly complicated model I've implemented, so it'd be nice to get it fixed. I'm running version 1.8.0 of TensorFlow (installed from pip) on Python 3.6.4 on Arch Linux, with CUDA version 9.0 and cuDNN version 7.0 on a GeForce GTX 1050.
Thanks!