| 973 | } |
| 974 | |
| 975 | bool OpKernelContext::ValidateInputsAreSameShape(OpKernel* op) { |
| 976 | const auto& inputs = *params_->inputs; |
| 977 | for (size_t i = 1; i < inputs.size(); ++i) { |
| 978 | if (!inputs[0]->IsSameSize(*(inputs[i].tensor))) { |
| 979 | SetStatus(errors::InvalidArgument( |
| 980 | "Inputs to operation ", op->name(), " of type ", op->type_string(), |
| 981 | " must have the same size and shape. Input 0: ", |
| 982 | inputs[0]->shape().DebugString(), " != input ", i, ": ", |
| 983 | inputs[i]->shape().DebugString())); |
| 984 | return false; |
| 985 | } |
| 986 | } |
| 987 | return true; |
| 988 | } |
| 989 | |
| 990 | Status OpKernelContext::MatchSignature(const DataTypeSlice expected_inputs, |
| 991 | const DataTypeSlice expected_outputs) { |
no test coverage detected