Skip to main content

Python3 wrapper for the HLML library.

Project description

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 ).

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

habana_pyhlml-1.24.0.1007-py3-none-any.whl (75.5 kB view details)

Uploaded Python 3

File details

Details for the file habana_pyhlml-1.24.0.1007-py3-none-any.whl.

File metadata

File hashes

Hashes for habana_pyhlml-1.24.0.1007-py3-none-any.whl
Algorithm Hash digest
SHA256 49faca73877276d880587545150dc67d1c175eb7201fbe8aa55e2d2cfe2e7d3d
MD5 96edd861b2aa9a4418a0d596c07422c1
BLAKE2b-256 362aed3bcec0c6dbb00a2c6ed7c5d33b54cff438d3d14e50e4bccc8eb20476ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page