Using cutorch and cunn on windows

5,681 views
Skip to first unread message

Neil

unread,
Oct 24, 2014, 1:51:23 AM10/24/14
to tor...@googlegroups.com

Hello

Can I build and test cutorch and cunn on windows ?

smth chntla

unread,
Oct 24, 2014, 12:45:45 PM10/24/14
to tor...@googlegroups.com
cc: Jonathan Tompson

Jonathan Tompson

unread,
Oct 24, 2014, 1:22:29 PM10/24/14
to torch7 on behalf of smth chntla
Neil, I have not actually tried compiling on Windows.  Good luck!

--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+un...@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.
Visit this group at http://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.

Neil

unread,
Oct 25, 2014, 12:26:16 PM10/25/14
to tor...@googlegroups.com
Hello John

I am not able to build the dependencies viz paths, cwrap and torch7 core package.
But I see MSVC support in CMake. Could you suggest the steps to build torch7 ?


On Friday, October 24, 2014 10:52:29 PM UTC+5:30, Jonathan Tompson wrote:
Neil, I have not actually tried compiling on Windows.  Good luck!

Jonathan Tompson

unread,
Oct 25, 2014, 1:13:11 PM10/25/14
to torch7 on behalf of Neil
I haven't looked into it myself.  @soumith, who added windows support to cmake?  Was it @andresy?

Neil

unread,
Oct 25, 2014, 1:43:03 PM10/25/14
to tor...@googlegroups.com
The License documentation (torch.ch) also claims windows support for core packages.

On Saturday, October 25, 2014 10:43:11 PM UTC+5:30, Jonathan Tompson wrote:
I haven't looked into it myself.  @soumith, who added windows support to cmake?  Was it @andresy?
On Sat, Oct 25, 2014 at 12:26 PM, Neil via torch7 <torch7+noreply-APn2wQfIWb4f5QXlSoUDhDnlLvVEC2kE-rU5K5jByq1zEMcdq@googlegroups.com> wrote:
Hello John

I am not able to build the dependencies viz paths, cwrap and torch7 core package.
But I see MSVC support in CMake. Could you suggest the steps to build torch7 ?

On Friday, October 24, 2014 10:52:29 PM UTC+5:30, Jonathan Tompson wrote:
Neil, I have not actually tried compiling on Windows.  Good luck!

On Fri, Oct 24, 2014 at 12:45 PM, smth chntla via torch7 <torch7+noreply-APn2wQeWkU_KsmAv8TIk9zu8LHCbVrv8Y1r4d-hYZ6NwXx...@googlegroups.com> wrote:
cc: Jonathan Tompson


On Friday, October 24, 2014 1:51:23 AM UTC-4, Neil wrote:

Hello

Can I build and test cutorch and cunn on windows ?

--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+un...@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.
Visit this group at http://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.

Alfredo Canziani

unread,
Oct 28, 2014, 11:40:18 AM10/28/14
to tor...@googlegroups.com
In the source code I keep finding #ifdef WIN32 all around, but I haven't been able to find updated doc on how to build it for the Windows OS.
Here (http://torch.cogbits.com/doc/install/index.html), under the CMake there are some references to Windows...

Alfredo Canziani

unread,
Oct 28, 2014, 11:50:23 AM10/28/14
to tor...@googlegroups.com
Here (https://github.com/torch/torch7-distro/pull/1) there are other information.
@Jonathan, did you manage to compile Torch7 and the nn package for Windows? If yes, could you please post a short tutorial/explanation?

smth chntla

unread,
Oct 28, 2014, 1:47:17 PM10/28/14
to tor...@googlegroups.com
Leon Bouttou and his students use Windows. 
The core luajit+rocks, torch7 and nn packages should be compilable via CMake+VisualStudio.

However I HAVE NOT TESTED THIS, and NO ONE is going to support anyone who tries this, because none of us use windows.

Alfredo Canziani

unread,
Oct 28, 2014, 5:10:37 PM10/28/14
to tor...@googlegroups.com
Thank you, Soumith.
Unfortunately I have the necessity of running some deep-learning on a Windows box, and I wouldn't know how to deal with it otherwise.
Perhaps using a virtual machine and streaming video data in one direction and predictions in the other or use shared memory... But all this stuff looks quite complicated.
If you have any suggestion, I would love hearing your opinion about it!

Alfredo Canziani

unread,
Oct 30, 2014, 3:22:32 PM10/30/14
to tor...@googlegroups.com
Eureka! I have Torch up and running on Windows and Cuda is working like a charm! :D

Neil

unread,
Nov 3, 2014, 12:58:02 AM11/3/14
to tor...@googlegroups.com
Hello Alfredo

Could you tell me the steps to get this done on windows ?

Anton Varfolomeev

unread,
Nov 5, 2014, 2:00:19 PM11/5/14
to tor...@googlegroups.com
Great!
Can you give others some hints?

Arjun

unread,
Nov 6, 2014, 10:37:33 AM11/6/14
to tor...@googlegroups.com
Hey
            I am a newbie in torch 7 .And i am naive in linux. Could you please suggest the steps you took to install torch and get it to work with cuda.It is really important for me at the moment.

And also is there an editor for torch ?
Thanks 


On Friday, October 24, 2014 1:51:23 AM UTC-4, Neil wrote:

Arjun

unread,
Nov 6, 2014, 10:38:46 AM11/6/14
to tor...@googlegroups.com
Forgot to mention that i was interested in knowing the installation process for windows.

Jonathan Tompson

unread,
Nov 6, 2014, 10:47:35 AM11/6/14
to torch7 on behalf of Arjun
Arjun, I use the torch version of zero-brane studio by @soumith


If you're used to Visual Studio or some other full-featured editor, then you'll be disappointed...  But it get's the job done and even has visual debugging functionality.

--

Arjun

unread,
Nov 6, 2014, 11:11:36 AM11/6/14
to tor...@googlegroups.com
Thank you Jonathan.That definitely looks good. 


On Friday, October 24, 2014 1:51:23 AM UTC-4, Neil wrote:

Jonathan Tompson

unread,
Nov 6, 2014, 11:12:43 AM11/6/14
to torch7 on behalf of Arjun
Actually, we should all thank soumith!

--

Arjun

unread,
Nov 6, 2014, 11:16:17 AM11/6/14
to tor...@googlegroups.com
Yup definitely.Thanks to @soumith.He has made our lives much easier.

On Thursday, November 6, 2014 11:12:43 AM UTC-5, Jonathan Tompson wrote:
Actually, we should all thank soumith!

Alfredo Canziani

unread,
Nov 6, 2014, 7:10:46 PM11/6/14
to tor...@googlegroups.com
OK, I got my inbox full of emails from all around the world. I'll post here one of the answers.

The easy way
Install 1 and 2 and enjoy.

The hard way
Building is simple in principle: take the github source (from here), run cmake (cmake-GUI for Windows) to generate project files, then compile (with Visual Studio Express 2013). But you need to fiddle with the cmake parameters to make sure all the additional libraries are recognized (blas, cuda, jpeg, etc...). This is tricky.
I am attaching my CMakeCache.txt so that you see what’s in it.
You might also need one of these, which are very hard to produce.
You also need a binary for qt-4.8, 64 bits, compiled with the same compiler. This is long to build and too large to email.
Note that https://github.com/leonbottou/torch7-custom is a fork of https://github.com/torch/torch7-distro, which was frozen when they modularized. This means code is not updated and needs merging.
CMakeCache.txt

Qizhe Xie

unread,
Sep 13, 2015, 3:47:10 AM9/13/15
to torch7
Hi Alfredo,

Could you please give more details about the easy way? I used torch on Linux but I am new to visual studio.

Thanks!

在 2014年11月7日星期五 UTC+8上午8:10:46,Alfredo Canziani写道:

Alfredo Canziani

unread,
Sep 15, 2015, 11:11:01 AM9/15/15
to torch7
尊敬的Xie先生,

There is available an installer for an old version of Torch.
I highly recommend to use the Unix (Linux or Mac) version for any meaningful application.

如果您需要任何其他帮助,请联系我。

--冷在

Qizhe Xie

unread,
Sep 15, 2015, 11:25:38 AM9/15/15
to torch7 on behalf of Alfredo Canziani
I also think it's better to use Linux version because that version is deprecated. We are also investigating keras based on Theano.
谢谢!

--
You received this message because you are subscribed to a topic in the Google Groups "torch7" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/torch7/A5XUU4u9Tjw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to torch7+un...@googlegroups.com.

Pushkar Shukla

unread,
Oct 17, 2016, 1:01:56 AM10/17/16
to torch7
Ihave installed Torch on windows, However I am not able to link the Cudnn package with Torch. Can you help me on that


Simon Cheng

unread,
Mar 22, 2019, 10:10:08 PM3/22/19
to torch7
Yo, the easy way 2nd link doesn't work anymore, can you repost?

Simon Cheng

unread,
Mar 22, 2019, 11:19:25 PM3/22/19
to torch7

Viktoria T

unread,
May 8, 2020, 10:14:03 AM5/8/20
to torch7
Hi Pushkar,
were you able to install the Cudnn package on windows? I would be thankful to see if and how this is achievable...

Rocket44au

unread,
Jun 27, 2020, 11:26:22 AM6/27/20
to torch7

@Alfredo Canziani

I have installed Torch on Windows the "easy way".
When I start Torch, it fails with the following messages:

Try the IDE: torch -ide
Type help() for more info
Torch 7.0  Copyright (C) 2001-2011 Idiap, NEC Labs, NYU
torch-qlua: C:/M_VIDEO/TORCH/share/torch/lua/torch/init.lua:4: cannot load 'C:/M_VIDEO/TORCH/lib/torch/lua/libtorch.dll'
stack traceback:
        [C]: at 0x7ffe858a2f40
        [C]: in function 'require'
        C:/M_VIDEO/TORCH/share/torch/lua/torch/init.lua:4: in main chunk
        [C]: in function 'require'
        C:/M_VIDEO/TORCH/share/torch/lua/torch-env.lua:295: in function 'loaddefaultlibs'
        C:/M_VIDEO/TORCH/share/torch/lua/torch-env.lua:305: in main chunk
        [C]: in function 'require'
        [string "require 'torch-env'"]:1: in main chunk

I have looked in the specified folder,
and libtorch.dll is definitely there,
so I don't understand what is going on.

Any ideas?


Alfredo Canziani

unread,
Jun 29, 2020, 8:57:46 PM6/29/20
to torch7 on behalf of Rocket44au
Why not using PyTorch instead?

Alf

--
You received this message because you are subscribed to a topic in the Google Groups "torch7" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/torch7/A5XUU4u9Tjw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to torch7+un...@googlegroups.com.

Rocket44au

unread,
Jun 30, 2020, 5:26:31 AM6/30/20
to torch7

@Alfredo Canziani

Many thanks for bringing PyTorch to my attention.
I shall give it a try.

RJ


On Tuesday, June 30, 2020 at 10:57:46 AM UTC+10, Alfredo Canziani wrote:
Why not using PyTorch instead?

Alf

On Sat, 27 Jun 2020, 11:26 Rocket44au via torch7, <torch7+APn2wQdCbgk6j1C_G4tKH1DiZ5cmNt0-S5_x419yyBYP20JrJrvwlpY35@googlegroups.com> wrote:

@Alfredo Canziani

I have installed Torch on Windows the "easy way".
When I start Torch, it fails with the following messages:

Try the IDE: torch -ide
Type help() for more info
Torch 7.0  Copyright (C) 2001-2011 Idiap, NEC Labs, NYU
torch-qlua: C:/M_VIDEO/TORCH/share/torch/lua/torch/init.lua:4: cannot load 'C:/M_VIDEO/TORCH/lib/torch/lua/libtorch.dll'
stack traceback:
        [C]: at 0x7ffe858a2f40
        [C]: in function 'require'
        C:/M_VIDEO/TORCH/share/torch/lua/torch/init.lua:4: in main chunk
        [C]: in function 'require'
        C:/M_VIDEO/TORCH/share/torch/lua/torch-env.lua:295: in function 'loaddefaultlibs'
        C:/M_VIDEO/TORCH/share/torch/lua/torch-env.lua:305: in main chunk
        [C]: in function 'require'
        [string "require 'torch-env'"]:1: in main chunk

I have looked in the specified folder,
and libtorch.dll is definitely there,
so I don't understand what is going on.

Any ideas?


--
You received this message because you are subscribed to a topic in the Google Groups "torch7" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/torch7/A5XUU4u9Tjw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tor...@googlegroups.com.

Alfredo Canziani

unread,
Jul 3, 2020, 2:28:27 PM7/3/20
to torch7 on behalf of Rocket44au
Great! Let me know.
Alf


On Tue, Jun 30, 2020 at 5:26 AM Rocket44au via torch7 <torch7+APn2wQdCbgk6j1C_G4tKH1DiZ...@googlegroups.com> wrote:

@Alfredo Canziani

Many thanks for bringing PyTorch to my attention.
I shall give it a try.

RJ


On Tuesday, June 30, 2020 at 10:57:46 AM UTC+10, Alfredo Canziani wrote:
Why not using PyTorch instead?

Alf

To unsubscribe from this group and all its topics, send an email to torch7+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/torch7/1fcae0e6-0e12-4cfc-af89-ba56f574a3bco%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages