这是indexloc提供的服务,不要输入任何密码
Skip to content

[INTEL oneDNN] Disable oneDNN blocked format support #53288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions tensorflow/core/graph/mkl_graph_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,12 @@ bool inline DoesControlEdgeExist(const Node* src, const Node* dst) {
return false;
}

// Check if graph should run in layout-dependent mode or native format mode
// based on environment variable setting. Native format mode is default. User
// can set TF_ENABLE_MKL_NATIVE_FORMAT=0 to disable the native format mode.
// In TF 2.8, oneDNN blocked format will not be supported.
// TODO(intel_tf): Cleanup shall be done in future:
// (1) Remove this method;
// (2) Update related code wherever it is called.
bool inline NativeFormatEnabled() {
#ifndef ENABLE_MKL
return true;
#else
static bool native_fmt_enabled = true;
static absl::once_flag once;
absl::call_once(once, [&] {
TF_CHECK_OK(ReadBoolFromEnvVar("TF_ENABLE_MKL_NATIVE_FORMAT",
/*default_value*/ true,
&native_fmt_enabled));
});
return native_fmt_enabled;
#endif
}

// Check if the data_format attribute in the node def represents 5D tensor
Expand Down