effective_transformer icon indicating copy to clipboard operation
effective_transformer copied to clipboard

No OpKernel was registered to support Op 'EffectiveTransformerInput' used by node EffectiveTransformerInput

Open wwy510553871 opened this issue 3 years ago • 2 comments

I build the effective_transformer successfully, but when I run the benchmark.py, get the error, how can I fix the error

Traceback (most recent call last): File "/home/luban/miniconda3/envs/study/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call return fn(*args) File "/home/luban/miniconda3/envs/study/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1348, in _run_fn self._extend_graph() File "/home/luban/miniconda3/envs/study/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1388, in _extend_graph tf_session.ExtendSession(self._session) tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'EffectiveTransformerInput' used by {{node EffectiveTransformerInput}}with these attrs: [batch_size=1, to_seq_len=128, T=DT_FLOAT, head_num=12, from_seq_len=128, size_per_head=64] Registered devices: [CPU, XLA_CPU, XLA_GPU] Registered kernels: device='GPU'; T in [DT_HALF] device='GPU'; T in [DT_FLOAT]

 [[EffectiveTransformerInput]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "benchmark.py", line 142, in main(args) File "benchmark.py", line 105, in main val1 = sess.run(std_bert).reshape(-1, 768) File "/home/luban/miniconda3/envs/study/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 956, in run run_metadata_ptr) File "/home/luban/miniconda3/envs/study/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1180, in _run feed_dict_tensor, options, run_metadata) File "/home/luban/miniconda3/envs/study/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1359, in _do_run run_metadata) File "/home/luban/miniconda3/envs/study/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1384, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'EffectiveTransformerInput' used by node EffectiveTransformerInput (defined at /home/luban/miniconda3/envs/study/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py:1748) with these attrs: [batch_size=1, to_seq_len=128, T=DT_FLOAT, head_num=12, from_seq_len=128, size_per_head=64] Registered devices: [CPU, XLA_CPU, XLA_GPU] Registered kernels: device='GPU'; T in [DT_HALF] device='GPU'; T in [DT_FLOAT]

 [[EffectiveTransformerInput]]

wwy510553871 avatar Dec 30 '20 09:12 wwy510553871

please check your tf gpu environment

Meteorix avatar Mar 08 '21 04:03 Meteorix

hi @wwy510553871, I got similar error here, did you manage to resolve this issue?

VertexC avatar Feb 04 '23 08:02 VertexC