lightning-habana


Namelightning-habana JSON
Version 1.5.0 PyPI version JSON
download
home_pagehttps://github.com/Lightning-AI/lightning-habana
SummaryLightning support for Intel Habana accelerators
upload_time2024-05-03 08:20:25
maintainerNone
docs_urlNone
authorLightning-AI et al.
requires_python>=3.8
licenseApache-2.0
keywords deep learning pytorch ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Lightning ⚡ Intel Habana

[![lightning](https://img.shields.io/badge/-Lightning_2.0+-792ee5?logo=pytorchlightning&logoColor=white)](https://lightning.ai/)
[![PyPI Status](https://badge.fury.io/py/lightning-habana.svg)](https://badge.fury.io/py/lightning-habana)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/lightning-habana)](https://pypi.org/project/lightning-habana/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/lightning-Habana)](https://pepy.tech/project/lightning-habana)
[![Deploy Docs](https://github.com/Lightning-AI/lightning-Habana/actions/workflows/docs-deploy.yml/badge.svg)](https://lightning-ai.github.io/lightning-Habana/)

[![General checks](https://github.com/Lightning-AI/lightning-habana/actions/workflows/ci-checks.yml/badge.svg?event=push)](https://github.com/Lightning-AI/lightning-habana/actions/workflows/ci-checks.yml)
[![Build Status](https://dev.azure.com/Lightning-AI/compatibility/_apis/build/status/Lightning-AI.lightning-Habana?branchName=main)](https://dev.azure.com/Lightning-AI/compatibility/_build/latest?definitionId=45&branchName=main)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Lightning-AI/lightning-Habana/main.svg)](https://results.pre-commit.ci/latest/github/Lightning-AI/lightning-Habana/main)

[Habana® Gaudi® AI Processor (HPU)](https://habana.ai/) training processors are built on a heterogeneous architecture with a cluster of fully programmable Tensor Processing Cores (TPC) along with its associated development tools and libraries, and a configurable Matrix Math engine.

The TPC core is a VLIW SIMD processor with an instruction set and hardware tailored to serve training workloads efficiently.
The Gaudi memory architecture includes on-die SRAM and local memories in each TPC and,
Gaudi is the first DL training processor that has integrated RDMA over Converged Ethernet (RoCE v2) engines on-chip.

On the software side, the PyTorch Habana bridge interfaces between the framework and SynapseAI software stack to enable the execution of deep learning models on the Habana Gaudi device.

Gaudi provides a significant cost-effective benefit, allowing you to engage in more deep learning training while minimizing expenses.

For more information, check out [Gaudi Architecture](https://docs.habana.ai/en/latest/Gaudi_Overview/Gaudi_Overview.html) and [Gaudi Developer Docs](https://developer.habana.ai).

______________________________________________________________________

## Installing Lighting Habana

To install Lightning Habana, run the following command:

```bash
pip install -U lightning lightning-habana
```

______________________________________________________________________

**NOTE**

Ensure either of lightning or pytorch-lightning is used when working with the plugin.
Mixing strategies, plugins etc from both packages is not yet validated.

______________________________________________________________________

## Using PyTorch Lighting with HPU

To enable PyTorch Lightning with HPU accelerator, provide `accelerator=HPUAccelerator()` parameter to the Trainer class.

```python
from lightning import Trainer
from lightning_habana.pytorch.accelerator import HPUAccelerator

# Run on one HPU.
trainer = Trainer(accelerator=HPUAccelerator(), devices=1)
# Run on multiple HPUs.
trainer = Trainer(accelerator=HPUAccelerator(), devices=8)
# Choose the number of devices automatically.
trainer = Trainer(accelerator=HPUAccelerator(), devices="auto")
```

The `devices=1` parameter with HPUs enables the Habana accelerator for single card training using `SingleHPUStrategy`.

The `devices>1` parameter with HPUs enables the Habana accelerator for distributed training. It uses `HPUDDPStrategy` which is based on DDP strategy with the integration of Habana’s collective communication library (HCCL) to support scale-up within a node and scale-out across multiple nodes.

# Support Matrix

| **SynapseAI**         | **1.15.1**                                          |
| --------------------- | --------------------------------------------------- |
| PyTorch               | 2.2.0                                               |
| (PyTorch) Lightning\* | 2.2.x                                               |
| **Lightning Habana**  | **1.5.0**                                           |
| DeepSpeed\*\*         | Forked from v0.12.4 of the official DeepSpeed repo. |

\* covers both packages [`lightning`](https://pypi.org/project/lightning/) and [`pytorch-lightning`](https://pypi.org/project/pytorch-lightning/)

For more information, check out [HPU Support Matrix](https://docs.habana.ai/en/latest/Support_Matrix/Support_Matrix.html)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Lightning-AI/lightning-habana",
    "name": "lightning-habana",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "deep learning, pytorch, AI",
    "author": "Lightning-AI et al.",
    "author_email": "name@lightning.ai",
    "download_url": "https://files.pythonhosted.org/packages/2f/c7/9ef3a8940c76e684db9a81e984eb9e56facf4b7f5d03d5ba39198070da3c/lightning_habana-1.5.0.tar.gz",
    "platform": null,
    "description": "# Lightning \u26a1 Intel Habana\n\n[![lightning](https://img.shields.io/badge/-Lightning_2.0+-792ee5?logo=pytorchlightning&logoColor=white)](https://lightning.ai/)\n[![PyPI Status](https://badge.fury.io/py/lightning-habana.svg)](https://badge.fury.io/py/lightning-habana)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/lightning-habana)](https://pypi.org/project/lightning-habana/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/lightning-Habana)](https://pepy.tech/project/lightning-habana)\n[![Deploy Docs](https://github.com/Lightning-AI/lightning-Habana/actions/workflows/docs-deploy.yml/badge.svg)](https://lightning-ai.github.io/lightning-Habana/)\n\n[![General checks](https://github.com/Lightning-AI/lightning-habana/actions/workflows/ci-checks.yml/badge.svg?event=push)](https://github.com/Lightning-AI/lightning-habana/actions/workflows/ci-checks.yml)\n[![Build Status](https://dev.azure.com/Lightning-AI/compatibility/_apis/build/status/Lightning-AI.lightning-Habana?branchName=main)](https://dev.azure.com/Lightning-AI/compatibility/_build/latest?definitionId=45&branchName=main)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Lightning-AI/lightning-Habana/main.svg)](https://results.pre-commit.ci/latest/github/Lightning-AI/lightning-Habana/main)\n\n[Habana\u00ae Gaudi\u00ae AI Processor (HPU)](https://habana.ai/) training processors are built on a heterogeneous architecture with a cluster of fully programmable Tensor Processing Cores (TPC) along with its associated development tools and libraries, and a configurable Matrix Math engine.\n\nThe TPC core is a VLIW SIMD processor with an instruction set and hardware tailored to serve training workloads efficiently.\nThe Gaudi memory architecture includes on-die SRAM and local memories in each TPC and,\nGaudi is the first DL training processor that has integrated RDMA over Converged Ethernet (RoCE v2) engines on-chip.\n\nOn the software side, the PyTorch Habana bridge interfaces between the framework and SynapseAI software stack to enable the execution of deep learning models on the Habana Gaudi device.\n\nGaudi provides a significant cost-effective benefit, allowing you to engage in more deep learning training while minimizing expenses.\n\nFor more information, check out [Gaudi Architecture](https://docs.habana.ai/en/latest/Gaudi_Overview/Gaudi_Overview.html) and [Gaudi Developer Docs](https://developer.habana.ai).\n\n______________________________________________________________________\n\n## Installing Lighting Habana\n\nTo install Lightning Habana, run the following command:\n\n```bash\npip install -U lightning lightning-habana\n```\n\n______________________________________________________________________\n\n**NOTE**\n\nEnsure either of lightning or pytorch-lightning is used when working with the plugin.\nMixing strategies, plugins etc from both packages is not yet validated.\n\n______________________________________________________________________\n\n## Using PyTorch Lighting with HPU\n\nTo enable PyTorch Lightning with HPU accelerator, provide `accelerator=HPUAccelerator()` parameter to the Trainer class.\n\n```python\nfrom lightning import Trainer\nfrom lightning_habana.pytorch.accelerator import HPUAccelerator\n\n# Run on one HPU.\ntrainer = Trainer(accelerator=HPUAccelerator(), devices=1)\n# Run on multiple HPUs.\ntrainer = Trainer(accelerator=HPUAccelerator(), devices=8)\n# Choose the number of devices automatically.\ntrainer = Trainer(accelerator=HPUAccelerator(), devices=\"auto\")\n```\n\nThe `devices=1` parameter with HPUs enables the Habana accelerator for single card training using `SingleHPUStrategy`.\n\nThe `devices>1` parameter with HPUs enables the Habana accelerator for distributed training. It uses `HPUDDPStrategy` which is based on DDP strategy with the integration of Habana\u2019s collective communication library (HCCL) to support scale-up within a node and scale-out across multiple nodes.\n\n# Support Matrix\n\n| **SynapseAI**         | **1.15.1**                                          |\n| --------------------- | --------------------------------------------------- |\n| PyTorch               | 2.2.0                                               |\n| (PyTorch) Lightning\\* | 2.2.x                                               |\n| **Lightning Habana**  | **1.5.0**                                           |\n| DeepSpeed\\*\\*         | Forked from v0.12.4 of the official DeepSpeed repo. |\n\n\\* covers both packages [`lightning`](https://pypi.org/project/lightning/) and [`pytorch-lightning`](https://pypi.org/project/pytorch-lightning/)\n\nFor more information, check out [HPU Support Matrix](https://docs.habana.ai/en/latest/Support_Matrix/Support_Matrix.html)\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Lightning support for Intel Habana accelerators",
    "version": "1.5.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/Lightning-AI/lightning-habana/issues",
        "Documentation": "https://lightning-habana.rtfd.io/en/latest/",
        "Download": "https://github.com/Lightning-AI/lightning-habana",
        "Homepage": "https://github.com/Lightning-AI/lightning-habana",
        "Source Code": "https://github.com/Lightning-AI/lightning-habana"
    },
    "split_keywords": [
        "deep learning",
        " pytorch",
        " ai"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cf41cf189d83546a6eea109aa8d8c743445a9230f6586c4dfb925f12d3420cbd",
                "md5": "dbdd44c0bf82a1781365ea9dd5ebf4aa",
                "sha256": "7e1e16077e4a49ad69e5ddc1e6e082ded3fc83ca7d462c92ec08cbb8fce96456"
            },
            "downloads": -1,
            "filename": "lightning_habana-1.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dbdd44c0bf82a1781365ea9dd5ebf4aa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 75838,
            "upload_time": "2024-05-03T08:20:23",
            "upload_time_iso_8601": "2024-05-03T08:20:23.317558Z",
            "url": "https://files.pythonhosted.org/packages/cf/41/cf189d83546a6eea109aa8d8c743445a9230f6586c4dfb925f12d3420cbd/lightning_habana-1.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2fc79ef3a8940c76e684db9a81e984eb9e56facf4b7f5d03d5ba39198070da3c",
                "md5": "85e638cd513b33175ca62440a45eb1c9",
                "sha256": "aba19b948a87f0246e4b52457904e3851e620edf2c9318bc291230cd6540eab6"
            },
            "downloads": -1,
            "filename": "lightning_habana-1.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "85e638cd513b33175ca62440a45eb1c9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 52512,
            "upload_time": "2024-05-03T08:20:25",
            "upload_time_iso_8601": "2024-05-03T08:20:25.116113Z",
            "url": "https://files.pythonhosted.org/packages/2f/c7/9ef3a8940c76e684db9a81e984eb9e56facf4b7f5d03d5ba39198070da3c/lightning_habana-1.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-03 08:20:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Lightning-AI",
    "github_project": "lightning-habana",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "lightning-habana"
}
        
Elapsed time: 0.25808s