Skip to main content

pyhlml

Python3 wrapper for the HLML library

Getting Started

The pyhlml library is an python API wrapper for the Synapse HLML library, documented here: https://docs.habana.ai/en/latest/API_Reference_Guides/HLML_API_Reference.html

Requirements

  • Python3
  • Habana-enabled device ( inc. Drivers/Firmware )
  • Synapse version 1.0.1-81 or later

Install - PIP

$ pip3 install -e git+https://github.com/HabanaAI/pyhlml.git#egg=pyhlml

Basic Usage

import pyhlml

# Initialize the library
pyhlml.hlmlInit()

# Get total number of devices in the system
device_count = pyhlml.hlmlDeviceGetCount()

# For each device print utilization
for i in range(device_count):
    device = pyhlml.hlmlDeviceGetHandleByIndex(i)
    print(f"Device {i} Utilization: {pyhlml.hlmlDeviceGetUtilizationRates(device)}

# Shutdown
pyhlml.hlmlShutdown()

Versions

This wrapper shadows the synapse release versions and uses the scheme

$release-$build

where release is the synapse release and build is the build of this repo ( 0 indexed ).

Metadata

Release files for habana-pyhlml 1.24.2.481

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

Built distribution (wheel)

Table of built distributions (wheels) for habana-pyhlml 1.24.2.481
File Interpreter ABI Platform
habana_pyhlml-1.24.2.481-py3-none-any.whl Python 3 none any Details

Release files / habana_pyhlml-1.24.2.481-py3-none-any.whl

Download URL habana_pyhlml-1.24.2.481-py3-none-any.whl
Size 76.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a0793592c9c1049ffbc6856f7656311382da64006c4e338b2bdec97f7724058
BLAKE2b-256 checksum
How to use checksums
335e8ec48bcf7358d1e6812c449f365bcd7ea25a68c6f2478d29560da0c51238
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20
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