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

Windows support #1

Closed
wants to merge 5 commits into from
Closed

Windows support #1

wants to merge 5 commits into from

Conversation

pflaquerre
Copy link
Contributor

This branch allows Torch 7 to be built on Windows with icc, and adds timer support. To compile:

  • Install intel's compiler (msvc doesn't support c99)
  • Launch cmake-gui
  • Set CMAKE_C_FLAGS and CMAKE_CXX_FLAGS to "/Qopenmp /Qstd=c99"
  • Set INTEL_COMPILER_DIR
  • Generate
  • Open Torch.sln
  • Right-click the solution in the solution explorer, click Intel C++ Compiler Pro, click Use Intel C++
  • Build the solution
  • Build the INSTALL target

Some remaining warnings:

warning #63: shift count is too large, libraries\TH\generic/THTensorRandom.c:20
warning #264: floating-point value does not fit in required floating-point type, packages\nn\generic/TemporalLogSoftMax.c:19

_MSC_VER is only defined when compiling with msc. In order to be able to
compile properly with other compilers, I've changed these checks to
_WIN32 instead, which should be defined in all cases. MSC can't compile
torch right now in any case since it doesn't support C99.
icc was picking up generic/lab.c even though CMakeLists.txt pointed to
the contrary. Renaming to lab.h (which makes more sense anyhow)
fixed it. I also moved the externs out into a proper header file.
@fasiha
Copy link

fasiha commented Jun 29, 2013

I started trying to build Torch7 with MSVC 2008 on Windows 7 after reading that "Torch7 is mainly made out of ANSI C and Lua, which makes it easy to compile everywhere" and before reading, a little lower in the manual, that Windows is not currently supported. I thought I'd just record here that a few times in the build steps starting with "C_HAS_SSE" (e.g., C_HAS_SSE1_1, etc.), MSVC complained that the source code it was compiling had an error, that a variable b was being used before it was initialized. I was able to "Ignore" these errors and the build process continued.

Then the build process quit because READLINE_INCLUDE_DIR is not defined (although the README specifies this as an optional requirement). I will try installing readline via GnuWin32 and update, but just wanted to post my results from tonight.

andresy pushed a commit to andresy/torch7-split that referenced this pull request Feb 5, 2014
added doc for MultiMarginCriterion
@Atcold
Copy link
Contributor

Atcold commented Oct 28, 2014

@fasiha, have you managed eventually to build Torch7 under Windows?
If so, do you have any note to share with other people? We would really appreciate it.

@fasiha
Copy link

fasiha commented Oct 28, 2014

Sorry, I didn't make any more progress on it.

@soumith soumith closed this Feb 9, 2015
@Atcold
Copy link
Contributor

Atcold commented Feb 9, 2015

Just a note for future reference.
There Torch binaries available for Windows and there is no plan to keep updating them. Further information can be found on the Torch's Google Group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants