Skip to content

Extend OpGen tests to allow operators of different precision/ValueType

This MR should enable testing for operators of different precision than float64.

To do so,

  • Compatibility checks must consider a function from the same space but with different precision as the same function, i.e. is_same check.
  • For each ValueType, an individual error acceptance limit must be chosen.

Note: Testing for different precisions is done only for P1 function space, since this is the only function space for which other precisions than float and double are working yet. Also, Only apply and invDiag are tested.

(The invDiag Test in 2D for float32 and float16 returns exactly zero, not a really small number. This is not reasonable, but no reason for this can be found. Thus, this behavior is accepted right now, since at the moment only apply is needed for mixed precision investigations and with those everything works. This behavior should be kept in mind, though.)

TODO:

  • Merge the changes from pystencils !2 and HFG !57, so that all necessary functionality can be generated.
  • Find a more scientific way to choose an acceptance limit for the individual errors.
  • Add the generated operators that need testing to the repository and the respective .cpp files.

Note: all changes that are done before the 20.12.2023 are related to !671 (merged) which is currently in the process of merging. So don't mind any commit that is older than c9f959db!

Edited by Michael Zikeli

Merge request reports