| 122 | |
| 123 | #ifdef INTEL_MKL |
| 124 | bool DisableMKL() { |
| 125 | enum MklStatus { MKL_DEFAULT = 0, MKL_ON = 1, MKL_OFF = 2 }; |
| 126 | static MklStatus status = MKL_DEFAULT; |
| 127 | if (status == MKL_DEFAULT) { |
| 128 | char* tf_disable_mkl = getenv("TF_DISABLE_MKL"); |
| 129 | if ((tf_disable_mkl != NULL) && (std::stoi(tf_disable_mkl) == 1)) { |
| 130 | VLOG(2) << "TF-MKL: Disabling MKL"; |
| 131 | status = MKL_OFF; |
| 132 | } else { |
| 133 | status = MKL_ON; |
| 134 | } |
| 135 | } |
| 136 | return status == MKL_OFF ? true : false; |
| 137 | } |
| 138 | #endif // INTEL_MKL |
| 139 | } // namespace tensorflow |
no outgoing calls
no test coverage detected