Skip to content

[WIP] Converter tests

Javier Duarte requested to merge converter_tests into main

Created by: thesps

Many tests of single layer models to test the converters. The idea is to probe the correctness of the converters/layer handling just from observing the output of the hls4ml predict vs the model's predictions. More layer types need to be added for PyTorch & ONNX. I intend to make the process of creating the ONNX models a bit nicer too. The intention is not strictly to test all the backend implementation options, but it may still be worth parametrizing this over backend, io_type & strategy.

The test naming means it's quite easy to run subsets of the tests if something fails and you'd like to check it offline. For example pytest test_conversion.py -k keras for all Keras models, pytest test_conversion.py -k dense for all Dense tests (all frontends).

The commented out PyTorch tests here expose the converter issues referred to in #409 (closed).

Merge request reports

Loading