From 40a94a138fd76e1143d129f86199a000a64edb2c Mon Sep 17 00:00:00 2001 From: peizhilin Date: Wed, 19 Dec 2018 14:59:06 +0800 Subject: [PATCH] remove irrelevant fix for mkl test=develop --- cmake/external/cub.cmake | 2 +- cmake/external/dlpack.cmake | 2 +- cmake/external/python.cmake | 8 +------- paddle/fluid/framework/details/all_reduce_op_handle.cc | 2 +- paddle/fluid/platform/dynload/dynamic_loader.cc | 2 ++ 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/cmake/external/cub.cmake b/cmake/external/cub.cmake index f06728de91e..c94849cf4b9 100644 --- a/cmake/external/cub.cmake +++ b/cmake/external/cub.cmake @@ -32,4 +32,4 @@ endif() add_dependencies(cub extern_cub) -LIST(APPEND external_project_dependencies cub) +LIST(APPEND externl_project_dependencies cub) diff --git a/cmake/external/dlpack.cmake b/cmake/external/dlpack.cmake index 4587475d790..94d8fcc6685 100644 --- a/cmake/external/dlpack.cmake +++ b/cmake/external/dlpack.cmake @@ -28,4 +28,4 @@ endif() add_dependencies(dlpack extern_dlpack) -LIST(APPEND external_project_dependencies dlpack) +LIST(APPEND externl_project_dependencies dlpack) diff --git a/cmake/external/python.cmake b/cmake/external/python.cmake index 5aa447d58d9..623c53f4f75 100644 --- a/cmake/external/python.cmake +++ b/cmake/external/python.cmake @@ -23,12 +23,9 @@ FIND_PACKAGE(PythonLibs ${PY_VERSION} REQUIRED) if(WIN32) execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" -"from distutils import sysconfig as s;import sys;import struct;import sysconfig; +"from distutils import sysconfig as s;import sys;import struct; print(sys.prefix); print(s.get_config_var('LDVERSION') or s.get_config_var('VERSION')); -print(sysconfig.get_platform()); -print(sysconfig.get_config_var('py_version_nodot')); -print(sysconfig.get_config_var('SOABI')); " RESULT_VARIABLE _PYTHON_SUCCESS OUTPUT_VARIABLE _PYTHON_VALUES @@ -44,9 +41,6 @@ print(sysconfig.get_config_var('SOABI')); string(REGEX REPLACE "\n" ";" _PYTHON_VALUES ${_PYTHON_VALUES}) list(GET _PYTHON_VALUES 0 PYTHON_PREFIX) list(GET _PYTHON_VALUES 1 PYTHON_LIBRARY_SUFFIX) - list(GET _PYTHON_VALUES 2 SYS_PLATFORM) - list(GET _PYTHON_VALUES 3 PYTHON_SHORT_VERSION_NODOT) - list(GET _PYTHON_VALUES 4 PYTHON_SOABI) # Make sure all directory separators are '/' string(REGEX REPLACE "\\\\" "/" PYTHON_PREFIX ${PYTHON_PREFIX}) diff --git a/paddle/fluid/framework/details/all_reduce_op_handle.cc b/paddle/fluid/framework/details/all_reduce_op_handle.cc index de7c845884d..9eaff1f5601 100644 --- a/paddle/fluid/framework/details/all_reduce_op_handle.cc +++ b/paddle/fluid/framework/details/all_reduce_op_handle.cc @@ -50,7 +50,7 @@ void AllReduceOpHandle::RunImpl() { // FIXME(typhoonzero): If scope0(global scope) have NCCL_ID_VAR, // this is a distributed or inter-process call, find a better way. -#if defined(PADDLE_WITH_CUDA) && !defined(_WIN32) +#ifdef PADDLE_WITH_CUDA if (NoDummyInputSize() == 1 && local_scopes_[0]->FindLocalVar(NCCL_ID_VARNAME) == nullptr) { #else diff --git a/paddle/fluid/platform/dynload/dynamic_loader.cc b/paddle/fluid/platform/dynload/dynamic_loader.cc index eddebfe92ae..990e44cd211 100644 --- a/paddle/fluid/platform/dynload/dynamic_loader.cc +++ b/paddle/fluid/platform/dynload/dynamic_loader.cc @@ -227,6 +227,8 @@ void* GetTensorRtDsoHandle() { void* GetMKLMLDsoHandle() { #if defined(__APPLE__) || defined(__OSX__) return GetDsoHandleFromSearchPath(FLAGS_mklml_dir, "libmklml_intel.dylib"); +#elif defined(_WIN32) + return GetDsoHandleFromSearchPath(FLAGS_mklml_dir, "mklml.dll"); #else return GetDsoHandleFromSearchPath(FLAGS_mklml_dir, "libmklml_intel.so"); #endif -- GitLab