This thread is for general questions on the TOSA test infrastructure.
We are planning on releasing two sets of unit test tools:
- TOSA unit tests
This test infrastructure is focused on directly testing an implementation of the TOSA operators for correctness.
The test generators create a series of serialized test networks, with input data, for each TOSA operator across a range of input shapes and operator attributes. The TOSA Reference Model serves as the golden implementation and the output of other implementations can be compared with the reference output.
- TensorFlow / TensorFlow Lite unit tests and full network tests
This test infrastructure is focused on testing the TOSA MLIR lowerings and TOSA reference model against TF and TFLite implementations.
The test generators create a series of TF protobuf and TFLite files with a range of input shapes and operator attributes that target as many TOSA lowerings in MLIR as possible. The TF and TFLite output serves as a reference implementation which is then compared against the same network lowered through TOSA and evaluated in the TOSA Reference Model.
The test infrastructure also includes tools to convert full networks (e.g., Inception V4) in a TF protobuf format to a test with inputs that can be run with the same test running tool as the unit tests.
The TOSA unit tests have been released as part of the TOSA Reference Model repository: