Check whether opname with type T is registered as MKL-compliant and is element-wise. @input: name of the op @input: T datatype to be used for checking op @return: true if opname is registered as element-wise Mkl op; false otherwise
| 262 | // @return: true if opname is registered as element-wise Mkl op; |
| 263 | // false otherwise |
| 264 | static inline bool IsMklElementWiseOp(const string& op_name, DataType T) { |
| 265 | if (!IsMklOp(op_name, T)) { |
| 266 | return false; |
| 267 | } |
| 268 | bool result = (0 == op_name.compare(GetMklOpName("Add")) || |
| 269 | 0 == op_name.compare(GetMklOpName("AddV2")) || |
| 270 | 0 == op_name.compare(GetMklOpName("Sub")) || |
| 271 | 0 == op_name.compare(GetMklOpName("Mul")) || |
| 272 | 0 == op_name.compare(GetMklOpName("Maximum")) || |
| 273 | 0 == op_name.compare(GetMklOpName("SquaredDifference"))); |
| 274 | |
| 275 | return result; |
| 276 | } |
| 277 | } // namespace mkl_op_registry |
| 278 | } // namespace tensorflow |
| 279 | #endif // INTEL_MKL |
no test coverage detected