Allocates a temporary tensor. The CudaSolver object maintains a TensorReference to the underlying Tensor to prevent it from being deallocated prematurely.
| 271 | // TensorReference to the underlying Tensor to prevent it from being deallocated |
| 272 | // prematurely. |
| 273 | Status 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 | |
| 283 | Status CudaSolver::forward_input_or_allocate_scoped_tensor( |
| 284 | gtl::ArraySlice<int> candidate_input_indices, DataType type, |
no test coverage detected