| 5 | namespace tensorflow { |
| 6 | |
| 7 | void StarTensorResponse::InitAlloc( |
| 8 | Device* d, const AllocatorAttributes& aa) { |
| 9 | Clear(); |
| 10 | device_ = d; |
| 11 | alloc_attrs_ = aa; |
| 12 | const DeviceAttributes& da = d->attributes(); |
| 13 | if (alloc_attrs_.on_host() || da.device_type() == "CPU") { |
| 14 | on_host_ = true; |
| 15 | } |
| 16 | allocator_ = device_->GetAllocator(alloc_attrs_); |
| 17 | } |
| 18 | |
| 19 | void StarTensorResponse::Clear() { |
| 20 | on_host_ = false; |
no test coverage detected