replaced std with absl
Signed-off-by: Vishakha Agrawal <vishakha.agrawal@intel.com>
This commit is contained in:
parent
9835aaae5c
commit
508fddb3af
@ -12,6 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
==============================================================================*/
|
||||
#include "absl/base/call_once.h"
|
||||
|
||||
#include "tensorflow/core/common_runtime/threadpool_device.h"
|
||||
|
||||
@ -41,7 +42,7 @@ limitations under the License.
|
||||
#endif
|
||||
|
||||
namespace tensorflow {
|
||||
std::once_flag omp_setting_flag;
|
||||
absl::once_flag omp_setting_flag;
|
||||
|
||||
ThreadPoolDevice::ThreadPoolDevice(const SessionOptions& options,
|
||||
const string& name, Bytes memory_limit,
|
||||
@ -61,8 +62,8 @@ ThreadPoolDevice::ThreadPoolDevice(const SessionOptions& options,
|
||||
// Default to available physical cores
|
||||
const int mkl_intra_op = port::NumSchedulableCPUs();
|
||||
const int ht = port::NumHyperthreadsPerCore();
|
||||
std::call_once(omp_setting_flag, omp_set_num_threads,
|
||||
(mkl_intra_op + ht - 1) / ht);
|
||||
absl::call_once(omp_setting_flag, omp_set_num_threads,
|
||||
(mkl_intra_op + ht - 1) / ht);
|
||||
}
|
||||
#endif // _OPENMP
|
||||
#endif // !defined(ENABLE_MKLDNN_THREADPOOL) && defined(INTEL_MKL)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user