MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / InitAlloc

Method InitAlloc

tensorflow/contrib/star/star_tensor_coding.cc:7–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5namespace tensorflow {
6
7void 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
19void StarTensorResponse::Clear() {
20 on_host_ = false;

Callers 4

RecvFromRemoteAsyncMethod · 0.45
StartRTCallMethod · 0.45
StartRTCallMethod · 0.45
StartMethod · 0.45

Calls 3

on_hostMethod · 0.45
device_typeMethod · 0.45
GetAllocatorMethod · 0.45

Tested by

no test coverage detected