[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
This commit is contained in:
parent
6b28eb0843
commit
6d6dda807c
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user