In the change from using the reader to storing weights as attributes, GarNetStack input feature weights + biases and output feature weights were missed. Fixed by storing all GarNetStack weights/biases as attributes.
All non default precisions specified for internal GarNet arrays (edge weight, norm, etc.) were not converted to CPP definitions, and produced typedef errors in firmware/parameters.h. Fixed by applying an APTypeConverter to all internal array precisions, not just those with default values.
Modified contrib/garnet.py to include an output activation for GarNetStack models, which was necessary to test above changes. This had previously been commented out due to being unused.
Type of change
[x] Bug fix (non-breaking change that fixes an issue)
Tests
Added test similar to pre-existing in test_garnet.py for GarNetStack models
GarNet internal arrays are included in the generated config automatically for name and type granularity
Previous tests overwrote these specifications, but the new test includes non-default internal arrays in the config
Hello! I have been working on a GarNet calibration model to be run on an FPGA using hls4ml. This is my first pull request, so some of the formalities are new to me. Thank you for your patience!
Description
In the change from using the reader to storing weights as attributes, GarNetStack input feature weights + biases and output feature weights were missed. Fixed by storing all GarNetStack weights/biases as attributes.
All non default precisions specified for internal GarNet arrays (edge weight, norm, etc.) were not converted to CPP definitions, and produced typedef errors in
firmware/parameters.h
. Fixed by applying an APTypeConverter to all internal array precisions, not just those with default values.Modified
contrib/garnet.py
to include an output activation for GarNetStack models, which was necessary to test above changes. This had previously been commented out due to being unused.Type of change
Tests
Added test similar to pre-existing in
test_garnet.py
for GarNetStack modelsChecklist
pre-commit
on the files I edited or added.