hls4ml icon indicating copy to clipboard operation
hls4ml copied to clipboard

Beginnings of the oneAPI backend

Open jmitrevs opened this issue 1 year ago • 3 comments

Description

This is the beginning of the oneAPI backend, and is just included here for easier sharing and discussion. It is not ready for merging. Currently only io_parallel Dense and activation layers are supported.

Some things to discuss are:

  1. The usage of std::array for sending data on the pipe, and also between layers. It is generally easier to send std::array than a struct containing C arrays, I believe. (Note, std::array is passed as nnet::array, so it's possible to change in one place the array definition.)
  2. The addition of oneapi_types.py instead of adding the types in fpga_types.py. I think we want to split fpga_types.py. Otherwise catapult types will soon also come there.
  3. This uses cmake to build the libraries and testbench. The setup is based on the examples in https://github.com/oneapi-src/oneAPI-samples
  4. Currently only oneAPI 2024.0.0 or later is supported. You have to have it installed.

There is more information on the status at the following link: https://www.icloud.com/keynote/0e6hRDG4E4PazKCJkJ-ur3yTg#oneAPIDev

Type of change

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

Tests

oneAPI has been added as a backend in many tests.

Checklist

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

jmitrevs avatar Jan 11 '24 03:01 jmitrevs