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

Method BindArguments

tensorflow/lite/delegates/gpu/cl/kernels/conv_buffer.cc:218–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216}
217
218Status ConvBuffer::BindArguments() {
219 kernel_.ResetBindingCounter();
220 RETURN_IF_ERROR(kernel_.SetMemoryAuto(src_[0]->GetMemoryPtr()));
221 RETURN_IF_ERROR(kernel_.SetMemoryAuto(weights_.GetMemoryPtr()));
222 RETURN_IF_ERROR(kernel_.SetMemoryAuto(biases_.GetMemoryPtr()));
223 RETURN_IF_ERROR(BindArgs(&kernel_, linked_operations_));
224 RETURN_IF_ERROR(kernel_.SetMemoryAuto(dst_[0]->GetMemoryPtr()));
225 int4 src_size = int4(src_[0]->Width(), src_[0]->Height(),
226 src_[0]->Width() * src_[0]->Height(), src_[0]->Depth());
227 int4 dst_size = int4(dst_[0]->Width(), dst_[0]->Height(),
228 dst_[0]->Width() * dst_[0]->Height(), dst_[0]->Depth());
229 RETURN_IF_ERROR(kernel_.SetBytesAuto(src_size));
230 RETURN_IF_ERROR(kernel_.SetBytesAuto(dst_size));
231 RETURN_IF_ERROR(kernel_.SetBytesAuto(kernel_size_));
232 RETURN_IF_ERROR(kernel_.SetBytesAuto(dilation_));
233 RETURN_IF_ERROR(kernel_.SetBytesAuto(stride_));
234 RETURN_IF_ERROR(kernel_.SetBytesAuto(padding_));
235 return OkStatus();
236}
237
238int3 ConvBuffer::GetGridSize() const {
239 const int grid_x = IntegralDivideRoundUp(dst_[0]->Width(), x_elements_);

Callers

nothing calls this directly

Calls 9

BindArgsFunction · 0.85
OkStatusFunction · 0.85
ResetBindingCounterMethod · 0.80
SetMemoryAutoMethod · 0.80
WidthMethod · 0.80
HeightMethod · 0.80
DepthMethod · 0.80
GetMemoryPtrMethod · 0.45
SetBytesAutoMethod · 0.45

Tested by

no test coverage detected