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

Method GetElementComponentFromBatch

tensorflow/core/kernels/fifo_queue.cc:88–100  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

86
87/* static */
88Status FIFOQueue::GetElementComponentFromBatch(const FIFOQueue::Tuple& tuple,
89 int64 index, int component,
90 OpKernelContext* ctx,
91 PersistentTensor* out_tensor) {
92 TensorShape element_shape(tuple[component].shape());
93 element_shape.RemoveDim(0);
94 Tensor* element_access = nullptr;
95 TF_RETURN_IF_ERROR(ctx->allocate_persistent(
96 tuple[component].dtype(), element_shape, out_tensor, &element_access));
97 TF_RETURN_IF_ERROR(
98 batch_util::CopySliceToElement(tuple[component], element_access, index));
99 return Status::OK();
100}
101
102void FIFOQueue::TryEnqueueMany(const Tuple& tuple, OpKernelContext* ctx,
103 DoneCallback callback) {

Callers

nothing calls this directly

Calls 5

CopySliceToElementFunction · 0.85
shapeMethod · 0.45
RemoveDimMethod · 0.45
allocate_persistentMethod · 0.45
dtypeMethod · 0.45

Tested by

no test coverage detected