{ "info": { "author": "Prabhu Ramachandran", "author_email": "prabhu@aero.iitb.ac.in", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Code Generators", "Topic :: Software Development :: Compilers", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "ComPyle: execute a subset of Python on HPC platforms\n======================================================\n\n|Travis Status| |Appveyor Status| |Documentation Status|\n\n\n.. |Travis Status| image:: https://travis-ci.org/pypr/compyle.svg?branch=master\n :target: https://travis-ci.org/pypr/compyle\n.. |Appveyor Status| image:: https://ci.appveyor.com/api/projects/status/isg727d5ofn69rrm?svg=true\n :target: https://ci.appveyor.com/project/prabhuramachandran/compyle\n.. |Documentation Status| image:: https://readthedocs.org/projects/compyle/badge/?version=latest\n :target: https://compyle.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\nComPyle allows users to execute a restricted subset of Python (almost similar\nto C) on a variety of HPC platforms. Currently we support multi-core execution\nusing Cython, and OpenCL and CUDA for GPU devices.\n\nUsers start with code implemented in a very restricted Python syntax, this code\nis then automatically transpiled, compiled and executed to run on either one CPU\ncore, or multiple CPU cores (via OpenMP_) or on a GPU. CPy offers\nsource-to-source transpilation, making it a very convenient tool for writing HPC\nlibraries.\n\nSome simple yet powerful parallel utilities are provided which can allow you to\nsolve a remarkably large number of interesting HPC problems.\n\nComPyle also features JIT transpilation if you wish making it easy to use.\n\nDocumentation is available at: https://compyle.readthedocs.io\n\nWhile ComPyle seems simple it is not a toy and is used heavily by the PySPH_\nproject where ComPyle has its origins.\n\n.. _PySPH: https://github.com/pypr/pysph\n\n\nInstallation\n-------------\n\nComPyle is itself pure Python but depends on numpy_ and requires either Cython_\nor PyOpenCL_ or PyCUDA_ along with the respective backends of a C/C++ compiler,\nOpenCL and CUDA. If you are only going to execute code on a CPU then all you\nneed is Cython.\n\nYou should be able to install ComPyle by doing::\n\n $ pip install compyle\n\n\n.. _PyOpenCL: https://documen.tician.de/pyopencl/\n.. _OpenCL: https://www.khronos.org/opencl/\n.. _Cython: http://www.cython.org\n.. _numpy: http://www.numpy.org\n.. _OpenMP: http://openmp.org/\n.. _PyCUDA: https://documen.tician.de/pycuda/\n\nA simple example\n----------------\n\nHere is a very simple example::\n\n from compyle.api import Elementwise, annotate, wrap, get_config\n import numpy as np\n\n @annotate\n def axpb(i, x, y, a, b):\n y[i] = a*sin(x[i]) + b\n\n x = np.linspace(0, 1, 10000)\n y = np.zeros_like(x)\n a, b = 2.0, 3.0\n\n backend = 'cython'\n get_config().use_openmp = True\n x, y = wrap(x, y, backend=backend)\n e = Elementwise(axpb, backend=backend)\n e(x, y, a, b)\n\nThis will execute the elementwise operation in parallel using OpenMP with\nCython. The code is auto-generated, compiled and called for you transparently.\nThe first time this runs, it will take a bit of time to compile everything but\nthe next time, this is cached and will run much faster.\n\nIf you just change the ``backend = 'opencl'``, the same exact code will be\nexecuted using PyOpenCL_ and if you change the backend to ``'cuda'``, it will\nexecute via CUDA without any other changes to your code. This is obviously a\nvery trivial example, there are more complex examples available as well.\n\n\nExamples\n---------\n\nSome simple examples and benchmarks are available in the `examples\n`_ directory.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pypr/compyle", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "compyle", "package_url": "https://pypi.org/project/compyle/", "platform": "", "project_url": "https://pypi.org/project/compyle/", "project_urls": { "Homepage": "https://github.com/pypr/compyle" }, "release_url": "https://pypi.org/project/compyle/0.5/", "requires_dist": null, "requires_python": "", "summary": "Execute a subset of Python on HPC platforms", "version": "0.5" }, "last_serial": 4553264, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "289c624e657e75975c1d31fafaeabc95", "sha256": "8fa33611c956a3189f054c72a41c5c6e6ba00bc4d1f166798c6849c12c499e57" }, "downloads": -1, "filename": "compyle-0.5.tar.gz", "has_sig": false, "md5_digest": "289c624e657e75975c1d31fafaeabc95", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 86167, "upload_time": "2018-12-02T20:46:45", "url": "https://files.pythonhosted.org/packages/fc/a8/4560a11c0d1a33e02022fb63bb363c943f133c5cf13eb9c2e2ea5903a06b/compyle-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "289c624e657e75975c1d31fafaeabc95", "sha256": "8fa33611c956a3189f054c72a41c5c6e6ba00bc4d1f166798c6849c12c499e57" }, "downloads": -1, "filename": "compyle-0.5.tar.gz", "has_sig": false, "md5_digest": "289c624e657e75975c1d31fafaeabc95", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 86167, "upload_time": "2018-12-02T20:46:45", "url": "https://files.pythonhosted.org/packages/fc/a8/4560a11c0d1a33e02022fb63bb363c943f133c5cf13eb9c2e2ea5903a06b/compyle-0.5.tar.gz" } ] }