REP-2008 RFC - ROS 2 Hardware Acceleration Architecture and Conventions

This is cool, thanks @imguruza. Sounds like including edalize will lead to support a number of different backends in one go. ament_vitis focuses only on Vitis. I’m hoping this is just a starting point, with others appearing in the future. edalize could indeed help with this vision.

I saw Vivado amongst the backend options for edalize. This, I guess, means that creating ament_edalize will in fact support Vivado and quite a few others in one go. It also looks pretty straightforward to extend each backend with more modern capabilities, since they are simple Python files each (e.g. Vivado’s).

I don’t have lots of extra cycles right now to create the ament extensions myself for edalize but I’d be happy to walk you through the changes needed if you are willing to put time @imguruza. Also, as a point of convergence, you could try then to extend the simple accelerated double vector add example to get it built with ament_edalize CMake macros (instead of using the ament_vitis ones). Provided ament_edalize is in the right form, the only changes needed in this package would be the CMake macro bits and the sources of the kernel (in whatever format the targeted EDA backend wants them)

For the sake of the discussion, note that one of the interesting features proposed in REP-2008 through the ament_acceleration ROS 2 package is to abstract the underlying acceleration backend through a series of technology-agnostic CMacros.

In other words, instead of:

# Vitis-specific 
# ament_vitis CMake macros
vitis_acceleration_kernel(
  NAME vadd
  FILE src/vadd.cpp
  CONFIG src/kv260.cfg
  INCLUDE
    include
  TYPE
    hw
  PACKAGE
)

or potentially, for edalize:

# edalize-specific 
# ament_edalize CMake macros
edalize_acceleration_kernel(
  NAME vadd
  FILE src/vadd.cpp
  CONFIG src/kv260.cfg
  INCLUDE
    include
  TYPE
    hw
  PACKAGE
)

one could just use:

# generic hardware acceleration 
# ament_acceleration CMake macros
acceleration_kernel(
      NAME vadd
      FILE src/vadd.cpp
      INCLUDE
        include
      TARGET kv260  # this can actually be derived
                    # at build-time, from the firmware 
                    # and build args, so not needed
)

Then, ament_acceleration package will derive at build-time which underlying ament extensions should use from the firmware selected in the ROS 2 workspace, and the colcon build arguments. More specifically, today you can do:

Btw, this video I found explaining edalize is awesome :joy: .

1 Like