- MKL-DNN version upgrade

- deviceMutex replaced for CPU

Signed-off-by: raver119 <raver119@gmail.com>
master
raver119 2020-03-20 12:42:29 +03:00
parent e700b59f80
commit b23ebee432
2 changed files with 3 additions and 5 deletions

View File

@ -5,7 +5,7 @@ project(mkldnn-download NONE)
include(ExternalProject)
ExternalProject_Add(mkldnn
GIT_REPOSITORY https://github.com/intel/mkl-dnn.git
GIT_TAG v1.2.1
GIT_TAG v1.2.2
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/mkldnn-src"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/mkldnn-build"
CONFIGURE_COMMAND ""

View File

@ -44,6 +44,7 @@ namespace sd {
std::vector<std::shared_ptr<LaunchContext>> LaunchContext::_contexts = std::vector<std::shared_ptr<LaunchContext>>();
MAP_IMPL<int, std::mutex*> LaunchContext::_deviceMutexes;
std::mutex LaunchContext::_mutex;
////////////////////////////////////////////////////////////////////////
LaunchContext::LaunchContext() {
@ -51,8 +52,6 @@ namespace sd {
_workspace = nullptr;
_deviceID = 0;
_deviceMutexes[_deviceID] = new std::mutex();
#ifdef HAVE_MKLDNN
_engine = new dnnl::engine(dnnl::engine::kind::cpu, 0);
#endif
@ -73,8 +72,7 @@ namespace sd {
}
std::mutex* LaunchContext::deviceMutex() {
auto deviceId = AffinityManager::currentDeviceId();
return _deviceMutexes[deviceId];
return &_mutex;
}
void LaunchContext::swapContextBuffers(ContextBuffers &buffers) {