| 284 | } |
| 285 | |
| 286 | void SanityCheckInputs(OpKernelContext* context) { |
| 287 | const Tensor& src_tensor = MklGetInput(context, kIdxInput); |
| 288 | MklDnnShape src_dnn_shape; |
| 289 | GetMklShape(context, kIdxInput, &src_dnn_shape); |
| 290 | if (src_dnn_shape.IsMklTensor()) { |
| 291 | OP_REQUIRES(context, src_dnn_shape.GetDimension() == 4, |
| 292 | errors::InvalidArgument("input must be 4-dimensional")); |
| 293 | OP_REQUIRES(context, |
| 294 | FastBoundsCheck(src_tensor.NumElements(), |
| 295 | std::numeric_limits<int>::max()), |
| 296 | errors::InvalidArgument("argument to LRN too large")); |
| 297 | } else { |
| 298 | OP_REQUIRES(context, src_tensor.dims() == 4, |
| 299 | errors::InvalidArgument("input must be 4-dimensional")); |
| 300 | OP_REQUIRES(context, |
| 301 | FastBoundsCheck(src_tensor.NumElements(), |
| 302 | std::numeric_limits<int>::max()), |
| 303 | errors::InvalidArgument("argument to LRN too large")); |
| 304 | } |
| 305 | } |
| 306 | const int kIdxInput = 0, kIdxOutput = 0, kIdxWorkspace = 1; |
| 307 | |
| 308 | typedef typename Eigen::Tensor<T, 1, Eigen::RowMajor>::DimensionPair DimPair; |
nothing calls this directly
no test coverage detected