| 522 | } |
| 523 | |
| 524 | XrtTensorHandle EnqueueConst(XrtTfContext* context, int device_id, |
| 525 | TensorProto value, bool host_memory) { |
| 526 | protobuf::Map<std::string, AttrValue> attrs; |
| 527 | attrs["value"] = MakeAttrValue(value); |
| 528 | attrs["dtype"] = MakeAttrValue(value.dtype()); |
| 529 | |
| 530 | return std::move(context->EnqueueOp(host_memory ? "HostConst" : "Const", |
| 531 | /*inputs=*/{}, |
| 532 | /*output_arity=*/1, std::move(attrs), |
| 533 | device_id)[0]); |
| 534 | } |
| 535 | |
| 536 | } // namespace tensorflow |
no test coverage detected