npu package#
Subpackages#
- npu.build package
- Submodules
- npu.build.appbuilder module
AppBuilder
AppBuilder.name
AppBuilder.ab
AppBuilder.fxtracer
AppBuilder.kernels
AppBuilder.connections
AppBuilder.previous_build_args
AppBuilder.build()
AppBuilder.callgraph()
AppBuilder.display()
AppBuilder.displaymlir()
AppBuilder.merge_applications()
AppBuilder.metadata
AppBuilder.save()
AppBuilder.to_handoff()
AppBuilder.to_json()
AppBuilder.to_metadata()
AppBuilder.to_mlir()
AppBuilder.to_sequence()
AppBuilder.unique_named()
AppBuilder.validate_previous_build_args()
- npu.build.appmetadata module
- npu.build.apptracer module
- npu.build.appxclbinbuilder module
- npu.build.buffers module
- npu.build.connections module
- npu.build.itkernel module
- npu.build.kernel module
- npu.build.kernelbuilder module
- npu.build.kernelmeta module
KernelMeta
KernelMeta.name
KernelMeta.shortname
KernelMeta.ktype
KernelMeta.ttype
KernelMeta.ports
KernelMeta.tloc
KernelMeta.disable_unique_name_id
KernelMeta.bufferports
KernelMeta.inputbufferports
KernelMeta.metadata
KernelMeta.outputbufferports
KernelMeta.reset_unique_names()
KernelMeta.rtpports
KernelMeta.to_metadata()
KernelMeta.unique_name()
KernelMeta.used_names
- npu.build.mlirbuilder module
- npu.build.mlirconnections module
- npu.build.mlirsequencebuilder module
MLIRSequnceBuilder
MLIRSequnceBuilder._metadata
MLIRSequnceBuilder.aietiles
MLIRSequnceBuilder._userbuffers
MLIRSequnceBuilder._ubname2externid
MLIRSequnceBuilder._ingress_ub
MLIRSequnceBuilder._egress_ub
MLIRSequnceBuilder._ingress_egress_ub
MLIRSequnceBuilder._constants_table
MLIRSequnceBuilder._cons_broadcasts
MLIRSequnceBuilder.mlir
UBDataMovement
- npu.build.mlirtiles module
- npu.build.mtkernel module
- npu.build.port module
- npu.build.sequence module
- npu.build.tracekernels module
- npu.build.tracelogger module
- npu.build.userspace module
- npu.build.utils module
- npu.build.wslbuilder module
- Module contents
- npu.lib package
- Subpackages
- npu.lib.applications package
- npu.lib.cached package
- npu.lib.kernels package
- Submodules
- npu.lib.kernels.addweighted module
- npu.lib.kernels.bitwiseand module
- npu.lib.kernels.bitwiseor module
- npu.lib.kernels.filter2d module
- npu.lib.kernels.gray2rgba module
- npu.lib.kernels.inrange module
- npu.lib.kernels.inverse module
- npu.lib.kernels.kernelgenerator module
- npu.lib.kernels.median module
- npu.lib.kernels.plusn module
- npu.lib.kernels.rgba2gray module
- npu.lib.kernels.rgba2hue module
- npu.lib.kernels.rgba_inverse module
- npu.lib.kernels.threshold module
- Module contents
- Module contents
- Subpackages
- npu.runtime package
- Submodules
- npu.runtime.aie_host_utils module
- npu.runtime.apprunner module
- npu.runtime.kernelinstance module
- npu.runtime.pyxrt module
bo
device
ert_cmd_state
ert_cmd_state.ERT_CMD_STATE_ABORT
ert_cmd_state.ERT_CMD_STATE_COMPLETED
ert_cmd_state.ERT_CMD_STATE_ERROR
ert_cmd_state.ERT_CMD_STATE_NEW
ert_cmd_state.ERT_CMD_STATE_NORESPONSE
ert_cmd_state.ERT_CMD_STATE_QUEUED
ert_cmd_state.ERT_CMD_STATE_SKCRASHED
ert_cmd_state.ERT_CMD_STATE_SKERROR
ert_cmd_state.ERT_CMD_STATE_SUBMITTED
ert_cmd_state.ERT_CMD_STATE_TIMEOUT
ert_cmd_state.name
ert_cmd_state.value
hw_context
kernel
run
uuid
xclBOSyncDirection
xclbin
xclbinip_vector
xclbinkernel_vector
xclbinmem_vector
xrt_info_device
xrt_info_device.bdf
xrt_info_device.dynamic_regions
xrt_info_device.electrical
xrt_info_device.host
xrt_info_device.interface_uuid
xrt_info_device.kdma
xrt_info_device.m2m
xrt_info_device.max_clock_frequency_mhz
xrt_info_device.mechanical
xrt_info_device.memory
xrt_info_device.name
xrt_info_device.nodma
xrt_info_device.offline
xrt_info_device.pcie_info
xrt_info_device.platform
xrt_info_device.thermal
xrt_info_device.value
xrt_info_device.vmr
- npu.runtime.sequence module
- Module contents
- npu.utils package
- Submodules
- npu.utils.aiekernels module
- npu.utils.appviz module
- npu.utils.display_widget module
- npu.utils.imgplot module
- npu.utils.imgread module
- npu.utils.nputop module
- npu.utils.svg module
AieTile
Box
IfTile
Image
Kernel
KernelArc
MemTile
MemoryBox
RyzenAiArray
RyzenAiArray.draw_app_box()
RyzenAiArray.draw_system_memory()
RyzenAiArray.generate_svg()
RyzenAiArray.generate_svg_image()
RyzenAiArray.hide_aie_tiles()
RyzenAiArray.hide_if_tiles()
RyzenAiArray.hide_interconnect()
RyzenAiArray.hide_mem_tiles()
RyzenAiArray.hide_memory_connections()
RyzenAiArray.hide_tiles()
RyzenAiArray.show_aie_tiles()
RyzenAiArray.show_if_tiles()
RyzenAiArray.show_interconnect()
RyzenAiArray.show_mem_tiles()
RyzenAiArray.show_tiles()
RyzenAiArray.update_hidden_tiles()
RyzenAiColumn
RyzenAiColumn.draw_system_memory()
RyzenAiColumn.generate_column_svg()
RyzenAiColumn.generate_image()
RyzenAiColumn.generate_key()
RyzenAiColumn.hide_compute_tile()
RyzenAiColumn.hide_interface_tile()
RyzenAiColumn.hide_memory_tile()
RyzenAiColumn.show_compute_tile()
RyzenAiColumn.show_interface_tile()
RyzenAiColumn.show_memory_tile()
SystemMemory
Tile
Tile.add_ic_animation()
Tile.add_single_tile_ic_animation()
Tile.add_single_tile_mem_animation()
Tile.clear_ic_animation()
Tile.draw_ic_connections()
Tile.get_hide_tile_svg()
Tile.get_ic_animations_svg()
Tile.get_ic_connections_svg()
Tile.get_memory_animations_svg()
Tile.get_memory_connections_svg()
Tile.get_tile_svg()
Tile.hide_tile()
Tile.show_all()
Tile.show_tile()
- npu.utils.svg_config module
- npu.utils.test_device module
- npu.utils.videoapps module
- npu.utils.xbutil module
- Module contents
Submodules#
npu.magic module#
- class npu.magic.kernel_magic(shell)#
Bases:
Magics
- kernel(_, cell)#
Specify a compute tile C++ kernel and return an npu.build.Kernel object.
This cell magic command allows users to input C++ kernel code within a Jupyter notebook cell. It then returns a corresponding Kernel object that can be compiled into an object file for use in a Riallto application. The Cpp source must return a void type, input and output buffers are specified as pointer types, as parameters are specified with non-pointer types.
Header files included in the directory where the notebook is are permitted.
- Parameters:
cell (str) – The string content of the cell, expected to be C++ code defining the kernel.
- Returns:
Kernel – Returns a Kernel object that has the same name as the last function defined in the cell magic. See npu.build.Kernel.
- Return type:
object
Examples
In a Jupyter notebook %%kernel cell
- void passthrough(uint8_t in_buffer, uint8_t out_buffer, uint32_t nbytes) {
- for(int i=0; i<nbytes; i++) {
out_buffer[i] = in_buffer[i];
}
}
This will construct a passthrough npu.build.Kernel object that can be used within a callgraph to construct a complete application.
- magics = {'cell': {'kernel': 'kernel'}, 'line': {}}#
- registered = True#
npu.repr_dict module#
- class npu.repr_dict.ReprDict(*args, rootname='root', expanded=False, **kwargs)#
Bases:
dict
Subclass of the built-in dict that will display using the JupyterLab JSON repr.
The class is recursive in that any entries that are also dictionaries will be converted to ReprDict objects when returned.
Module contents#
NPU#
Documentation is available in the docstrings and online at https://riallto.ai.
- Provides
An easy-to-use runtime library to run custom applications on the NPU.
APIs for building custom applications.
Useful utilities to test and introspect your designs.
Available subpackages#
- build
Tools for building applications.
- lib
Libraries of prebuilt kernels and graphs.
- runtime
Runtime libraries based on XRT.
- utils
Utilities for building, testing and visualization.