diff options
author | Kay Zhu <kayzhu@google.com> | 2017-07-12 14:22:54 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-07-12 14:30:58 -0700 |
commit | 6d6dda807c539efd59f074ef02d52e0140480c1c (patch) | |
tree | 7ac90c05b6a36a637a1be3a628218cecb58e6e1c /tensorflow/compiler/plugin | |
parent | 6b28eb084349f90213f6ea7762e69d746731b26f (diff) |
[TF:XLA] Fix an issue where plugin/Executor backend is used by default when TF
is built from source with XLA support. See Github issue #11122.
The priority of the executor backend is set to be higher than the default (50)
and CPUs (<100), and is therefore selected as the default when tf.device is not
explicitly specified.
PiperOrigin-RevId: 161717173
Diffstat (limited to 'tensorflow/compiler/plugin')
-rw-r--r-- | tensorflow/compiler/plugin/executor/device.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tensorflow/compiler/plugin/executor/device.cc b/tensorflow/compiler/plugin/executor/device.cc index bbc39dc03f..d902f9df6a 100644 --- a/tensorflow/compiler/plugin/executor/device.cc +++ b/tensorflow/compiler/plugin/executor/device.cc @@ -47,7 +47,12 @@ Status XlaExaDeviceFactory::CreateDevices(const SessionOptions& options, return Status::OK(); } -REGISTER_LOCAL_DEVICE_FACTORY(DEVICE_XLA_EXEC, XlaExaDeviceFactory, 110); +// Set priority to be below the default priority (50), so that Executor is not +// selected as a high priority device over other default devices. +// See constructor comments for Registrar in +// tensorflow/core/common_runtime/device_factory.h for a list of priority for +// devices. +REGISTER_LOCAL_DEVICE_FACTORY(DEVICE_XLA_EXEC, XlaExaDeviceFactory, 40); // Kernel registrations |