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

Method allocate_scoped_tensor

tensorflow/core/kernels/cuda_solvers.cc:273–281  ·  view source on GitHub ↗

Allocates a temporary tensor. The CudaSolver object maintains a TensorReference to the underlying Tensor to prevent it from being deallocated prematurely.

Source from the content-addressed store, hash-verified

271// TensorReference to the underlying Tensor to prevent it from being deallocated
272// prematurely.
273Status CudaSolver::allocate_scoped_tensor(DataType type,
274 const TensorShape& shape,
275 Tensor* out_temp) {
276 const Status status = context_->allocate_temp(type, shape, out_temp);
277 if (status.ok()) {
278 scratch_tensor_refs_.emplace_back(*out_temp);
279 }
280 return status;
281}
282
283Status CudaSolver::forward_input_or_allocate_scoped_tensor(
284 gtl::ArraySlice<int> candidate_input_indices, DataType type,

Callers 11

ComputeMatrixMethod · 0.80
ComputeAsyncMethod · 0.80
ComputeAsyncMethod · 0.80
ComputeAsyncMethod · 0.80
ComputeAsyncMethod · 0.80
ComputeAsyncMethod · 0.80
ComputeAsyncMethod · 0.80
ComputeAsyncMethod · 0.80
RunSVDMethod · 0.80
PerformSVD_MgeqNMethod · 0.80

Calls 3

allocate_tempMethod · 0.45
okMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected