From 5dc6710aaf1f920f9bb9b24f4260ed5fa67a1b8f Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Tue, 12 Feb 2019 03:13:30 -0800 Subject: [PATCH] [TF:XLA] Use requested_device() instead of def().device(). PiperOrigin-RevId: 233576500 --- tensorflow/compiler/jit/encapsulate_xla_computations_pass.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }