accelerator.py Source File

accelerator.py Source File#

SDK qb Runtime Library: accelerator.py Source File
SDK qb Runtime Library v1.0
MCS001-
accelerator.py
Go to the documentation of this file.
1
4
5import qbruntime.qbruntime as _cQbRuntime
6
7
10
11
13 """@brief Represents an accelerator, i.e., an NPU, used for executing models."""
14
15 def __init__(self, dev_no: int = 0):
16 """
17 @brief Creates an Accelerator object for a specific device number.
18
19 The `dev_no` parameter represents the device number. For example, on Linux,
20 if an ARIES NPU is attached as `/dev/aries0`, the device number is `0`.
21
22 @param dev_no The device number to associate with the Accelerator.
23 """
24 self._accelerator = _cQbRuntime.Accelerator(dev_no)
25
26
27
Represents an accelerator, i.e., an NPU, used for executing models.
__init__(self, int dev_no=0)
Creates an Accelerator object for a specific device number.