[lua-torch-cutorch] 08/08: debian: first working packaging

Zhou Mo cdluminate-guest at moszumanska.debian.org
Tue Feb 7 04:09:16 UTC 2017


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

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

commit 6b8d1d3e8be10c7c51c585c29536b47770ea37ae
Author: Zhou Mo <cdluminate at gmail.com>
Date:   Tue Feb 7 04:04:28 2017 +0000

    debian: first working packaging
---
 debian/changelog                   |  2 +-
 debian/control                     | 59 ++++++++++++++++++++++++++-----
 debian/copyright                   | 72 ++++++++++++++++++++++++++++++++++++++
 debian/libtorch-thc-dev.install.in |  5 +++
 debian/libtorch-thc.install.in     |  1 +
 debian/lua5.1.dh-lua.conf          | 13 +++++++
 debian/rules                       |  5 +++
 debian/source/format               |  1 +
 8 files changed, 148 insertions(+), 10 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0f443cb..5081e09 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-lua-torch-cutorch (0~20170202-g64536bc-1) UNRELEASED; urgency=medium
+lua-torch-cutorch (0~20170202-g64536bc-1) experimental; urgency=medium
 
   * Initial release. (Closes: #834040)
 
diff --git a/debian/control b/debian/control
index 04906b1..c0dd6fa 100644
--- a/debian/control
+++ b/debian/control
@@ -10,6 +10,7 @@ Build-Depends: debhelper (>= 10),
                clang-3.8,
                lua-torch-torch7,
                libtorch-th-dev,
+               libtorch-luat-dev,
 Standards-Version: 3.9.8
 Homepage: https://github.com/torch/cutorch
 
@@ -23,23 +24,63 @@ Depends: ${misc:Depends}, ${shlibs:Depends},
          libtorch-luat-dev,
          libtorch-thc (= ${binary:Version}),
 XB-Lua-Versions: ${lua:Versions}
-Description: Fixme
- Fixme
+Description: CUDA backend for Torch framework
+ Cutorch provides a CUDA backend for torch7. It provides the following:
+ .
+ - a new tensor type: `torch.CudaTensor` that acts like `torch.FloatTensor`,
+   but all it's operations are on the GPU. Most of the tensor operations are
+   supported by cutorch. There are a few missing ones, which are being
+   implemented. The missing list can be found here:
+     https://github.com/torch/cutorch/issues/70
+ - several other GPU tensor types, with limited functionality. Currently
+   limited to copying/conversion, and several indexing and shaping operations.
+ - `cutorch.*` - Functions to set/get GPU, get device properties, memory
+   usage, set/get low-level streams, set/get random number generator's seed,
+   synchronization etc. They are described in more detail below.
+ .
+ This package ships the Lua interface of Cutorch.
 
 Package: libtorch-thc
 Architecture: amd64 ppc64el
 Section: contrib/libs
 Multi-Arch: same
-Depends: ${misc:Depends}, ${shlibs:Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends},
 Recommends: libtorch-thc-dev (= ${binary:Version})
-Description: fixme
- fixme
+Description: libTHC.so for Torch framework (library)
+ Cutorch provides a CUDA backend for torch7. It provides the following:
+ .
+ - a new tensor type: `torch.CudaTensor` that acts like `torch.FloatTensor`,
+   but all it's operations are on the GPU. Most of the tensor operations are
+   supported by cutorch. There are a few missing ones, which are being
+   implemented. The missing list can be found here:
+     https://github.com/torch/cutorch/issues/70
+ - several other GPU tensor types, with limited functionality. Currently
+   limited to copying/conversion, and several indexing and shaping operations.
+ - `cutorch.*` - Functions to set/get GPU, get device properties, memory
+   usage, set/get low-level streams, set/get random number generator's seed,
+   synchronization etc. They are described in more detail below.
+ .
+ This package ships the libTHC.so library.
+
 
 Package: libtorch-thc-dev
 Architecture: amd64 ppc64el
 Section: contrib/libdevel
 Multi-Arch: same
-Depends: ${misc:Depends}, ${shlibs:Depends}
-         libtorch-thc (= ${binary:Version})
-Description: fixme
- fixme
+Depends: ${misc:Depends}, ${shlibs:Depends},
+         libtorch-thc (= ${binary:Version}),
+Description: libTHC.so for Torch framework (development)
+ Cutorch provides a CUDA backend for torch7. It provides the following:
+ .
+ - a new tensor type: `torch.CudaTensor` that acts like `torch.FloatTensor`,
+   but all it's operations are on the GPU. Most of the tensor operations are
+   supported by cutorch. There are a few missing ones, which are being
+   implemented. The missing list can be found here:
+     https://github.com/torch/cutorch/issues/70
+ - several other GPU tensor types, with limited functionality. Currently
+   limited to copying/conversion, and several indexing and shaping operations.
+ - `cutorch.*` - Functions to set/get GPU, get device properties, memory
+   usage, set/get low-level streams, set/get random number generator's seed,
+   synchronization etc. They are described in more detail below.
+ .
+ This package ships the development files for libTHC.so .
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..cca7221
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,72 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: cutorch
+Source: https://github.com/torch/cutorch
+#
+# Please double check copyright with the licensecheck(1) command.
+
+Files: *
+Copyright:  Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert)
+            Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu)
+            Copyright (c) 2011-2013 NYU (Clement Farabet)
+            Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston)
+            Copyright (c) 2006      Idiap Research Institute (Samy Bengio)
+            Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz)
+            All rights reserved.
+License: BSD-3-Cluase-with-slight-modification
+
+Files: debian/*
+Copyright: 2017 Zhou Mo <cdluminate at gmail.com>
+License: BSD-3-Clause
+
+License: BSD-3-Cluase-with-slight-modification
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ .
+ 3. Neither the names of NEC Laboratories American and IDIAP Research
+    Institute nor the names of its contributors may be used to endorse or
+    promote products derived from this software without specific prior
+    written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+License: BSD-3-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
+ A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE HOLDERS OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/debian/libtorch-thc-dev.install.in b/debian/libtorch-thc-dev.install.in
new file mode 100644
index 0000000..ef96082
--- /dev/null
+++ b/debian/libtorch-thc-dev.install.in
@@ -0,0 +1,5 @@
+THC.build/libTHC.so  usr/lib/#DEB_HOST_MULTIARCH#/
+THC.build/THCGeneral.h /usr/include/THC/
+lib/THC/*.h  usr/include/THC/
+lib/THC/*.cuh  usr/include/THC/
+lib/THC/generic/*.h  usr/include/THC/generic/
diff --git a/debian/libtorch-thc.install.in b/debian/libtorch-thc.install.in
new file mode 100644
index 0000000..9db1cc9
--- /dev/null
+++ b/debian/libtorch-thc.install.in
@@ -0,0 +1 @@
+THC.build/libTHC.so.*  usr/lib/#DEB_HOST_MULTIARCH#/
diff --git a/debian/lua5.1.dh-lua.conf b/debian/lua5.1.dh-lua.conf
new file mode 100644
index 0000000..9ba3e88
--- /dev/null
+++ b/debian/lua5.1.dh-lua.conf
@@ -0,0 +1,13 @@
+PKG_NAME=torch-cutorch
+LUA_MODNAME=libcutorch
+LUA_VERSION=5.1
+
+LUA_SOURCES=$(foreach LUAFILE,init.lua Tensor.lua FFI.lua test/test.lua,cutorch/$(LUAFILE))
+LUA_SOURCES_MANGLER= sed 's@^cutorch/test at cutorch/@g'
+LUA_HEADER=
+
+CLIB_OBJS= Storage.lo init.lo Tensor.lo TensorMath.lo TensorOperator.lo torch/utils.lo
+
+CLIB_CFLAGS= -I$(shell pwd) -I/usr/include/lua5.1 -I$(shell pwd)/lib/THC -I/usr/include/TH -I$(shell pwd)/THC.build -I$(shell pwd)/torch
+CLIB_LDFLAGS= -L$(shell pwd)/THC.build -lluaT -lTH -lTHC -lcudart -lcublas -lcurand
+LUA_TEST=
diff --git a/debian/rules b/debian/rules
index 77bfca5..2121229 100755
--- a/debian/rules
+++ b/debian/rules
@@ -40,6 +40,11 @@ override_dh_auto_configure:
 	dh_auto_configure --buildsystem=lua
 	# generate TensorMath.c (equivalent to `ADD_TORCH_WRAP(cudatensormathwrap TensorMath.lua)`)
 	$(LUA51) TensorMath.lua TensorMath.c
+	# configure install templates
+	sed -e 's/#DEB_HOST_MULTIARCH#/$(DEB_HOST_MULTIARCH)/g' \
+		< debian/libtorch-thc-dev.install.in > debian/libtorch-thc-dev.install
+	sed -e 's/#DEB_HOST_MULTIARCH#/$(DEB_HOST_MULTIARCH)/g' \
+		< debian/libtorch-thc.install.in > debian/libtorch-thc.install
 
 override_dh_auto_build:
 	# build libTHC.so
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)

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



More information about the debian-science-commits mailing list