Skip to content

Conversation

dimdano
Copy link
Contributor

@dimdano dimdano commented Sep 26, 2025

Description

This PR introduces a generic external backend and writer plugin system for hls4ml. The first concrete implementation is support for the AMD AI Engine (AIE), provided through a separate plugin package, aie4ml (to be published soon). The changes to hls4ml itself are minimal, as the main AIE functionality, including the AIEBackend and AIEWriter, lives in the companion repository https://github.com/dimdano/aie4ml .

Unlike the existing FPGA backends, the AIE backend does not rely primarily on HLS flows. However, it still benefits from hls4ml’s common infrastructure (model parsing, quantisation, graph optimisation, etc.), and may also support deploying subgraphs of a model to HLS, complementing the AIE execution through the PL.

The backend is discovered automatically through the hls4ml.backends entry-point group (or via the HLS4ML_BACKEND_PLUGINS environment variable), so once aie4ml is installed, "AIE" appears in hls4ml.backends.get_available_backends() and can be selected just like built-in toolflows.

A few notes on aie4ml

  • aie4ml produces ready-to-compile AMD AIE projects, which can be compiled directly with AMD Vitis.
  • Currently supports linear (dense) layers, with optional bias and ReLU activation.
  • A key benefit of the AIE flow through the aie4ml tool is that such layers can be very large, while compilation/synthesis times are much shorter than traditional FPGA HLS flows. aie4ml automatically scales designs across the AIE array and can produce optimized implementations that often reach close to theoretical peak performance. This enables high throughput, especially for large models.
  • The companion repository is installable via pip and maintained independently of the main hls4ml repo. For details on supported features, current limitations, and usage instructions, please refer directly to the aie4ml repository.

Authored by: @dimdano (aie4ml)

Type of change

  • New feature (non-breaking change which adds functionality)

Tests

Verified that get_available_backends() lists "AIE" when aie4ml is installed.

Checklist

  • I have read the guidelines for contributing.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have installed and run pre-commit on the files I edited or added.
  • I have added tests that prove my fix is effective or that my feature works.

@dimdano dimdano marked this pull request as ready for review September 26, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant