Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/distro.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Guo <guorui.xt@gmail.com>2016-11-28 10:20:32 +0300
committerRui Guo <guorui.xt@gmail.com>2016-11-28 10:20:32 +0300
commitf2a545e1f3b3c7f3375b83ef601a7a201dd94744 (patch)
tree7f479680d75838b36f18259db7dbad586fa51f8f /win-files
parentb0acdb20e1b77b6deec817e6e1f1aadc7b6baf8b (diff)
update packages for msvc
Diffstat (limited to 'win-files')
-rw-r--r--win-files/patch/cunn.patch27
-rw-r--r--win-files/patch/cutorch.patch13
-rw-r--r--win-files/patch/torch.patch13
3 files changed, 46 insertions, 7 deletions
diff --git a/win-files/patch/cunn.patch b/win-files/patch/cunn.patch
index d143c9b..1fe0c4e 100644
--- a/win-files/patch/cunn.patch
+++ b/win-files/patch/cunn.patch
@@ -1,5 +1,5 @@
diff --git a/THCUNN.lua b/THCUNN.lua
-index 490cd5c..9924944 100644
+index ac05ee0..2daf271 100644
--- a/THCUNN.lua
+++ b/THCUNN.lua
@@ -6,6 +6,9 @@ local THCUNN = {}
@@ -12,7 +12,7 @@ index 490cd5c..9924944 100644
local THCState_ptr = ffi.typeof('THCState*')
function THCUNN.getState()
-@@ -139,7 +142,7 @@ local transform_reals_to_half = function(func_name, real_args, ...)
+@@ -140,7 +143,7 @@ local transform_reals_to_half = function(func_name, real_args, ...)
end
for k,v in ipairs(real_args[func_name]) do
-- first argument (THCState) is added implicitly by bind
@@ -21,8 +21,21 @@ index 490cd5c..9924944 100644
end
return t
end
+diff --git a/lib/THCUNN/CMakeLists.txt b/lib/THCUNN/CMakeLists.txt
+index d86dfdc..bce4cbd 100644
+--- a/lib/THCUNN/CMakeLists.txt
++++ b/lib/THCUNN/CMakeLists.txt
+@@ -10,7 +10,7 @@ IF(NOT CUDA_FOUND)
+ ENDIF()
+
+ # Detect CUDA architecture and get best NVCC flags
+-IF(NOT COMMAND CUDA_SELECT_NVCC_ARCH_FLAGS)
++IF(NOT COMMAND CUDA_SELECT_NVCC_ARCH_FLAGS OR MSVC)
+ INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/select_compute_arch.cmake)
+ ENDIF()
+ CUDA_SELECT_NVCC_ARCH_FLAGS(NVCC_FLAGS_EXTRA $ENV{TORCH_CUDA_ARCH_LIST})
diff --git a/test.lua b/test.lua
-index 7cb2854..ea214c3 100644
+index 15f9990..d39ee92 100644
--- a/test.lua
+++ b/test.lua
@@ -5,6 +5,9 @@ local precision_backward = 1e-2
@@ -35,7 +48,7 @@ index 7cb2854..ea214c3 100644
--e.g.: th -lcunn -e "nn.testcuda{'Sigmoid_forward'}"
local typenames = {
-@@ -348,17 +351,17 @@ function cunntest.Square_transposed()
+@@ -362,17 +365,17 @@ function cunntest.Square_transposed()
end
function cunntest.SoftShrink_forward()
@@ -56,7 +69,7 @@ index 7cb2854..ea214c3 100644
pointwise_transposed(nn.SoftShrink(r), 'SoftShrink', precision_backward)
end
-@@ -3377,7 +3380,7 @@ function cunntest.mse()
+@@ -3399,7 +3402,7 @@ function cunntest.mse()
local cgin = cmod:backward(cinput,ctarget)
if (typename == 'torch.CudaHalfTensor') then
@@ -65,7 +78,7 @@ index 7cb2854..ea214c3 100644
end
mytester:assertlt(math.abs(fout-cout), precision_forward_type(0.02, typename),
string.format('error on output with %s', typename))
-@@ -3411,7 +3414,7 @@ function cunntest.SmoothL1()
+@@ -3433,7 +3436,7 @@ function cunntest.SmoothL1()
local cgin = cmod:backward(cinput,ctarget)
if (typename == 'torch.CudaHalfTensor') then
@@ -74,7 +87,7 @@ index 7cb2854..ea214c3 100644
end
mytester:assertlt(math.abs(fout-cout), 0.01, string.format('error on output with %s', typename))
local gerr = cgin:double() - fgin:double()
-@@ -3976,7 +3979,7 @@ function cunntest.l1cost()
+@@ -3998,7 +4001,7 @@ function cunntest.l1cost()
local cgin = cmod:backward(cinput)
if (typename == 'torch.CudaHalfTensor') then
diff --git a/win-files/patch/cutorch.patch b/win-files/patch/cutorch.patch
new file mode 100644
index 0000000..7459d5f
--- /dev/null
+++ b/win-files/patch/cutorch.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/THC/CMakeLists.txt b/lib/THC/CMakeLists.txt
+index 08e6fbc..bc3cbfb 100644
+--- a/lib/THC/CMakeLists.txt
++++ b/lib/THC/CMakeLists.txt
+@@ -87,7 +87,7 @@ IF(APPLE)
+ ENDIF(APPLE)
+
+ # Detect CUDA architecture and get best NVCC flags
+-IF(NOT COMMAND CUDA_SELECT_NVCC_ARCH_FLAGS)
++IF(NOT COMMAND CUDA_SELECT_NVCC_ARCH_FLAGS OR MSVC)
+ INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/select_compute_arch.cmake)
+ ENDIF()
+ LIST(APPEND CUDA_NVCC_FLAGS $ENV{TORCH_NVCC_FLAGS})
diff --git a/win-files/patch/torch.patch b/win-files/patch/torch.patch
index 63e7868..9fd5972 100644
--- a/win-files/patch/torch.patch
+++ b/win-files/patch/torch.patch
@@ -1,3 +1,16 @@
+diff --git a/lib/TH/generic/THTensorLapack.c b/lib/TH/generic/THTensorLapack.c
+index fb1e246..fe82cc0 100644
+--- a/lib/TH/generic/THTensorLapack.c
++++ b/lib/TH/generic/THTensorLapack.c
+@@ -605,7 +605,7 @@ void THTensor_(potrf)(THTensor *ra_, THTensor *a, const char *uplo)
+ THLapack_(potrf)(uplo[0], n, THTensor_(data)(ra__), lda, &info);
+ THLapackCheckWithCleanup("Lapack Error in %s : the leading minor of order %d is not positive definite",
+ THCleanup(THTensor_(free)(ra__);),
+- "potrf", info);
++ "potrf", info, "");
+
+ THTensor_(clearUpLoTriangle)(ra__, uplo);
+ THTensor_(freeCopyTo)(ra__, ra_);
diff --git a/lib/luaT/luaT.c b/lib/luaT/luaT.c
index 95166ed..2dc307a 100644
--- a/lib/luaT/luaT.c