{ "info": { "author": "Justin Holewinski", "author_email": "jholewinski@nvidia.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Software Development :: Compilers", "Topic :: Software Development :: Libraries" ], "description": "pynvvm - Python Bindings to libNVVM\n\n\nIntroduction\n============\n\nThe pynvvm package is a Python binding for the libNVVM compiler library from\nNVIDIA. This library takes LLVM (NVVM) IR input and produces NVIDIA PTX\noutput suitable for execution on NVIDIA GPUs on any platform. Please see the\nCUDA 5.5 documentation for a complete description of libNVVM.\n\n\nInstallation\n============\n\nThe pynvvm package does not have any external dependencies and can be\ninstalled with ``pip`` or ``easy_install``.\n\n $ pip install pynvvm\n\nNote, however, that the package does require the libNVVM binary to be present\nat runtime. See below for instructions on how to set the search path.\n\n\nUsing pynvvm\n============\n\nThere are two primary interfaces with pynvvm; a low-level interface which\nprovides users with direct access to the libNVVM API, and a high-level\ninterface which provides a Pythonic API for the compiler routines in libNVVM.\n\n\nLow-Level Interface\n-------------------\n\nThe low-level interface can be found in the ``pynvvm.interface`` module. An\ninstance of the interface can be obtained by calling the ``NVVMInterface``\nconstructor:\n\n from pynvvm.interface import NVVMInterface\n\n inter = NVVMInterface()\n\nBy default, the ``NVVMInterface`` object will attempt to load the libNVVM\nshared library from ``LD_LIBRARY_PATH`` on Linux, ``DYLD_LIBRARY_PATH`` on\nMac, or ``PATH`` on Windows. An optional parameter to the ``NVVMInterface``\nconstructor provides the absolute path to the libNVVM shared library and\noverwrites the system search path. For example, on Linux:\n\n from pynvvm.interface import NVVMInterface\n\n inter = NVVMInterface('/usr/local/cuda-5.5/nvvm/lib64/libnvvm.so')\n\n**NOTE**: It is important that the specified binary match the architecture of\nthe Python interpreter under which your program is running.\n\nOnce an interface object is created, it provides access to all of the libNVVM\nAPI functions as regular Python functions. However, instead of returning a\nlibNVVM status code, each function returns either a string (for output\nfunctions) or None. If an error occurs within libNVVM, an ``NVVMException``\nexception is raised with the corresponding status code.\n\nNote that the ``nvvmGetProgramLogSize`` and ``nvvmGetCompiledResultSize``\nfunctions are *not* exposed. Instead, the ``nvvmGetProgramLog`` and\n``nvvmGetCompiledResult`` functions automatically determine the correct size\nand return a UTF-8 encoded Python string.\n\nFull Example:\n\n from pynvvm.interface import NVVMInterface, NVVMException\n\n module = ... ## Populate NVVM IR or bitcode\n\n inter = NVVMInterface()\n prog = inter.nvvmCreateProgram()\n try:\n inter.nvvmAddModuleToProgram(prog, module, 'mymodule')\n inter.nvvmCompileProgram(prog, ['-ftz=1'])\n ptx = inter.nvvmGetCompiledResult(prog)\n except NVVMException as e:\n print('Error: %s' % repr(e))\n\n\n\nHigh-Level Interface\n--------------------\n\nFor clients wanting a higher-level interface to libNVVM, the ``Program`` class\nin ``pynvvm.compiler`` provides such an interface. The usage is similar to\nthat of the ``NVVMInterface`` class, but the API is more Pythonic and you do\nnot need to worry about maintaining NVVM objects.\n\n\n from pynvvm.compiler import Program, ProgramException\n\n module = ... ## Populate NVVM IR or bitcode\n\n try:\n prog = Program()\n prog.add_module(module, 'mymodule')\n ptx = prog.compile(['-ftz=1'])\n except ProgramException as e:\n print('Error: %s' % repr(e))\n\nAs with ``NVVMInterface``, the ``Program`` constructor accepts an optional\npath to the libNVVM binary.\n\nPlease see ``samples/ptxgen.py`` for a complete example of an NVVM IR -> PTX\ncompiler using the higher-level interface.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nvidia-compiler-sdk/pynvvm/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pynvvm", "package_url": "https://pypi.org/project/pynvvm/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pynvvm/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/nvidia-compiler-sdk/pynvvm/" }, "release_url": "https://pypi.org/project/pynvvm/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "Python bindings to libNVVM.", "version": "1.0.2" }, "last_serial": 1050130, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "bd39c61c69666ff84bc19c0770bf785f", "sha256": "5a542be8d91c7195dcf4df7bc1d4b4dc9e0467545325943d9d2e0d876f3e1008" }, "downloads": -1, "filename": "pynvvm-1.0.tar.gz", "has_sig": false, "md5_digest": "bd39c61c69666ff84bc19c0770bf785f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5602, "upload_time": "2013-11-18T13:18:35", "url": "https://files.pythonhosted.org/packages/5e/f1/c0f5b00f942474ca119ffc263335ee0ada3dd741220c8c3cd1cc8e268c4e/pynvvm-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "08ff206c4d499b2f3bdfc06c408fa8f9", "sha256": "ef128ca010506cb2e54a8aad678114a262a85996eb40b456d3f4745a75bd47fd" }, "downloads": -1, "filename": "pynvvm-1.0.1.tar.gz", "has_sig": false, "md5_digest": "08ff206c4d499b2f3bdfc06c408fa8f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5599, "upload_time": "2013-11-18T15:12:42", "url": "https://files.pythonhosted.org/packages/76/d3/d5c29eefb1d28116bb6f42b16201815118431b5ec694f9f38c552a0227cb/pynvvm-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "58f0ef4eddef268942031225913440a6", "sha256": "cebda64d393c681a27f6ef7579b2412cc23fc62f7236a4b1366e5fd5dc4d5a5a" }, "downloads": -1, "filename": "pynvvm-1.0.2.tar.gz", "has_sig": false, "md5_digest": "58f0ef4eddef268942031225913440a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5618, "upload_time": "2014-04-03T12:15:46", "url": "https://files.pythonhosted.org/packages/fc/23/84b37b36adb62639e4e0f1e6bf163ab3e1f3a072e74763ae62f9b62d9aaa/pynvvm-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "58f0ef4eddef268942031225913440a6", "sha256": "cebda64d393c681a27f6ef7579b2412cc23fc62f7236a4b1366e5fd5dc4d5a5a" }, "downloads": -1, "filename": "pynvvm-1.0.2.tar.gz", "has_sig": false, "md5_digest": "58f0ef4eddef268942031225913440a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5618, "upload_time": "2014-04-03T12:15:46", "url": "https://files.pythonhosted.org/packages/fc/23/84b37b36adb62639e4e0f1e6bf163ab3e1f3a072e74763ae62f9b62d9aaa/pynvvm-1.0.2.tar.gz" } ] }