This PR is to get torch installed in a self-contained folder for windows with msvc. The procedure is like the counter party for *nix. Instructions are in README
It works relying on several patches that I think are not best solutions, so I did not send PRs for them.
cunn, cudnn patches are to load THC.dll explicitly instead of using ffi.C directly for windows due to different ffi.load behaviors for different platforms. I think a better solution could be having cutorch.C defined in cutorch to load THC.dll for windows and to refer to ffi.C for *.nix.
cudnn is using LongTensor for size_t which does not work for windows since long is 32bit on windows. The patch does not contain LongTensor replacement, so cudnn can only partially work. I think a better solution is to improve torch integer types so that LongTensor uses int64 for all platforms.
Limitations for msvc users:
Latest torch git sources are not guaranteed to not break msvc compilation since windows is not officially supported. Have to stick with distro stable version.
Type long is used extensively in torch with the assumption that it is 64 bit while long is 32 bit on windows. Be careful with LongTensor.
Only the luajit version can work, lua + luaffifb currently does not work since msvc luaffifb does not work for float argument functions.
Some torch packages in torch luarocks repository can not be installed for windows with 'luarocks install' command, though many requires trivial changes to work on windows.
Followups:
To cleanup the other version of windows installation files.
Great thanks to @howard0su 's review and evaluation.
Hi,
This PR is to get torch installed in a self-contained folder for windows with msvc. The procedure is like the counter party for *nix. Instructions are in README
It works relying on several patches that I think are not best solutions, so I did not send PRs for them.
Limitations for msvc users:
Followups:
Great thanks to @howard0su 's review and evaluation.
Thanks,