fastmachinelearning / hls4ml

Machine learning on FPGAs using HLS
https://fastmachinelearning.org/hls4ml
Apache License 2.0
1.3k stars 419 forks source link

Hardcore weight txt path #1089

Closed vloncar closed 1 month ago

vloncar commented 1 month ago

Description

Currently, weight loading requires running from the specific directory so the relative paths match. In addition, predict() expects all backbends to have a format of <output_dir>/firmware which may not be the case forever in the future (one API in particular will have a different hierarchy). With this PR we ensure the created .so file is has the weights for in absolute path, so loading it from any directory will work, and predict no longer has to change folders.

Type of change

Tests

No need for new tests, all tests will fail if it doesn't work.

Checklist