Apply cl/347541110 to the soon-to-be refactored custom device support

Just want to make sure I don't clobber the logic when the refactor gets checked in.

PiperOrigin-RevId: 347726465
Change-Id: Id0849534c8f0e4021aebcacd25181cc77f6fbdc9
This commit is contained in:
Allen Lavoie 2020-12-15 17:33:27 -08:00 committed by TensorFlower Gardener
parent 1ce28a3f8a
commit 74b755bff1

View File

@ -58,7 +58,10 @@ int CustomDeviceTensorHandle::DeviceId(Status* status) const {
AbstractTensorInterface* CustomDeviceTensorHandle::Resolve(Status* status) {
core::RefCountPtr<ImmediateExecutionTensorHandle> copied_off(
context_->CopyTensorHandleToDevice(
this, "/job:localhost/replica:0/task:0/device:CPU:0", status));
this,
DeviceNameUtils::ParsedNameToString(context_->HostCPUParsedName())
.c_str(),
status));
if (!status->ok()) {
return nullptr;
}