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

Method BindArguments

tensorflow/lite/delegates/gpu/cl/kernels/upsample.cc:107–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107Status Upsample::BindArguments() {
108 kernel_.ResetBindingCounter();
109 RETURN_IF_ERROR(kernel_.SetMemoryAuto(src_[0]->GetMemoryPtr()));
110 RETURN_IF_ERROR(BindArgs(&kernel_, linked_operations_));
111 RETURN_IF_ERROR(kernel_.SetMemoryAuto(dst_[0]->GetMemoryPtr()));
112 RETURN_IF_ERROR(kernel_.SetBytesAuto(src_[0]->GetSizeWithDepth()));
113 RETURN_IF_ERROR(kernel_.SetBytesAuto(dst_[0]->GetSizeWithDepth()));
114 float2 scale_factor =
115 float2(CalculateResizeScale(src_[0]->Width(), dst_[0]->Width(), attr_),
116 CalculateResizeScale(src_[0]->Height(), dst_[0]->Height(), attr_));
117 RETURN_IF_ERROR(kernel_.SetBytesAuto(scale_factor));
118 return OkStatus();
119}
120
121int3 Upsample::GetGridSize() const {
122 const int grid_x = dst_[0]->Width();

Callers

nothing calls this directly

Calls 10

BindArgsFunction · 0.85
OkStatusFunction · 0.85
ResetBindingCounterMethod · 0.80
SetMemoryAutoMethod · 0.80
GetSizeWithDepthMethod · 0.80
WidthMethod · 0.80
HeightMethod · 0.80
CalculateResizeScaleFunction · 0.50
GetMemoryPtrMethod · 0.45
SetBytesAutoMethod · 0.45

Tested by

no test coverage detected