{ "info": { "author": "Sean Lee", "author_email": "seanlee@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": "==================================\npynvrtc - Python Bindings to NVRTC\n================================== \n\nIntroduction\n============\n\nThe pynvrtc package is a Python binding for NVRTC, the CUDA runtime\ncompilation library from NVIDIA. This library takes CUDA source input and\nproduces NVIDIA PTX output suitable for execution on NVIDIA GPUs on any\nplatform. Please see the CUDA 9.2 documentation for a complete description of\nNVRTC.\n\n\nInstallation\n============\n\nThe pynvrtc package does not have any external dependencies and can be\ninstalled with ``pip`` or ``easy_install``.\n\n::\n\n $ pip install pynvrtc\n\nNote, however, that the package does require the NVRTC library to be present\nat runtime. See below for instructions on how to set the search path.\n\n\nUsing pynvrtc\n=============\n\nThere are two primary interfaces with pynvrtc; a low-level interface which\nprovides users with direct access to the NVRTC API, and a high-level\ninterface which provides a Pythonic API for the compiler routines in NVRTC.\n\n\nLow-Level Interface\n-------------------\n\nThe low-level interface can be found in the ``pynvrtc.interface`` module. An\ninstance of the interface can be obtained by calling the ``NVRTCInterface``\nconstructor:\n\n::\n\n from pynvrtc.interface import NVRTCInterface\n\n inter = NVRTCInterface()\n\nBy default, the ``NVRTCInterface`` object will attempt to load the NVRTC\nshared library from ``LD_LIBRARY_PATH`` on Linux, ``DYLD_LIBRARY_PATH`` on\nMac, or ``PATH`` on Windows. An optional parameter to the ``NVRTCInterface``\nconstructor provides the absolute path to the NVRTC shared library and\noverwrites the system search path. For example, on Linux:\n\n::\n\n from pynvrtc.interface import NVRTCInterface\n\n inter = NVRTCInterface('/usr/local/cuda-9.2/lib64/libnvrtc.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 NVRTC\nAPI functions as regular Python functions. However, instead of returning a\nNVRTC status code, each function returns either a string (for output\nfunctions) or None. If an error occurs within NVRTC, an ``NVRTCException``\nexception is raised with the corresponding status code.\n\nNote that the ``nvrtcGetProgramLogSize`` and ``nvrtcGetPTXSize``\nfunctions are *not* exposed. Instead, the ``nvrtcGetProgramLog`` and\n``nvrtcGetPTX`` functions automatically determine the correct size\nand return a UTF-8 encoded Python string.\n\nFull Example:\n\n::\n\n from pynvrtc.interface import NVRTCInterface, NVRTCException\n\n src = ... ## Populate CUDA source code\n\n inter = NVRTCInterface()\n\n try:\n prog = inter.nvrtcCreateProgram(src, 'simple.cu', [], []);\n inter.nvrtcCompileProgram(prog, ['-ftz=true'])\n ptx = inter.nvrtcGetPTX(prog)\n except NVRTCException as e:\n print('Error: %s' % repr(e))\n\n\n\nHigh-Level Interface\n--------------------\n\nFor clients wanting a higher-level interface to NVRTC, the ``Program`` class\nin ``pynvrtc.compiler`` provides such an interface. The usage is similar to\nthat of the ``NVRTCInterface`` class, but the API is more Pythonic and you do\nnot need to worry about maintaining NVRTC objects.\n\n::\n\n from pynvrtc.compiler import Program, ProgramException\n\n src = ... ## Populate CUDA source code\n\n try:\n prog = Program(src, 'simple.cu')\n ptx = prog.compile(['-ftz=1'])\n except ProgramException as e:\n print('Error: %s' % repr(e))\n\nAs with ``NVRTCInterface``, the ``Program`` constructor accepts an optional\npath to the NVRTC library.\n\nPlease see ``samples/ptxgen.py`` for a complete example of a CUDA source to\nPTX compiler using the higher-level interface.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/NVIDIA/pynvrtc", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pynvrtc", "package_url": "https://pypi.org/project/pynvrtc/", "platform": "", "project_url": "https://pypi.org/project/pynvrtc/", "project_urls": { "Homepage": "https://github.com/NVIDIA/pynvrtc" }, "release_url": "https://pypi.org/project/pynvrtc/9.2/", "requires_dist": null, "requires_python": "", "summary": "Python bindings to NVRTC", "version": "9.2" }, "last_serial": 4037215, "releases": { "7.0": [ { "comment_text": "", "digests": { "md5": "399cfb38d1a64caba0a2a9832eac196d", "sha256": "60f72d8d2b5b5dc0583990844c806075b54bffcdd6418457dd25a3ff0ab2e445" }, "downloads": -1, "filename": "pynvrtc-7.0.tar.gz", "has_sig": false, "md5_digest": "399cfb38d1a64caba0a2a9832eac196d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5467, "upload_time": "2015-05-13T21:26:39", "url": "https://files.pythonhosted.org/packages/a9/35/6ff9cb3ec7bfdf2ae62afa532eccb50d6bc002a55e68b0c849973bf71b69/pynvrtc-7.0.tar.gz" } ], "7.5": [ { "comment_text": "", "digests": { "md5": "3a9c4eaf3350bf78483a0c628866fb6f", "sha256": "6c5a18f53b12d13e69bb98d6d71c17f489ffa0ef9125a09112a508263668206a" }, "downloads": -1, "filename": "pynvrtc-7.5.tar.gz", "has_sig": false, "md5_digest": "3a9c4eaf3350bf78483a0c628866fb6f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5475, "upload_time": "2015-09-14T19:01:45", "url": "https://files.pythonhosted.org/packages/a5/d2/89404d8e7adadcfe74e0ccd8e0c4bf0f865177e8e0064bb0c2a5988cec06/pynvrtc-7.5.tar.gz" } ], "8.0": [ { "comment_text": "", "digests": { "md5": "345f27addbc22cc14861885a7c3a7c6c", "sha256": "dfebce4b83c0981b67af8304dfb8a3644780ef7903e658bdc21a5e0732a056a0" }, "downloads": -1, "filename": "pynvrtc-8.0.tar.gz", "has_sig": false, "md5_digest": "345f27addbc22cc14861885a7c3a7c6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5732, "upload_time": "2016-10-10T23:42:51", "url": "https://files.pythonhosted.org/packages/14/c1/a529942258593a62fdbd7d3b6fceeb57dffd932570ed0a11364a942e969a/pynvrtc-8.0.tar.gz" } ], "9.0": [ { "comment_text": "", "digests": { "md5": "1e23489d1d04d75a76e1843a70238300", "sha256": "645a656c1e240a1d79ee198635a239c3559bc5dc3d1beafa6af1fbc3218989e0" }, "downloads": -1, "filename": "pynvrtc-9.0.tar.gz", "has_sig": false, "md5_digest": "1e23489d1d04d75a76e1843a70238300", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5822, "upload_time": "2018-07-06T17:41:11", "url": "https://files.pythonhosted.org/packages/56/6e/c47693100e49fb265d9b6bf69d56cceebd3115fbe603e2958c2b8bd9b326/pynvrtc-9.0.tar.gz" } ], "9.1": [ { "comment_text": "", "digests": { "md5": "fa645253d323504ce95f21a171db6c53", "sha256": "17015bc55d34bbbcff8946da77982b77f7e3fde492a5b3e272e3f50ffaa43f47" }, "downloads": -1, "filename": "pynvrtc-9.1.tar.gz", "has_sig": false, "md5_digest": "fa645253d323504ce95f21a171db6c53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5831, "upload_time": "2018-07-06T17:47:54", "url": "https://files.pythonhosted.org/packages/53/3a/84bb384553acdbcd9f49a53bbc69ba066ee983aa86085cf44888d5656dd5/pynvrtc-9.1.tar.gz" } ], "9.2": [ { "comment_text": "", "digests": { "md5": "b087f703e124747e81d44e49a596e7e1", "sha256": "f6dfe7b268ed82f8b8f88a9aa033bd78b8e3c4f717819935c1110c26c8367629" }, "downloads": -1, "filename": "pynvrtc-9.2.tar.gz", "has_sig": false, "md5_digest": "b087f703e124747e81d44e49a596e7e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5829, "upload_time": "2018-07-06T17:56:33", "url": "https://files.pythonhosted.org/packages/2c/ad/79cbfaaa325270607735c9673a87b30daf578eae7946308333aa484dc1ef/pynvrtc-9.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b087f703e124747e81d44e49a596e7e1", "sha256": "f6dfe7b268ed82f8b8f88a9aa033bd78b8e3c4f717819935c1110c26c8367629" }, "downloads": -1, "filename": "pynvrtc-9.2.tar.gz", "has_sig": false, "md5_digest": "b087f703e124747e81d44e49a596e7e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5829, "upload_time": "2018-07-06T17:56:33", "url": "https://files.pythonhosted.org/packages/2c/ad/79cbfaaa325270607735c9673a87b30daf578eae7946308333aa484dc1ef/pynvrtc-9.2.tar.gz" } ] }