[lua-torch-torch7] 01/02: patch: add fix-32bit-system-abs-failure

Zhou Mo cdluminate-guest at moszumanska.debian.org
Wed Aug 24 13:32:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

cdluminate-guest pushed a commit to branch master
in repository lua-torch-torch7.

commit 1b340a5b925ecab1ff46ac04a8c99da8138b69e0
Author: Zhou Mo <cdluminate at gmail.com>
Date:   Wed Aug 24 13:31:47 2016 +0000

    patch: add fix-32bit-system-abs-failure
---
 debian/changelog                            |  7 +++++++
 debian/patches/fix-32bit-system-abs-failure | 28 ++++++++++++++++++++++++++++
 debian/patches/series                       |  1 +
 3 files changed, 36 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 5db5dfc..4107a36 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+lua-torch-torch7 (0~20160803-g17ff317-3) experimental; urgency=medium
+
+  * Add patch fix-32bit-system-abs-failure, changing the test number
+    which exceeds the lower bound of long int.
+
+ -- Zhou Mo <cdluminate at gmail.com>  Wed, 24 Aug 2016 13:31:20 +0000
+
 lua-torch-torch7 (0~20160803-g17ff317-2) experimental; urgency=medium
 
   * Symlink the document directory to the lua directory, in order
diff --git a/debian/patches/fix-32bit-system-abs-failure b/debian/patches/fix-32bit-system-abs-failure
new file mode 100644
index 0000000..b4217af
--- /dev/null
+++ b/debian/patches/fix-32bit-system-abs-failure
@@ -0,0 +1,28 @@
+Forward: Already merged into upstream master.
+
+commit 8c1cb8a3ae64984eddca99c9481670a8f7cf7b5b
+Author: Zhou Mo <cdluminate at gmail.com>
+Date:   Tue Aug 23 15:11:46 2016 +0000
+
+    test: fix 32-bit system abs test failure.
+    
+    According to https://github.com/torch/torch7/issues/627
+
+diff --git a/test/test.lua b/test/test.lua
+index fc5228c..21df3b6 100644
+--- a/test/test.lua
++++ b/test/test.lua
+@@ -2921,7 +2921,12 @@ function torchtest.abs()
+    end
+ 
+    -- Checking that the right abs function is called for LongTensor
+-   local bignumber = 2^31 + 1
++   local bignumber
++   if torch.LongTensor():elementSize() > 4 then
++      bignumber = 2^31 + 1
++   else
++      bignumber = 2^15 + 1
++   end
+    local input = torch.LongTensor{-bignumber}
+    mytester:assertgt(input:abs()[1], 0, 'torch.abs(3)')
+ end
diff --git a/debian/patches/series b/debian/patches/series
index 11996da..b7178a2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 fix-spelling-error
 TH-cmake-add-version
 luaT-cmake-add-version
+fix-32bit-system-abs-failure

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/lua-torch-torch7.git



More information about the debian-science-commits mailing list