- 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) include(ExternalProject)
ExternalProject_Add(mkldnn ExternalProject_Add(mkldnn
GIT_REPOSITORY https://github.com/intel/mkl-dnn.git 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" SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/mkldnn-src"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/mkldnn-build" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/mkldnn-build"
CONFIGURE_COMMAND "" CONFIGURE_COMMAND ""

View File

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