Support packed TensorHandles on CustomDevices.
PiperOrigin-RevId: 324851163 Change-Id: I017665b5e2bd90da37f4d45aa94e1278be7bd2f7
This commit is contained in:
parent
7a2383c18f
commit
4e03f13e6a
@ -316,8 +316,7 @@ Status TensorHandle::CreatePackedHandle(std::vector<TensorHandle*>&& handles,
|
||||
std::vector<string> devices;
|
||||
for (auto* handle : handles) {
|
||||
if (VariantDeviceIsCustom(handle->device())) {
|
||||
return errors::InvalidArgument(
|
||||
"CustomDevice is not supported for packing.");
|
||||
devices.push_back(absl::get<CustomDevice*>(handle->device())->name());
|
||||
} else {
|
||||
devices.push_back(handle->op_device() ? handle->op_device()->name()
|
||||
: ctx->HostCPU()->name());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user