- MKL-DNN version upgrade
- deviceMutex replaced for CPU Signed-off-by: raver119 <raver119@gmail.com>master
parent
e700b59f80
commit
b23ebee432
|
@ -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 ""
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue