Open sergisiso opened 2 years ago
Currently the mixed-precision support in PSyclone only has to worry about using the correct precision when declaring variables in the PSy layer - we rely on the standard Fortran functionality for the compiler to choose the correct kernel routine according to the type of the arguments. However, when we come to module inline then either we have to do what the Fortran compiler would do (and figure out which version of the kernel is being called) or we inline all versions of the kernel and add a suitable interface block.
Determining the correct routine won't be easy because the various kernel routines are normally implemented in terms of explicit 32- and 64-bit datatypes while the algorithm and PSy-layer use the LFRic type definitions (r_def, r_solver, etc.). We would need a mapping between LFRic types and their actual precision for a given compilation. Despite that, it's still probably more immediately do-able than adding an interface block since we have no PSyIR support for such a construct.
There are multiple issues: 1) Can not find the name of the subroutine when doing the lookup in the kernel file (e.g. with mixed precision)
2) The validate_kernel_code_args() fails. For example in:
or in: