MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / IsMklElementWiseOp

Function IsMklElementWiseOp

tensorflow/core/graph/mkl_graph_util.h:264–276  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

262// @return: true if opname is registered as element-wise Mkl op;
263// false otherwise
264static 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

Callers 2

IsMklElementWiseOpMethod · 0.85
RunPassMethod · 0.85

Calls 3

IsMklOpFunction · 0.85
GetMklOpNameFunction · 0.85
compareMethod · 0.45

Tested by

no test coverage detected