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 HPUParallelStrategy 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.11.0
PyTorch 2.0.1
(PyTorch) Lightning* 2.0.x
Lightning Habana 1.1.0
DeepSpeed** Forked from v0.9.4 of the official DeepSpeed repo.

* covers both packages lightning and pytorch-lightning

For more information, check out HPU Support Matrix

Metadata

Release files for lightning-habana 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lightning-habana 1.1.0
File Size Uploaded
lightning-habana-1.1.0.tar.gz 43.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lightning-habana 1.1.0
File Interpreter ABI Platform
lightning_habana-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 101.0 kB

Release files / lightning-habana-1.1.0.tar.gz

Download URL lightning-habana-1.1.0.tar.gz
Size 43.1 kB
Tags Source
SHA-256 checksum
How to use checksums
458e406ddd918f293a4e4c380ac949c783c52d30238376db3254788a01c6de6d
BLAKE2b-256 checksum
How to use checksums
47f85fa75a11ce582f52bcdd551ab8d943379035f62a9e3b7b6f44ec2727de13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / lightning_habana-1.1.0-py3-none-any.whl

Download URL lightning_habana-1.1.0-py3-none-any.whl
Size 57.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
218c681088a0f0c4213a2607fd6a18c84a167d4a2382a216e149a0ea3c48c7f2
BLAKE2b-256 checksum
How to use checksums
445969f1e4a67d56403647f5bdf9c56dc66f4aee5c93197f8242b00808081876
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5
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