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

Function DisableMKL

tensorflow/core/util/util.cc:124–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122
123#ifdef INTEL_MKL
124bool 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

Callers 4

InitMethod · 0.50
ShouldRewriteOpMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected