IRON 1a5eed49d3c0721a318ac369f725acc96b7c4584
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
iron.device Namespace Reference

Namespaces

namespace  device
 
namespace  tile
 

Functions

type[Device__getattr__ (str name)
 
Device from_name (str name, *int|None n_cols=1)
 

Variables

dict _NAME_TO_BASE
 
dict _MAX_COLS = {"NPU1": 4, "NPU2": 8}
 

Detailed Description

Device representations for supported AMD Ryzen AI NPU targets.

Function Documentation

◆ __getattr__()

type[Device] iron.device.__getattr__ ( str  name)

◆ from_name()

Device iron.device.from_name ( str  name,
*int | None   n_cols = 1 
)
Resolve a device-name string (and optional column count) to a Device.

Designed to consume the ``--dev`` CLI flag that almost every
programming example exposes.  Replaces the per-example
``_device_for(dev_str)`` boilerplate.

Args:
    name: One of:

      - ``"npu"`` / ``"npu1"`` — Phoenix/Hawk Point (AIE2)
      - ``"npu2"`` — Strix/Krackan (AIE2P)
      - ``"xcvc1902"`` / ``"xcve2302"`` / ``"xcve2802"`` — Versal AIE1

      Case-insensitive.
    n_cols: Number of columns to use for NPU devices.  ``1`` (the
      default) selects the single-column variant
      (``NPU1Col1`` / ``NPU2Col1``).  ``2..N-1`` selects
      ``NPU{1,2}Col{n_cols}``.  Passing the device's max
      (``4`` for NPU1, ``8`` for NPU2) — or ``None`` as a
      family-agnostic "max" sentinel — selects the unrestricted
      multi-column device (``NPU1`` / ``NPU2``).  Ignored for
      Versal devices.

Returns:
    Device instance.

Raises:
    ValueError: ``name`` unrecognized, or ``n_cols`` out of range
        for the chosen NPU family.

Variable Documentation

◆ _MAX_COLS

dict iron.device._MAX_COLS = {"NPU1": 4, "NPU2": 8}
protected

◆ _NAME_TO_BASE

dict iron.device._NAME_TO_BASE
protected
Initial value:
1= {
2 "npu": "NPU1",
3 "npu1": "NPU1",
4 "npu2": "NPU2",
5 "xcvc1902": "XCVC1902",
6 "xcve2302": "XCVE2302",
7 "xcve2802": "XCVE2802",
8}