Skip to main content

Lightning ⚡ Intel Habana

lightning PyPI Status PyPI - Python Version PyPI - Downloads Deploy Docs

General checks Build Status pre-commit.ci status

Habana® Gaudi® AI Processor (HPU) 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 and Gaudi Developer Docs.


Installing Lighting Habana

To install Lightning Habana, run the following command:

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.

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 and pytorch-lightning

For more information, check out HPU Support Matrix

Download files

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

Source Distribution

lightning_habana-1.5.0.tar.gz (52.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lightning_habana-1.5.0-py3-none-any.whl (75.8 kB view details)

Uploaded Python 3

File details

Details for the file lightning_habana-1.5.0.tar.gz.

File metadata

  • Download URL: lightning_habana-1.5.0.tar.gz
  • Upload date:
  • Size: 52.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for lightning_habana-1.5.0.tar.gz
Algorithm Hash digest
SHA256 aba19b948a87f0246e4b52457904e3851e620edf2c9318bc291230cd6540eab6
MD5 85e638cd513b33175ca62440a45eb1c9
BLAKE2b-256 2fc79ef3a8940c76e684db9a81e984eb9e56facf4b7f5d03d5ba39198070da3c

See more details on using hashes here.

File details

Details for the file lightning_habana-1.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lightning_habana-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e1e16077e4a49ad69e5ddc1e6e082ded3fc83ca7d462c92ec08cbb8fce96456
MD5 dbdd44c0bf82a1781365ea9dd5ebf4aa
BLAKE2b-256 cf41cf189d83546a6eea109aa8d8c743445a9230f6586c4dfb925f12d3420cbd

See more details on using hashes here.

Release history Release notifications | RSS feed

1.6.0

2 files

This release

1.5.0 This release

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page