diff --git a/tensorflow/compiler/jit/encapsulate_xla_computations_pass.cc b/tensorflow/compiler/jit/encapsulate_xla_computations_pass.cc index 411ca75cd86..109684be72a 100644 --- a/tensorflow/compiler/jit/encapsulate_xla_computations_pass.cc +++ b/tensorflow/compiler/jit/encapsulate_xla_computations_pass.cc @@ -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; }