How can I process String Tensor on GPU in Tensorflow? -


i want preprocess data input tensorflow, file huge , think maybe tensorflow can accelerate process on gpu. , find operation string base in library, however, when simple test, seems tensorflow not support operation on gpu, if has idea process string data on gpu in tensorflow or other advance? now, think maybe have on cuda level.

here test code:

import tensorflow tf sess = tf.interactivesession()  tf.device('/gpu:0'):     text = tf.constant("aa a", name="left")     result = tf.string_split([text], delimiter=" ") print result.eval() 

and error information:

i tensorflow/core/common_runtime/gpu/gpu_device.cc:975] creating tensorflow device (/gpu:0) -> (device: 0, name: geforce gtx 1070, pci bus id: 0000:01:00.0) traceback (most recent call last):   file "/media/freshield/buffer/learn_tensorflow/11_tensorboard_graph/testing.py", line 51, in <module>     print result.eval()   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/sparse_tensor.py", line 225, in eval     session)   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3797, in _eval_using_default_session     return session.run(tensors, feed_dict)   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 767, in run     run_metadata_ptr)   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 965, in _run     feed_dict_string, options, run_metadata)   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1015, in _do_run     target_list, options, run_metadata)   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1035, in _do_call     raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.invalidargumenterror: cannot assign device node 'packed': not satisfy explicit device specification '/device:gpu:0' because no supported kernel gpu devices available.      [[node: packed = pack[n=1, t=dt_string, axis=0, _device="/device:gpu:0"](left)]]  caused op u'packed', defined at:   file "/media/freshield/buffer/learn_tensorflow/11_tensorboard_graph/testing.py", line 50, in <module>     result = tf.string_split([text], delimiter=" ")   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/string_ops.py", line 104, in string_split     source = ops.convert_to_tensor(source, dtype=dtypes.string)   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 651, in convert_to_tensor     as_ref=false)   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 716, in internal_convert_to_tensor     ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 923, in _autopacking_conversion_function     return _autopacking_helper(v, inferred_dtype, name or "packed")   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 886, in _autopacking_helper     return gen_array_ops._pack(elems_as_tensors, name=scope)   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 2041, in _pack     result = _op_def_lib.apply_op("pack", values=values, axis=axis, name=name)   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 763, in apply_op     op_def=op_def)   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2395, in create_op     original_op=self._default_original_op, op_def=op_def)   file "/home/freshield/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1264, in __init__     self._traceback = _extract_stack()  invalidargumenterror (see above traceback): cannot assign device node 'packed': not satisfy explicit device specification '/device:gpu:0' because no supported kernel gpu devices available.      [[node: packed = pack[n=1, t=dt_string, axis=0, _device="/device:gpu:0"](left)]] 


Comments