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

Method allocate_persistent

tensorflow/core/framework/op_kernel.cc:254–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254Status OpKernelConstruction::allocate_persistent(
255 DataType type, const TensorShape& shape, PersistentTensor* out_persistent,
256 Tensor** out_tensor) {
257 // for now just do the same thing as allocate_temp
258 // TODO(misard) add specific memory tracking for persistent tensors
259 Tensor persistent;
260 Status s = allocate_temp(type, shape, &persistent);
261 if (!s.ok()) {
262 return s;
263 }
264 *out_persistent = PersistentTensor(persistent);
265 Tensor* allocated = out_persistent->AccessTensor(this);
266 if (out_tensor) {
267 *out_tensor = allocated;
268 }
269 return s;
270}
271
272// OpKernelContext -----------------------------------------------------------
273

Callers 15

ComputeMethod · 0.45
ComputeMethod · 0.45
CompileMethod · 0.45
ResourceOpKernelMethod · 0.45
PrepareToUpdateVariableFunction · 0.45
ComputeMethod · 0.45
GetElementComponentMethod · 0.45

Calls 13

PersistentTensorClass · 0.85
InternalFunction · 0.85
allocate_tensorFunction · 0.85
AccessTensorMethod · 0.80
tensor_dataMethod · 0.80
okMethod · 0.45
TracksAllocationSizesMethod · 0.45
FillDescriptionMethod · 0.45
UnrefMethod · 0.45
AllocatedSizeMethod · 0.45
dataMethod · 0.45
AllocationIdMethod · 0.45

Tested by

no test coverage detected