Skip to main content

Sparse/dense linear algebra on GPUs and CPUs using OpenCL

Project description

PyViennaCL around the web

About PyViennaCL

PyViennaCL aims to make fast, powerful GPGPU and heterogeneous scientific computing really transparently easy, especially for users already using NumPy for representing matrices.

PyViennaCL does this by harnessing the ViennaCL linear algebra and numerical computation library for GPGPU and heterogeneous systems, thereby making available to Python programmers ViennaCL’s fast OpenCL and CUDA algorithms. PyViennaCL does this in a way that is idiomatic and compatible with the Python community’s most popular scientific packages, NumPy and SciPy.

PyViennaCL exposes the following functionality:

  • sparse (compressed, co-ordinate, ELL, and hybrid) and dense (row-major and column-major) matrices, vectors and scalars on your compute device using OpenCL;

  • standard arithmetic operations and mathematical functions;

  • fast matrix products for sparse and dense matrices, and inner and outer products for vectors;

  • direct solvers for dense triangular systems;

  • iterative solvers for sparse and dense systems, using the BiCGStab, CG, and GMRES algorithms;

  • iterative algorithms for eigenvalue estimation problems.

Requirements

PyViennaCL requires the following build dependencies:

  • a C++ compiler;

  • Python (2.7+) with setuptools [see below];

  • NumPy (1.7+);

  • Sphinx (1.0+) [if you want to build HTML documentation].

It is also highly recommended to have an available OpenCL implementation, since PyViennaCL was designed for this case. If you do not have OpenCL available, then PyViennaCL will still build and function, but will not perform to full effect.

If you have a Boost installation on your system, then PyViennaCL can also optionally use that, rather than the Boost subset shipped with the PyViennaCL sources.

setuptools

PyViennaCL uses the Python package setuptools for installation. Unless you are using Python 3.4, which comes with the required pieces, you may need to install setuptools. The best way to do so, which will also ensure you have the Python package manager pip installed, is to follow the instructions here.

OpenCL

By default, you will need an OpenCL implementation. PyViennaCL can still build and function without one, but will not perform to full effect.

For information on how to get an OpenCL implementation on Linux, see this howto. See also the installation section in the ViennaCL Manual on installation hints for Windows.

If you have an OpenCL installation that you installed and is not managed by your system’s package manager, then it is likely you will need to use the ‘–cl-lib-dir’ configure option.

If you do not wish to use OpenCL, then follow the Custom installation instructions below, and use the ‘–no-use-opencl’ configure option.

Extra requirements for building from source on Windows systems

In addition to the components required above, Windows builds require the use of the Windows SDK version specific to the version of your Python installation. For instance, when you run Python, if you see the following:

Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32

then you are using a release of Python 2.7 and you are building for a 32-bit installation of that version. You must therefore choose the SDK version and set the build environment accordingly.

If you are building for a standard distribution (such as described in the example above) of Python 2.6, 2.7, 3.0, 3.1 or 3.2 (either 32- or 64-bit), you will need the Microsoft Windows SDK v7.0 for Windows 7 and .NET Framework 3.5 SP1.

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.

Having installed the correct SDK version, you will need to open an SDK command prompt and issue the following commands, according the architecture of your Python installation.

If you are building for a 32-bit Python installation, use:

$> set DISTUTILS_USE_SDK=1
$> setenv /x86 /release

If you are building for a 64-bit Python installation, use:

$> set DISTUTILS_USE_SDK=1
$> setenv /x64 /release

At this point, you will be able to follow the instructions detailed below under Installation. Issue all commands from within the SDK command window.

You might also be interested in the Python Tools for Visual Studio, though these are not required either for building or using PyViennaCL.

Installation

Please note that the commands below assume that the various programs invoked are available in your system PATH; if they are not, please provide the full path to the executable on invocation.

This is especially relevant on Windows systems, where Python is not by default installed into the path. So, in this case, you might have to run something like:

$> C:\Python2.7\python -m pip install pyviennacl

instead of just:

$> pip install pyviennacl

Quick installation using pip

The following command should usually be enough to install PyViennaCL, as long as you have setuptools and pip installed (see above):

$> pip install pyviennacl

If you have a recent installation of Python (2.7 or 3.3+), and a recent installation of pip (1.4+), then this should be painless.

Note that this command assumes you have OpenCL available, and if you are on Linux, an OpenCL SDK.

If this does not succeed, follow the instructions below.

Custom installation

These instructions assume a UNIX-like platform (such as a Linux distribution or Mac OS X), but will work on a well-configured Windows system with little modification.

If you are building from the release package, move on to the next paragraph. If you are building from git, then before doing anything else, navigate to your PyViennaCL folder and get the external submodules with:

$> git submodule update --init

(On Windows you usually want to use the git bash for this)

If you are in a hurry, then the following should just work:

$> python setup.py build
$> sudo python setup.py install

Otherwise, read the configuration options, configure, build and install:

$> ./configure.py --help
$> ./configure.py --some-options
$> python setup.py build
$> sudo python setup.py install

To build the HTML documentation using Sphinx, first install PyViennaCL as above, and then run:

$> cd doc
$> make html

after which HTML documentation will be in doc/_build/html. Or you can just access the documentation from within the Python interpreter after installation:

>>> import pyviennacl
>>> help(pyviennacl)

Authors and Contact

PyViennaCL was developed during the 2013 Google Summer of Code by Toby St Clere Smithe.

ViennaCL was developed under the aegis of the Institute for Microelectronics at the Vienna University of Technology.

For any technical questions related to ViennaCL, please use our mailing list.

Licence

(Py)ViennaCL is distributed under the MIT (X11) License. See the file LICENSE in the source root directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

pyviennacl-1.0.3.zip (6.0 MB view details)

Uploaded Source

pyviennacl-1.0.3.tar.gz (3.3 MB view details)

Uploaded Source

Built Distributions

pyviennacl-1.0.3.win-amd64-py3.4.exe (1.9 MB view details)

Uploaded Source

pyviennacl-1.0.3.win-amd64-py3.3.exe (1.9 MB view details)

Uploaded Source

pyviennacl-1.0.3.win-amd64-py3.2.exe (2.0 MB view details)

Uploaded Source

pyviennacl-1.0.3.win-amd64-py2.7.exe (2.0 MB view details)

Uploaded Source

pyviennacl-1.0.3.win32-py3.4.exe (1.6 MB view details)

Uploaded Source

pyviennacl-1.0.3.win32-py3.3.exe (1.6 MB view details)

Uploaded Source

pyviennacl-1.0.3.win32-py3.2.exe (1.4 MB view details)

Uploaded Source

pyviennacl-1.0.3.win32-py2.7.exe (1.4 MB view details)

Uploaded Source

pyviennacl-1.0.3-cp34-none-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.4Windows x86-64

pyviennacl-1.0.3-cp34-none-win32.whl (1.4 MB view details)

Uploaded CPython 3.4Windows x86

pyviennacl-1.0.3-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.4mmacOS 10.6+ Intel (x86-64, i386)macOS 10.9+ Intel (x86-64, i386)macOS 10.9+ x86-64

pyviennacl-1.0.3-cp33-none-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.3Windows x86-64

pyviennacl-1.0.3-cp33-none-win32.whl (1.4 MB view details)

Uploaded CPython 3.3Windows x86

pyviennacl-1.0.3-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.3mmacOS 10.6+ Intel (x86-64, i386)macOS 10.9+ Intel (x86-64, i386)macOS 10.9+ x86-64

pyviennacl-1.0.3-cp32-none-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.2Windows x86-64

pyviennacl-1.0.3-cp32-none-win32.whl (1.2 MB view details)

Uploaded CPython 3.2Windows x86

pyviennacl-1.0.3-cp27-none-win_amd64.whl (1.7 MB view details)

Uploaded CPython 2.7Windows x86-64

pyviennacl-1.0.3-cp27-none-win32.whl (1.2 MB view details)

Uploaded CPython 2.7Windows x86

pyviennacl-1.0.3-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded CPython 2.7macOS 10.6+ Intel (x86-64, i386)macOS 10.9+ Intel (x86-64, i386)macOS 10.9+ x86-64

File details

Details for the file pyviennacl-1.0.3.zip.

File metadata

  • Download URL: pyviennacl-1.0.3.zip
  • Upload date:
  • Size: 6.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyviennacl-1.0.3.zip
Algorithm Hash digest
SHA256 84e6487a95d867db2a4e88e73a65794d7f490a6ec1011997c210b6a539dbf987
MD5 4f75eb93980f593f227a26f81d6ea72d
BLAKE2b-256 3366d340bb8f3611e3ca4dd443148e0331f33506d8355c362129037fdd72806b

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3.tar.gz.

File metadata

  • Download URL: pyviennacl-1.0.3.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyviennacl-1.0.3.tar.gz
Algorithm Hash digest
SHA256 cc56a018a047c1a4e05fb03a8df5251ab5d87c1cb0bbf5daf86283879cb55743
MD5 3a1b12b38e71f244052e496b0b7f031a
BLAKE2b-256 770e26c906ab08cc44e3519b9d761463c1cbc9c677f036712ca7c763993d91c6

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3.win-amd64-py3.4.exe.

File metadata

File hashes

Hashes for pyviennacl-1.0.3.win-amd64-py3.4.exe
Algorithm Hash digest
SHA256 45cd5a1b5f751dcc74b2e38ce741599fe1a482a46476f76e2189e3943f90f19f
MD5 2824391de7a58809d081f56838dc817a
BLAKE2b-256 60f1c4e6c53aceb05f39156a104b04086090438f291863d8f2c161e955f5db95

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3.win-amd64-py3.3.exe.

File metadata

File hashes

Hashes for pyviennacl-1.0.3.win-amd64-py3.3.exe
Algorithm Hash digest
SHA256 b4f78bdf7374a5f953dfacbf196cc55c9836fb246f2d400a0820fdd791971dc0
MD5 857636f0d6af3164fd925030831064d3
BLAKE2b-256 d4874bb6dec31751265d8ec0fa1a6a0633f5d85b7c6c3c752ed96a6c23bfdef9

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3.win-amd64-py3.2.exe.

File metadata

File hashes

Hashes for pyviennacl-1.0.3.win-amd64-py3.2.exe
Algorithm Hash digest
SHA256 8a74573e56a4f3646fb2b70e8ed0db85c9f3bf6087a129f1037399d19ae2b797
MD5 575129afbec9d8673841e3044440d293
BLAKE2b-256 d84a668171d8ecdee1edc33ce5ba5b83f200b9dc76a2939e9191ac44df09c151

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3.win-amd64-py2.7.exe.

File metadata

File hashes

Hashes for pyviennacl-1.0.3.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 0c846cde2c53cafd2863e077da75a2e9265e8a28edc13ed14460d143c5d9d0ac
MD5 9fe455df4239edac21c899f195795afc
BLAKE2b-256 155d6bd2e42e508633b186e2f5bc857400157322a492a92b7a8485ebd51fe918

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3.win32-py3.4.exe.

File metadata

File hashes

Hashes for pyviennacl-1.0.3.win32-py3.4.exe
Algorithm Hash digest
SHA256 4f733f31f937587b477b2f9841652862657d6b8c29d7b06d67520188b562e3f8
MD5 498c95f95aef9507dde5d371c57f5468
BLAKE2b-256 7f7eb24ab3a46a7a4b2caeadb899a1875c1be3d76399f00abd423802dee5f7e6

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3.win32-py3.3.exe.

File metadata

File hashes

Hashes for pyviennacl-1.0.3.win32-py3.3.exe
Algorithm Hash digest
SHA256 d9c73e12448669ee13cbd5e9afa793decea8fb7fa75e942f24def4185b4f79c6
MD5 968fe0235dc54829f6fb449f115df89e
BLAKE2b-256 786061730c138121317f3b8fdc098329900dc7928331bc0ace27e4e0d7aa8229

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3.win32-py3.2.exe.

File metadata

File hashes

Hashes for pyviennacl-1.0.3.win32-py3.2.exe
Algorithm Hash digest
SHA256 112a54827d59ce00c9b40bffb595efc18920152ca30b629d5b3ebbefc63f6534
MD5 5a6f4cff0c13ab7fc0a1a5d977269041
BLAKE2b-256 c9aaa19875c621f8390013e222c9ddde6799fd87cbbb3731bfc6abc69b059f50

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3.win32-py2.7.exe.

File metadata

File hashes

Hashes for pyviennacl-1.0.3.win32-py2.7.exe
Algorithm Hash digest
SHA256 ef28630baf8dec3eaa9e6ab65b3db904a5e8f43634b0f2b4d22eee0d842a9ad0
MD5 923ea6131586fe5bd30a918177b0aec3
BLAKE2b-256 431d384768cf6ea020c7555d19f96b97025b4f1351d098dbf764c38febc68792

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3-cp34-none-win_amd64.whl.

File metadata

File hashes

Hashes for pyviennacl-1.0.3-cp34-none-win_amd64.whl
Algorithm Hash digest
SHA256 b2e011e644e9cf57384551e71462b108b2c11f7651e34c261e28f60fd2026379
MD5 c419474a29be055b77c194f35e80972c
BLAKE2b-256 d5cc8950e34dc1966cdd87887dbc2630df5bea1b84e68e273b27e13b5868169b

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3-cp34-none-win32.whl.

File metadata

File hashes

Hashes for pyviennacl-1.0.3-cp34-none-win32.whl
Algorithm Hash digest
SHA256 a7e8e152dd2157fa5cf1bf7e15004bb624b5aab96a4c46003cd847dd7a1da907
MD5 95469cd1e1eb5c975ea7c160699447dc
BLAKE2b-256 bb4a5faf09eb6cf6d16fa093da660bab64af050c35c022df18d15adb126e5db7

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyviennacl-1.0.3-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a5bba253332545e56ed8fddba425e7e20ddfd8b63495de24d56c2da8af5a23b2
MD5 254dcdde7b5cae04d967f490efbf2624
BLAKE2b-256 a983105c38b70d0329aa1668020a09b4c7c15fcc53687c4fd9f518cff48d83a9

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3-cp33-none-win_amd64.whl.

File metadata

File hashes

Hashes for pyviennacl-1.0.3-cp33-none-win_amd64.whl
Algorithm Hash digest
SHA256 06775dc1176750f9dba4e8ac69a42fe40733dd1e659cf0d9adfd8c9f2b8649b1
MD5 8f4d6493885ac1d3a2aac8cdcccb8333
BLAKE2b-256 9732d0621d092e956d5893e2b1e8c1522b9227f64659889033cd15dcfc5d59ce

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3-cp33-none-win32.whl.

File metadata

File hashes

Hashes for pyviennacl-1.0.3-cp33-none-win32.whl
Algorithm Hash digest
SHA256 31a0572a0e0736805be7f6bdbf76483d298c997f3111ceb5552a0cfbb9cae8e6
MD5 a15d4b52dbd64402dbbdf33bf076db30
BLAKE2b-256 900ebbef464e8b891dacea1a517681d1c4b648accf64b844751756ef3cba5d84

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyviennacl-1.0.3-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3f67f3f5bb235817edcf7e0b97b11231422d6bde3a007e79bd50df40bf40c9b4
MD5 819b4dc7b4b94b4b670096f7548b8d79
BLAKE2b-256 3a5ec820e988e064f6c67d917b765594bdc340424bfac42f69e9e9d84d1464b2

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3-cp32-none-win_amd64.whl.

File metadata

File hashes

Hashes for pyviennacl-1.0.3-cp32-none-win_amd64.whl
Algorithm Hash digest
SHA256 ce3effd4004783550530c2b7fa3912d6a90656f4ee77916ca4e1ba26173f8fc1
MD5 e9498aee90713abfb6cd59a5321c838a
BLAKE2b-256 afef470a66ef5cc91fe7614edb751edcd784ffd75df86475d9f7afa045ef06d3

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3-cp32-none-win32.whl.

File metadata

File hashes

Hashes for pyviennacl-1.0.3-cp32-none-win32.whl
Algorithm Hash digest
SHA256 aca670c198911b51eb95f46cd6838d665a30e868f0519d968622494ca4d99409
MD5 c89be068583c697910300d57c8a94234
BLAKE2b-256 4bdb907ab5c190bccd90efdeafb16fefcd8a008d7d2919abb38a9d3c984010a9

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3-cp27-none-win_amd64.whl.

File metadata

File hashes

Hashes for pyviennacl-1.0.3-cp27-none-win_amd64.whl
Algorithm Hash digest
SHA256 039048e86b2aefe38f58b43b72fdc39d61e2de8c419f2310ba4304873a78037e
MD5 23b978017b7a73e04f034476c237655e
BLAKE2b-256 c3682ed04ad7253e083d6aa2ded1585c29adde766ac6026cfbe69104b4308e8b

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3-cp27-none-win32.whl.

File metadata

File hashes

Hashes for pyviennacl-1.0.3-cp27-none-win32.whl
Algorithm Hash digest
SHA256 66d412e3b69d02f8d8c85414d4d1f582f0a8d6425aa5fe8433ae8cff870ee072
MD5 f5efd4844eb3612abb880be76a1e58ec
BLAKE2b-256 238b63f0926f2f155116a5ee0454e823137917e0d2ce050e359bbf4204ae0bb2

See more details on using hashes here.

File details

Details for the file pyviennacl-1.0.3-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyviennacl-1.0.3-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 982e1ecbc9a6a0302fc9f0d162f72f1e8b2908abff1fed67e10c61cbba05e0e0
MD5 d3b464c45a7c2ef1e0c38bc31245f882
BLAKE2b-256 75eed8ff029492d43a5c2f2c54d9adb867809ca151498813cefd62d82b3c34eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page