From bffdc988ab92ae57e8adb0a75dbc564eb9682b4a Mon Sep 17 00:00:00 2001 From: Matthew Richardson Date: Fri, 28 Oct 2016 18:30:18 -0700 Subject: [PATCH 1/3] Changed windows build to just not include (unsupported) rnnlm-mp in makefile. --- doc/source/install.rst | 5 ++--- examples/CMakeLists.txt | 6 +++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/source/install.rst b/doc/source/install.rst index 6e90208c5..077d38b6c 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -170,9 +170,8 @@ installed Eigen and Boost (for example, at c:\\libs\\Eigen and c:\\libs\\boost_1 This will generate dynet.sln and a bunch of \*.vcxproj files (one for the DYNET library, and one per example). You should be able to just open dynet.sln and build all. **Note: multi-process functionality is -currently not supported in Windows, so you will not be able to build -rnnlm-mp. Go to build->Configuration Manager and uncheck the box next to -this project** +currently not supported in Windows, so the example rnnlm-mp will not be included +in the generated solution** The Windows build also supports CUDA. The latest (development) version of Eigen has some code that causes problems with the CUDA compiler. These issue change as Eigen is developed. Currently, the following three changes are needed in Eigen when compiling with CUDA support: diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 0ee556e7d..86dbc7312 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,7 +1,11 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +if (NOT MSVC) + set(RNNLM_MP "rnnlm-mp") +endif() + # segrnn-sup -foreach(TARGET mlc tok-embed poisson-regression tag-bilstm embed-cl encdec xor xor-xent xor-batch xor-batch-lookup rnnlm rnnlm-aevb rnnlm-cfsm rnnlm-batch nlm textcat rnnlm-mp read-write) +foreach(TARGET mlc tok-embed poisson-regression tag-bilstm embed-cl encdec xor xor-xent xor-batch xor-batch-lookup rnnlm rnnlm-aevb rnnlm-cfsm rnnlm-batch nlm textcat ${RNNLM_MP} read-write) ADD_EXECUTABLE(${TARGET} ${TARGET}.cc) if (WITH_CUDA_BACKEND) target_link_libraries(${TARGET} gdynet ${LIBS}) From c85f273e60378a95b87f3ae768444c32c9d5a695 Mon Sep 17 00:00:00 2001 From: Matthew Richardson Date: Fri, 28 Oct 2016 18:30:53 -0700 Subject: [PATCH 2/3] Latest version of Eigen no longer needs these windows-specific changes, removing them from install help. --- doc/source/install.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/source/install.rst b/doc/source/install.rst index 077d38b6c..6b799b96a 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -173,9 +173,7 @@ dynet.sln and build all. **Note: multi-process functionality is currently not supported in Windows, so the example rnnlm-mp will not be included in the generated solution** -The Windows build also supports CUDA. The latest (development) version of Eigen has some code that causes problems with the CUDA compiler. These issue change as Eigen is developed. Currently, the following three changes are needed in Eigen when compiling with CUDA support: +The Windows build also supports CUDA with the latest version of Eigen (as of Oct 28, 2016), with the following code change: -- block.h: add `#ifndef __CUDACC__` / `#endif` around `EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block)` -- ref.h: add `#ifndef __CUDACC__ / #endif` around `EIGEN_INHERIT_ASSIGNMENT_OPERATORS(RefBase)` - TensorDeviceCuda.h: Change `sleep(1)` to `Sleep(1000)` From bf78d621f831d823fa3c86ae1b7d8ab05222816d Mon Sep 17 00:00:00 2001 From: Matthew Richardson Date: Sat, 29 Oct 2016 12:59:27 -0700 Subject: [PATCH 3/3] Updating instructions to say that neither multi-process example will be compiled in Windows. --- doc/source/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/install.rst b/doc/source/install.rst index 6b799b96a..353a4e8cd 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -170,7 +170,7 @@ installed Eigen and Boost (for example, at c:\\libs\\Eigen and c:\\libs\\boost_1 This will generate dynet.sln and a bunch of \*.vcxproj files (one for the DYNET library, and one per example). You should be able to just open dynet.sln and build all. **Note: multi-process functionality is -currently not supported in Windows, so the example rnnlm-mp will not be included +currently not supported in Windows, so the multi-process examples (*-mp) will not be included in the generated solution** The Windows build also supports CUDA with the latest version of Eigen (as of Oct 28, 2016), with the following code change: