[TF:XLA] Use requested_device() instead of def().device().

PiperOrigin-RevId: 233576500
This commit is contained in:
A. Unique TensorFlower 2019-02-12 03:13:30 -08:00 committed by TensorFlower Gardener
parent 07d4fe20b3
commit 5dc6710aaf

View File

@ -50,7 +50,7 @@ bool IsCpuGpuCompile(const Graph* graph) {
continue;
// Early return for any node with a device that is not a CPU or GPU.
DeviceNameUtils::ParsedName parsed;
if (DeviceNameUtils::ParseFullName(n->def().device(), &parsed)) {
if (DeviceNameUtils::ParseFullName(n->requested_device(), &parsed)) {
if (parsed.type != DEVICE_CPU && parsed.type != DEVICE_GPU) {
return false;
}