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

Function allocate_tensor

tensorflow/c/tf_tensor.cc:35–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34namespace tensorflow {
35void* allocate_tensor(const char* operation, size_t len, Allocator* allocator) {
36 void* data = allocator->AllocateRaw(EIGEN_MAX_ALIGN_BYTES, len);
37 if (LogMemory::IsEnabled() && data != nullptr) {
38 LogMemory::RecordRawAllocation(
39 operation, LogMemory::EXTERNAL_TENSOR_ALLOCATION_STEP_ID, len, data,
40 allocator);
41 }
42 return data;
43}
44
45void* allocate_tensor(const char* operation, size_t len) {
46 return allocate_tensor(operation, len, cpu_allocator());

Callers 8

allocate_tensorMethod · 0.85
allocate_outputMethod · 0.85
allocate_tempMethod · 0.85
allocate_persistentMethod · 0.85
set_outputMethod · 0.85
TF_AllocateTensorFunction · 0.85
TF_NewTensorFunction · 0.85
TF_AllocateOutputFunction · 0.85

Calls 3

IsEnabledFunction · 0.85
cpu_allocatorFunction · 0.85
AllocateRawMethod · 0.45

Tested by

no test coverage detected