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

Function ForwardMklMetaDataInToOut

tensorflow/core/util/mkl_util.h:935–948  ·  view source on GitHub ↗

Forward the OneDNN shape ONLY (used in elementwise and other ops where we call the eigen implementation and OneDNN shape is not used)

Source from the content-addressed store, hash-verified

933// Forward the OneDNN shape ONLY (used in elementwise and other ops where
934// we call the eigen implementation and OneDNN shape is not used)
935inline void ForwardMklMetaDataInToOut(OpKernelContext* context,
936 uint32 idx_data_in,
937 uint32_t idx_data_out) {
938 uint32 idx_meta_in =
939 GetTensorMetaDataIndex(idx_data_in, context->num_inputs());
940 uint32 idx_meta_out =
941 GetTensorMetaDataIndex(idx_data_out, context->num_outputs());
942
943 if (IsRefType(context->input_dtype(idx_data_in))) {
944 context->forward_ref_input_to_ref_output(idx_meta_in, idx_meta_out);
945 } else {
946 context->set_output(idx_meta_out, context->input(idx_meta_in));
947 }
948}
949
950// -------------------------------------------------------------------
951// Common utility functions used by OneDNN unit tests

Callers 1

FallbackToEigenMethod · 0.85

Calls 8

GetTensorMetaDataIndexFunction · 0.85
IsRefTypeFunction · 0.85
num_inputsMethod · 0.45
num_outputsMethod · 0.45
input_dtypeMethod · 0.45
set_outputMethod · 0.45
inputMethod · 0.45

Tested by

no test coverage detected