[pyviennacl] 02/05: Imported Upstream version 1.0.3+dfsg
Toby St Clere Smithe
tsmithe-guest at moszumanska.debian.org
Sat May 17 17:35:02 UTC 2014
This is an automated email from the git hooks/post-receive script.
tsmithe-guest pushed a commit to branch debian
in repository pyviennacl.
commit 433b42728f3b4761e795a9fc6e51d2402a8954e8
Author: Toby Smithe <git at tsmithe.net>
Date: Sat May 17 18:21:48 2014 +0100
Imported Upstream version 1.0.3+dfsg
---
ChangeLog | 29 +++++++++++++++++++++++++++++
PKG-INFO | 8 ++++----
README.rst | 6 +++---
doc/build-doc.py | 2 +-
pyviennacl.egg-info/PKG-INFO | 8 ++++----
pyviennacl/__init__.py | 18 ++++++++++--------
pyviennacl/pycore.py | 18 ++++++++++++++----
pyviennacl/version.py | 2 +-
src/_viennacl/core.cpp | 2 +-
tests/matrix_operations.py | 24 +++++++++++++++++-------
10 files changed, 84 insertions(+), 33 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index cfceae4..87106f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,32 @@
+2014-05-15 Toby St Clere Smithe <pyviennacl at tsmithe.net>
+
+ * Release 1.0.3.
+
+ * Update external/viennacl-dev to version 1.5.2.
+ [91b7589a8fccc92927306e0ae3e061d85ac1ae93]
+
+ This contains two important fixes: one for a build failure on
+ Windows (PyViennaCL issue #17) relating to the re-enabling of the
+ Lanczos algorithm in 1.0.2, and one for an issue relating to
+ missing support for matrix transposition in the ViennaCL scheduler
+ (PyViennaCL issue #19, ViennaCL issue #73).
+
+ This release is also benefitial for performance on nVidia Kepler
+ GPUs, increasing the performance of matrix-matrix multiplications
+ to 600 GFLOPs in single precision on a GeForce GTX 680.
+
+ * Fix bug when using integers in matrix and vector index key
+ [dbb1911fd788e66475f5717c1692be49d083a506]
+
+ * Fix slicing of dense matrices (issue #18).
+ [9c745710ebc2a1066c7074b6c5de61b227017cc6]
+
+ * Enable test for matrix transposition
+ [9e951103b883a3848aa2115df3edce73d347c09b]
+
+ * Add non-square matrix-vector product test
+ [21dd29cd10ebe02a96ee23c20ee55401bc6c874f]
+
2014-05-06 Toby St Clere Smithe <pyviennacl at tsmithe.net>
* Release 1.0.2.
diff --git a/PKG-INFO b/PKG-INFO
index c154aec..df581e9 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pyviennacl
-Version: 1.0.2
+Version: 1.0.3
Summary: Sparse/dense linear algebra on GPUs and CPUs using OpenCL
Home-page: http://viennacl.sourceforge.net/pyviennacl.html
Author: Toby St Clere Smithe
@@ -118,9 +118,9 @@ Description: *****************
and .NET Framework 3.5 SP1
<http://www.microsoft.com/en-us/download/details.aspx?id=18950>`_.
- If you are building for a standard distribution of Python 3.3 (32- or
- 64-bit), you will need the `Microsoft Windows SDK v7.1 for Windows 7
- and .NET Framework 4
+ If you are building for a standard distribution of Python 3.3 or later
+ (32- or 64-bit), you will need the `Microsoft Windows SDK v7.1 for
+ Windows 7 and .NET Framework 4
<https://www.microsoft.com/en-us/download/details.aspx?id=8442>`_.
Having installed the correct SDK version, you will need to open an SDK
diff --git a/README.rst b/README.rst
index 08f9f5f..02ed989 100644
--- a/README.rst
+++ b/README.rst
@@ -110,9 +110,9 @@ the example above) of Python 2.6, 2.7, 3.0, 3.1 or 3.2 (either 32- or
and .NET Framework 3.5 SP1
<http://www.microsoft.com/en-us/download/details.aspx?id=18950>`_.
-If you are building for a standard distribution of Python 3.3 (32- or
-64-bit), you will need the `Microsoft Windows SDK v7.1 for Windows 7
-and .NET Framework 4
+If you are building for a standard distribution of Python 3.3 or later
+(32- or 64-bit), you will need the `Microsoft Windows SDK v7.1 for
+Windows 7 and .NET Framework 4
<https://www.microsoft.com/en-us/download/details.aspx?id=8442>`_.
Having installed the correct SDK version, you will need to open an SDK
diff --git a/doc/build-doc.py b/doc/build-doc.py
index f7405b4..cff5884 100644
--- a/doc/build-doc.py
+++ b/doc/build-doc.py
@@ -1,5 +1,5 @@
import sys
from sphinx import main
-sys.exit(main(['sphinx-build_pyviennacl', 'doc', 'build/doc']))
+sys.exit(main(['sphinx-build_pyviennacl', '', '_build/html']))
diff --git a/pyviennacl.egg-info/PKG-INFO b/pyviennacl.egg-info/PKG-INFO
index c154aec..df581e9 100644
--- a/pyviennacl.egg-info/PKG-INFO
+++ b/pyviennacl.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pyviennacl
-Version: 1.0.2
+Version: 1.0.3
Summary: Sparse/dense linear algebra on GPUs and CPUs using OpenCL
Home-page: http://viennacl.sourceforge.net/pyviennacl.html
Author: Toby St Clere Smithe
@@ -118,9 +118,9 @@ Description: *****************
and .NET Framework 3.5 SP1
<http://www.microsoft.com/en-us/download/details.aspx?id=18950>`_.
- If you are building for a standard distribution of Python 3.3 (32- or
- 64-bit), you will need the `Microsoft Windows SDK v7.1 for Windows 7
- and .NET Framework 4
+ If you are building for a standard distribution of Python 3.3 or later
+ (32- or 64-bit), you will need the `Microsoft Windows SDK v7.1 for
+ Windows 7 and .NET Framework 4
<https://www.microsoft.com/en-us/download/details.aspx?id=8442>`_.
Having installed the correct SDK version, you will need to open an SDK
diff --git a/pyviennacl/__init__.py b/pyviennacl/__init__.py
index 22e7263..522f3ca 100644
--- a/pyviennacl/__init__.py
+++ b/pyviennacl/__init__.py
@@ -1,13 +1,14 @@
-"""
-PyViennaCL
+"""PyViennaCL
==========
-This extension provides the Python bindings for the ViennaCL linear
-algebra and numerical computation library for GPGPU and heterogeneous
-systems. ViennaCL itself is a header-only C++ library, so these bindings
-make available to Python programmers ViennaCL's fast OpenCL and CUDA
-algorithms, in a way that is idiomatic and compatible with the Python
-community's most popular scientific packages, NumPy and SciPy.
+This extension provides the Python bindings for the `ViennaCL
+<http://viennacl.sourceforge.net/>`_ linear algebra and numerical
+computation library for GPGPU and heterogeneous systems. `ViennaCL
+<http://viennacl.sourceforge.net/>`_ itself is a header-only C++
+library, so these bindings make available to Python programmers
+ViennaCL's fast OpenCL and CUDA algorithms, in a way that is idiomatic
+and compatible with the Python community's most popular scientific
+packages, NumPy and SciPy.
PyViennaCL is divided into five submodules, of which four are designed
for direct use by users:
@@ -38,6 +39,7 @@ PyViennaCL's high-level linear algebra functions, run::
or::
>>> help(p.linalg) # doctest: +SKIP
+
"""
from .version import VERSION_TEXT as __version__
diff --git a/pyviennacl/pycore.py b/pyviennacl/pycore.py
index 705842e..7c07db5 100644
--- a/pyviennacl/pycore.py
+++ b/pyviennacl/pycore.py
@@ -1193,6 +1193,8 @@ class Vector(Leaf):
raise IndexError("Too many indices")
elif isinstance(key, int) or isinstance(key, long):
# TODO: key is probably an int -- be sure?
+ # TODO DUBIOUS USE INDEXERROR MAYBE?
+ key = key % self.shape[0]
return HostScalar(self.vcl_leaf.get_entry(key),
dtype=self.dtype)
else:
@@ -1758,21 +1760,27 @@ class Matrix(Leaf):
project = getattr(_v,
"project_matrix_" + vcl_statement_node_numeric_type_strings[
self.statement_node_numeric_type])
- if isinstance(key, tuple) or isinstance(key, list):
+ if isinstance(key, tuple):
+ key = list(key)
+ if isinstance(key, list):
if len(key) == 0:
return self
elif len(key) == 1:
return self[key[0]]
elif len(key) == 2:
if isinstance(key[0], int):
+ # TODO DUBIOUS USE INDEXERROR MAYBE?
+ key[0] = key[0] % self.shape[0]
# Choose from row
if isinstance(key[1], int):
+ # TODO DUBIOUS USE INDEXERROR MAYBE?
+ key[1] = key[1] % self.shape[1]
# (int, int) -> scalar
return HostScalar(self.vcl_leaf.get_entry(key[0], key[1]),
dtype=self.dtype)
elif isinstance(key[1], slice):
# (int, slice) - range/slice from row -> row vector
- view1 = View(slice(0, key[0]+1), self.size1)
+ view1 = View(slice(key[0], key[0]+1), self.size1)
view2 = View(key[1], self.size2)
return Matrix(project(self.vcl_leaf,
view1.vcl_view,
@@ -1786,9 +1794,11 @@ class Matrix(Leaf):
elif isinstance(key[0], slice):
# slice of rows
if isinstance(key[1], int):
+ # TODO DUBIOUS USE INDEXERROR MAYBE?
+ key[1] = key[1] % self.shape[1]
# (slice, int) - range/slice from col -> col vector
view1 = View(key[0], self.size1)
- view2 = View(slice(0, key[1]+1), self.size2)
+ view2 = View(slice(key[1], key[1]+1), self.size2)
return Matrix(project(self.vcl_leaf,
view1.vcl_view,
view2.vcl_view),
@@ -1813,7 +1823,7 @@ class Matrix(Leaf):
raise TypeError("Did not understand key[0]")
elif isinstance(key, slice):
view1 = View(key, self.size1)
- view2 = View(slice(0, 1, self.size2), self.size2)
+ view2 = View(slice(0, self.size2, 1), self.size2)
return Matrix(project(self.vcl_leaf,
view1.vcl_view,
view2.vcl_view),
diff --git a/pyviennacl/version.py b/pyviennacl/version.py
index a2537c7..a6add5c 100644
--- a/pyviennacl/version.py
+++ b/pyviennacl/version.py
@@ -1,3 +1,3 @@
-VERSION = (1, 0, 2)
+VERSION = (1, 0, 3)
VERSION_STATUS = ""
VERSION_TEXT = ".".join(str(x) for x in VERSION) + VERSION_STATUS
diff --git a/src/_viennacl/core.cpp b/src/_viennacl/core.cpp
index d593402..2c9e10c 100644
--- a/src/_viennacl/core.cpp
+++ b/src/_viennacl/core.cpp
@@ -29,7 +29,7 @@ BOOST_PYTHON_MODULE(_viennacl)
np::initialize();
// TODO: integrate version into build process
- bp::scope().attr("__version__") = bp::object("1.5.1");
+ bp::scope().attr("__version__") = bp::object("1.5.2");
bp::def("backend_finish", vcl::backend::finish);
diff --git a/tests/matrix_operations.py b/tests/matrix_operations.py
index ae067f8..72ea1b2 100644
--- a/tests/matrix_operations.py
+++ b/tests/matrix_operations.py
@@ -170,6 +170,16 @@ def run_test(*args, **kwargs):
raise RuntimeError("Failed: matrix-vector multiplication")
print("Test: matrix-vector multiplication passed")
+ # Non-square matrix-vector multiplication
+ vec = p.Vector(vcl_A[:,:-1].shape[1], 3.1415, dtype = dtype)
+ X = vcl_A[:,:-1] * vec
+ Y = vcl_A[:,:-1].value.dot(vec.value)
+ act_diff = math.fabs(diff(X, Y))
+ if act_diff > epsilon:
+ raise RuntimeError("Failed: non-square matrix-vector multiplication")
+ print("Test: non-square matrix-vector multiplication passed (%d, %d)" %
+ (vcl_A[:,:-1].shape[0], vcl_A[:,:-1].shape[1]))
+
# Matrix divided by scalar
X = vcl_A.value / alpha.value
Y = vcl_A / alpha
@@ -337,13 +347,13 @@ def run_test(*args, **kwargs):
raise RuntimeError("Failed: elementwise tanh")
print("Test: elementwise tanh passed")
- # - trans TODO ?!!!
- #X = vcl_A.value.T
- #Y = vcl_A.T.result #p.Trans(vcl_A).result
- #act_diff = math.fabs(diff(X, Y))
- #if act_diff > epsilon:
- # raise RuntimeError("Failed: elementwise trans")
- #print("Test: elementwise trans passed")
+ # - trans
+ X = vcl_A.value.T
+ Y = vcl_A.T.result #p.Trans(vcl_A).result
+ act_diff = math.fabs(diff(X, Y))
+ if act_diff > epsilon:
+ raise RuntimeError("Failed: trans")
+ print("Test: trans passed")
# - norm1 -- TODO ONLY FOR VECTORS
# - norm2 -- TODO ONLY FOR VECTORS
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pyviennacl.git
More information about the debian-science-commits
mailing list