From 15b97dd44a42ae1ab4cc4192a5f7c820ac90b9ac Mon Sep 17 00:00:00 2001 From: nammbash Date: Tue, 9 Jun 2020 11:25:45 -0700 Subject: [PATCH 1/2] CPU Feature Guard MKL brand needs to change to oneDNNchange to one dnn --- tensorflow/core/platform/cpu_feature_guard.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tensorflow/core/platform/cpu_feature_guard.cc b/tensorflow/core/platform/cpu_feature_guard.cc index c5a5c2872835d0..a020d3fd70e54e 100644 --- a/tensorflow/core/platform/cpu_feature_guard.cc +++ b/tensorflow/core/platform/cpu_feature_guard.cc @@ -138,8 +138,16 @@ void InfoAboutUnusedCPUFeatures() { CheckIfFeatureUnused(CPUFeature::FMA, "FMA", missing_instructions); #endif // __FMA__ #endif // else of if defined(_MSC_VER) && !defined(__clang__) - if (!missing_instructions.empty()) { - LOG(INFO) << "This TensorFlow binary is optimized with Intel(R) MKL-DNN " + + string intel_library_official_name( + "Intel(R) oneAPI Deep Neural Network Library (oneDNN) "); +#ifndef INTEL_MKL + intel_library_official_name = "oneAPI Deep Neural Network Library (oneDNN) "; +#endif + + if (!missing_instructions.empty()) { + LOG(INFO) << "This TensorFlow binary is optimized with " + << intel_library_official_name << "to use the following CPU instructions in performance-" << "critical operations: " << missing_instructions << std::endl << "To enable them in other operations, rebuild TensorFlow " From 266387ecb45ca06a2bdf117a119cb65b9ab5dcd9 Mon Sep 17 00:00:00 2001 From: nammbash Date: Tue, 16 Jun 2020 12:02:14 -0700 Subject: [PATCH 2/2] create a single oneDNN string --- tensorflow/core/platform/cpu_feature_guard.cc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tensorflow/core/platform/cpu_feature_guard.cc b/tensorflow/core/platform/cpu_feature_guard.cc index a020d3fd70e54e..13116de49dca60 100644 --- a/tensorflow/core/platform/cpu_feature_guard.cc +++ b/tensorflow/core/platform/cpu_feature_guard.cc @@ -138,16 +138,9 @@ void InfoAboutUnusedCPUFeatures() { CheckIfFeatureUnused(CPUFeature::FMA, "FMA", missing_instructions); #endif // __FMA__ #endif // else of if defined(_MSC_VER) && !defined(__clang__) - - string intel_library_official_name( - "Intel(R) oneAPI Deep Neural Network Library (oneDNN) "); -#ifndef INTEL_MKL - intel_library_official_name = "oneAPI Deep Neural Network Library (oneDNN) "; -#endif - - if (!missing_instructions.empty()) { + if (!missing_instructions.empty()) { LOG(INFO) << "This TensorFlow binary is optimized with " - << intel_library_official_name + << "oneAPI Deep Neural Network Library (oneDNN)" << "to use the following CPU instructions in performance-" << "critical operations: " << missing_instructions << std::endl << "To enable them in other operations, rebuild TensorFlow "