-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
add linux
Jenkinsfile
Outdated
@@ -358,7 +358,7 @@ try { | |||
mkdir pkg_%BUILD_NAME%\\build | |||
copy build_%BUILD_NAME%\\libmxnet.lib pkg_%BUILD_NAME%\\lib | |||
copy build_%BUILD_NAME%\\libmxnet.dll pkg_%BUILD_NAME%\\build | |||
copy build_%BUILD_NAME%\\mkldnn.dll pkg_%BUILD_NAME%\\build | |||
copy build_%BUILD_NAME%\\3rdparty\\mkldnn\\mkldnn.dll pkg_%BUILD_NAME%\\build | |||
copy build_%BUILD_NAME%\\libiomp5md.dll pkg_%BUILD_NAME%\\build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if the omp and mklml are also in 3rdparty\mkldnn\
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no omp mklml is in the root path.i am copy it in cmake,
the problem is that I can't figure out the location of mkldnn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe 3rdparty\mkldnn\src\mkldnn.dll
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems 3rdparty\mkldnn\src\mkldnn.dll is right but still some deps are missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes,I don't know what is missing.Maybe msvcrt120.dll.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need some one login and look at it with depends.
CMakeLists.txt
Outdated
@@ -18,8 +18,8 @@ mxnet_option(USE_CUDNN "Build with cudnn support" ON) # one could se | |||
mxnet_option(USE_SSE "Build with x86 SSE instruction support" ON) | |||
mxnet_option(USE_LAPACK "Build with lapack support" ON IF NOT MSVC) | |||
mxnet_option(USE_MKL_IF_AVAILABLE "Use MKL if found" ON) | |||
mxnet_option(USE_MKLML_MKL "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND UNIX AND (NOT APPLE)) | |||
mxnet_option(USE_MKLDNN "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND UNIX AND (NOT APPLE)) | |||
mxnet_option(USE_MKLML_MKL "Use MKLDNN variant of MKL (if MKL found)" OFF IF (NOT APPLE)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the USE_MKL_IF_AVAILABLE argument - you're changing the default behaviour here
Jenkinsfile
Outdated
@@ -311,7 +311,7 @@ try { | |||
bat """mkdir build_vc14_gpu | |||
call "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\x86_amd64\\vcvarsx86_amd64.bat" | |||
cd build_vc14_gpu | |||
cmake -G \"NMake Makefiles JOM\" -DUSE_CUDA=1 -DUSE_CUDNN=1 -DUSE_NVRTC=1 -DUSE_OPENCV=1 -DUSE_OPENMP=1 -DUSE_PROFILER=1 -DUSE_BLAS=open -DUSE_LAPACK=1 -DUSE_DIST_KVSTORE=0 -DCUDA_ARCH_NAME=All -DCMAKE_CXX_FLAGS_RELEASE="/FS /MD /O2 /Ob2 /DNDEBUG" -DCMAKE_BUILD_TYPE=Release ${env.WORKSPACE}""" | |||
cmake -G \"NMake Makefiles JOM\" -DUSE_CUDA=1 -DUSE_CUDNN=1 -DUSE_NVRTC=1 -DUSE_OPENCV=1 -DUSE_OPENMP=1 -DUSE_PROFILER=1 -DUSE_BLAS=open -DUSE_LAPACK=1 -DUSE_DIST_KVSTORE=0 -DCUDA_ARCH_NAME=Maxwell -DCMAKE_CXX_FLAGS_RELEASE="/FS /MD /O2 /Ob2 /DNDEBUG" -DCMAKE_BUILD_TYPE=Release ${env.WORKSPACE}""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please elaborate this change? We're trying to cover all supported archs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only speeds up compilation speed. Theoretically, it will not affect the correctness of programs.
In fact, even if you use "ALL", it is not a test of "ALL" at the time of testing.the NV driver will only choose a suitable one.
Jenkinsfile
Outdated
call "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\x86_amd64\\vcvarsx86_amd64.bat" | ||
cd build_%BUILD_NAME% | ||
set /a cores=36 * 2 | ||
jom -j 72 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the proper env variables and don't hardcode these values
cmake/FirstClassLangCuda.cmake
Outdated
@@ -125,8 +125,8 @@ endif () | |||
# mshadow_select_nvcc_arch_flags(out_variable) | |||
function(mshadow_select_nvcc_arch_flags out_variable) | |||
|
|||
set(CUDA_ARCH_LIST "Auto" CACHE STRING "Select target NVIDIA GPU achitecture.") | |||
set_property( CACHE CUDA_ARCH_LIST PROPERTY STRINGS "" "All" "Common" ${CUDA_KNOWN_GPU_ARCHITECTURES} ) | |||
set(CUDA_ARCH_LIST "" CACHE STRING "Select target NVIDIA GPU achitecture.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default behaviour change?
python/mxnet/libinfo.py
Outdated
@@ -37,6 +38,8 @@ def find_lib_path(): | |||
logging.warning("MXNET_LIBRARY_PATH should be an absolute path, instead of: %s", | |||
lib_from_env) | |||
else: | |||
if os.name == 'nt': | |||
os.environ['PATH'] = os.path.dirname(lib_from_env) + ';' + os.environ['PATH'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please append to the end of path instead of the beginning to prevent path masking
python/mxnet/libinfo.py
Outdated
@@ -69,6 +72,8 @@ def find_lib_path(): | |||
if len(lib_path) == 0: | |||
raise RuntimeError('Cannot find the MXNet library.\n' + | |||
'List of candidates:\n' + str('\n'.join(dll_path))) | |||
if os.name == 'nt': | |||
os.environ['PATH'] = os.path.dirname(lib_path[0]) + ';' + os.environ['PATH'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
@yajiedesign @marcoabreu It seems all check passed, I'll modify readme in #10613 when this pr merged. Thank you:) |
Jenkinsfile
Outdated
} | ||
} | ||
}, | ||
'Python 3: MKLDNN-GPU Win':{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm always wondering if it's necessary to test both Python 2 and 3 for all different cases? @marcoabreu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think only keep one python 2 test is ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please only keep one test. Since you're testing the CPP backend, which is independent of Python, there's no need to test both versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@yajiedesign in future, please start using meaningful commit messages or amend your commit. The current style does not add any value to your commits and makes it hard to keep track of the changes. |
Jenkinsfile
Outdated
@@ -311,7 +311,7 @@ try { | |||
bat """mkdir build_vc14_gpu | |||
call "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\x86_amd64\\vcvarsx86_amd64.bat" | |||
cd build_vc14_gpu | |||
cmake -G \"NMake Makefiles JOM\" -DUSE_CUDA=1 -DUSE_CUDNN=1 -DUSE_NVRTC=1 -DUSE_OPENCV=1 -DUSE_OPENMP=1 -DUSE_PROFILER=1 -DUSE_BLAS=open -DUSE_LAPACK=1 -DUSE_DIST_KVSTORE=0 -DCUDA_ARCH_NAME=All -DCMAKE_CXX_FLAGS_RELEASE="/FS /MD /O2 /Ob2 /DNDEBUG" -DCMAKE_BUILD_TYPE=Release ${env.WORKSPACE}""" | |||
cmake -G \"NMake Makefiles JOM\" -DUSE_CUDA=1 -DUSE_CUDNN=1 -DUSE_NVRTC=1 -DUSE_OPENCV=1 -DUSE_OPENMP=1 -DUSE_PROFILER=1 -DUSE_BLAS=open -DUSE_LAPACK=1 -DUSE_DIST_KVSTORE=0 -DCUDA_ARCH_NAME=Maxwell -DCMAKE_CXX_FLAGS_RELEASE="/FS /MD /O2 /Ob2 /DNDEBUG" -DCMAKE_BUILD_TYPE=Release -DUSE_MKL_IF_AVAILABLE=0 ${env.WORKSPACE}""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please leave the cuda-archs unchanged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
cmake/MklDnn.cmake
Outdated
if(MSVC) | ||
set(MKL_NAME "mklml_win_2018.0.2.20180127") | ||
file(DOWNLOAD "https://github.com/intel/mkl-dnn/releases/download/v0.13/${MKL_NAME}.zip" "${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}.zip" EXPECTED_MD5 "D7B4BD9E85BB7B85F5C956FE119A8722" SHOW_PROGRESS) | ||
file(DOWNLOAD "https://github.com/yajiedesign/mxnet/releases/download/weekly_binary_build_v2/7z.exe" "${CMAKE_CURRENT_BINARY_DIR}/mklml/7z2.exe" EXPECTED_MD5 "E1CF766CF358F368EC97662D06EA5A4C" SHOW_PROGRESS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refrain from using private repositories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please refrain from downloading unstable weekly builds. We want our users to only use stable and released versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need a new tag like "tools" or "utils" place this tools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
use arc to all remove redundant test
can we merge? |
add_definitions(-DUSE_MKL=1) | ||
add_definitions(-DCUB_MKL=1) | ||
add_definitions(-DMXNET_USE_MKLDNN=1) | ||
list(APPEND mxnet_LINKER_LIBS mkldnn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you are doing now. Some of the lines here are indeed not necessary.
Is there any problem? Can we merge? @marcoabreu @szha |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved for code changes. My cmake knowledge is limited so a second pair of eyes is appreciated.
Ping |
@yajiedesign seems some conflicts occured. |
@yajiedesign update your submodule using |
Can you remove the mkldnn submudule change from this pr, then there is not need to fix the cpp test error. |
@TaoLv no,it not need with cpp test.but it need to other.the master mkldnn(b4137dfc88e3bf5c6b62e833121802eb8c6696da) is some error with msvc.look this https://github.com/intel/mkl-dnn/blob/b4137dfc88e3bf5c6b62e833121802eb8c6696da/src/common/utils.cpp#L18 the |
ok.update done.wait merge. |
OK, I see. There is another PR (#10819 ) is also trying to update the version of mkldnn submodule (maybe another version). Let's wait to see which one will be merged firstly. |
@TaoLv is same version 0.14 tag 0e7ca738866d22cc700aa33b8de120b938f910d0 |
Since this issue is related to msvc, can we have this PR only have msvc change and its CI tests. mkl-dnn version update and its CI tests are covered under MXNET-367 PR #10819 . |
* fix mkldnn with msvc add linux * fix sum name * jk ip * add test * fixed missing depend * fix tools url use arc to all remove redundant test * updata mkldnn to 0.14 * change mkldnn to v0.14 * close "-mtune=generic" with msvc, turn off test example * up mkldnn * change mkldnn to good v0.14 tag * fix mklml download * fix MKLDNN_UTIL_FUNC.MemFormat
* fix mkldnn with msvc add linux * fix sum name * jk ip * add test * fixed missing depend * fix tools url use arc to all remove redundant test * updata mkldnn to 0.14 * change mkldnn to v0.14 * close "-mtune=generic" with msvc, turn off test example * up mkldnn * change mkldnn to good v0.14 tag * fix mklml download * fix MKLDNN_UTIL_FUNC.MemFormat
* fix mkldnn with msvc add linux * fix sum name * jk ip * add test * fixed missing depend * fix tools url use arc to all remove redundant test * updata mkldnn to 0.14 * change mkldnn to v0.14 * close "-mtune=generic" with msvc, turn off test example * up mkldnn * change mkldnn to good v0.14 tag * fix mklml download * fix MKLDNN_UTIL_FUNC.MemFormat
Description
fix Mkldnn with msvc
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
https://issues.apache.org/jira/browse/MXNET-343