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
Release history Release notifications | RSS feed
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
File details
Details for the file habana_pyhlml-1.18.0.524-py3-none-any.whl
.
File metadata
- Download URL: habana_pyhlml-1.18.0.524-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 132b199bb223af859c193406a9dd284b0838a011fc215ca78c62372d88449c76 |
|
MD5 | 8508e14f2bc29be75561fb54cc87841b |
|
BLAKE2b-256 | 0b3fcc824a08bd59fcba40d4b3a2be8e41ba10fa060331add6d4e3d4760ab75f |