| 216 | } |
| 217 | |
| 218 | Status 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 | |
| 238 | int3 ConvBuffer::GetGridSize() const { |
| 239 | const int grid_x = IntegralDivideRoundUp(dst_[0]->Width(), x_elements_); |
nothing calls this directly
no test coverage detected