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

Method BindArguments

tensorflow/lite/delegates/gpu/cl/kernels/strided_slice.cc:155–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155Status StridedSlice::BindArguments() {
156 kernel_.ResetBindingCounter();
157 RETURN_IF_ERROR(kernel_.SetMemoryAuto(src_[0]->GetMemoryPtr()));
158 RETURN_IF_ERROR(BindArgs(&kernel_, linked_operations_));
159 RETURN_IF_ERROR(kernel_.SetMemoryAuto(dst_[0]->GetMemoryPtr()));
160 int3 offset = GetOffset(attributes_, src_[0]->Width(), src_[0]->Height(),
161 src_[0]->Channels());
162 RETURN_IF_ERROR(kernel_.SetBytesAuto(int4(offset.x, offset.y, offset.z, 1)));
163 RETURN_IF_ERROR(kernel_.SetBytesAuto(int4(
164 attributes_.strides.w, attributes_.strides.h, attributes_.strides.c, 1)));
165 RETURN_IF_ERROR(kernel_.SetBytesAuto(src_[0]->GetSizeWithDepth()));
166 RETURN_IF_ERROR(kernel_.SetBytesAuto(dst_[0]->GetSizeWithDepth()));
167 return OkStatus();
168}
169
170int3 StridedSlice::GetGridSize() const {
171 const int grid_x = dst_[0]->Width();

Callers

nothing calls this directly

Calls 11

BindArgsFunction · 0.85
GetOffsetFunction · 0.85
OkStatusFunction · 0.85
ResetBindingCounterMethod · 0.80
SetMemoryAutoMethod · 0.80
WidthMethod · 0.80
HeightMethod · 0.80
ChannelsMethod · 0.80
GetSizeWithDepthMethod · 0.80
GetMemoryPtrMethod · 0.45
SetBytesAutoMethod · 0.45

Tested by

no test coverage detected