Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing multiprocess examples from Windows build and simplifying windows build instructions to reflect latest Eigen version #134

Merged
merged 4 commits into from
Oct 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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