Skip to content

Commit

Permalink
Merge pull request #134 from mattr1/mattri/winfix2
Browse files Browse the repository at this point in the history
Removing multiprocess examples from Windows build and simplifying windows build instructions to reflect latest Eigen version
  • Loading branch information
neubig authored Oct 29, 2016
2 parents 7f986d9 + bf78d62 commit 3f39354
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 3 additions & 6 deletions doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,10 @@ 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 multi-process examples (*-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)`

6 changes: 5 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

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 xor-mp segrnn-sup)
if (NOT MSVC)
set(MP_EXAMPLES rnnlm-mp xor-mp)
endif()

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 read-write segrnn-sup ${MP_EXAMPLES})
ADD_EXECUTABLE(${TARGET} ${TARGET}.cc)
if (WITH_CUDA_BACKEND)
target_link_libraries(${TARGET} gdynet ${LIBS})
Expand Down

0 comments on commit 3f39354

Please sign in to comment.