hls4ml
hls4ml copied to clipboard
Beginnings of the oneAPI backend
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:
- The usage of
std::array
for sending data on the pipe, and also between layers. It is generally easier to sendstd::array
than a struct containing C arrays, I believe. (Note,std::array
is passed asnnet::array
, so it's possible to change in one place the array definition.) - The addition of
oneapi_types.py
instead of adding the types infpga_types.py
. I think we want to splitfpga_types.py
. Otherwise catapult types will soon also come there. - This uses cmake to build the libraries and testbench. The setup is based on the examples in https://github.com/oneapi-src/oneAPI-samples
- 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.