SparseTensorDenseMatMul_grad 没有可用的 GPU 设备支持的内核

Hou*_*uge 5 tensorflow

我在图中使用tf.sparse_tensor_dense_matmul op构建模型时遇到问题。部分错误信息粘贴如下,

这是否意味着没有 GPU 内核支持来计算“ SparseTensorDenseMatMul_grad ”的梯度?我可以使用会话配置中的“ allow_soft_placement=Ture ”成功构建模型。但是,由于某些特殊原因,我需要将所有计算保留在 GPU 上。有谁知道如何解决这个问题?或者我需要自己实现这个op的CUDA内核?多谢。

tensorflow.python.framework.errors.InvalidArgumentError: Cannot assign a device to node 'gradients/softmax_linear/SparseTensorDenseMatMul/SparseTensorDenseMatMul_grad/Slice_1': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available.
         [[Node: gradients/softmax_linear/SparseTensorDenseMatMul/SparseTensorDenseMatMul_grad/Slice_1 = Slice[Index=DT_INT32, T=DT_INT64, _device="/device:GPU:0"](Placeholder_2, gradients/softmax_linear/SparseTensorDenseMatMul/SparseTensorDenseMatMul_grad/Slice_1/begin, gradients/softmax_linear/SparseTensorDenseMatMul/SparseTensorDenseMatMul_grad/Slice_1/size)]]
Caused by op u'gradients/softmax_linear/SparseTensorDenseMatMul/SparseTensorDenseMatMul_grad/Slice_1', defined at:
Run Code Online (Sandbox Code Playgroud)