[TF:XLA] Use requested_device() instead of def().device().
PiperOrigin-RevId: 233576500
This commit is contained in:
parent
07d4fe20b3
commit
5dc6710aaf
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user