天道酬勤,学无止境

tensorflow-xla

Tensorflow: device CUDA:0 not supported by XLA service while setting up XLA_GPU_JIT device number 0

I got this when using keras with Tensorflow backend: tensorflow.python.framework.errors_impl.InvalidArgumentError: device CUDA:0 not supported by XLA service while setting up XLA_GPU_JIT device number 0 Relevant code: tfconfig = tf.ConfigProto() tfconfig.graph_options.optimizer_options.global_jit_level = tf.OptimizerOptions.ON_1 tfconfig.gpu_options.allow_growth = True K.tensorflow_backend.set_session(tf.Session(config=tfconfig)) tensorflow version: 1.14.0

2021-06-01 22:03:08    分类:问答    tensorflow   keras   tensorflow-xla

First tf.session.run() performs dramatically different from later runs. Why?

Here's an example to clarify what I mean: First session.run(): First run of a TensorFlow session Later session.run(): Later runs of a TensorFlow session I understand TensorFlow is doing some initialization here, but I'd like to know where in the source this manifests. This occurs on CPU as well as GPU, but the effect is more prominent on GPU. For example, in the case of a explicit Conv2D operation, the first run has a much larger quantity of Conv2D operations in the GPU stream. In fact, if I change the input size of the Conv2D, it can go from tens to hundreds of stream Conv2D operations. In

2021-04-15 06:08:37    分类:问答    tensorflow   cublas   cudnn   tensorflow-gpu   tensorflow-xla