| 41 | typedef Eigen::GpuDevice GPUDevice; |
| 42 | |
| 43 | void ParseAttributes(OpKernelConstruction* context, std::vector<int32>* strides, |
| 44 | std::vector<int32>* rates, Padding* padding) { |
| 45 | OP_REQUIRES_OK(context, context->GetAttr("strides", strides)); |
| 46 | OP_REQUIRES(context, strides->size() == 4, |
| 47 | errors::InvalidArgument("Sliding window stride field must " |
| 48 | "specify 4 dimensions")); |
| 49 | OP_REQUIRES(context, (*strides)[0] == 1 && (*strides)[3] == 1, |
| 50 | errors::Unimplemented( |
| 51 | "Stride is only supported across spatial dimensions.")); |
| 52 | |
| 53 | OP_REQUIRES_OK(context, context->GetAttr("rates", rates)); |
| 54 | OP_REQUIRES(context, rates->size() == 4, |
| 55 | errors::InvalidArgument("Input stride (atrous rate) field " |
| 56 | "must specify 4 dimensions")); |
| 57 | OP_REQUIRES(context, (*rates)[0] == 1 && (*rates)[3] == 1, |
| 58 | errors::Unimplemented( |
| 59 | "Rate is only supported across spatial dimensions.")); |
| 60 | |
| 61 | OP_REQUIRES_OK(context, context->GetAttr("padding", padding)); |
| 62 | } |
| 63 | |
| 64 | void ParseSizes(OpKernelContext* context, const std::vector<int32>& strides, |
| 65 | const std::vector<int32>& rates, const Padding& padding, |
no test coverage detected