Open arporter opened 2 weeks ago
Fixing the interface renaming was relatively simple and I've now done that. Unfortunately, while testing I discovered that our 'clever' code that attempts to return the correct Routine PSyIR by looking at the signature takes no account of precision! This is because it uses LFRicTypes
and it seems that that class doesn't account for precision. I can't remember what the thinking was here - I need to search through the Issues and see what I can find.
Sergi suggested trying to ModuleInline the kernel first and then apply ACCRoutineTrans to it. However, that doesn't help because KernelModuleInlineTrans uses the same broken code to get the PSyIR of the routine to inline.
In fact, calling ACCRoutineTrans on the inlined kernel also fails because:
Transformation Error: routine 'matrix_vector_code_r_double' calls another routine 'MATMUL(matrix(:,:,ik), x_e)' which is not available on the accelerator device and therefore cannot have ACCRoutineTrans applied to it (TODO #342).
I thought we had MATMUL tagged as being available on the GPU?
EDIT: it's not but perhaps it could be?
I'm making good progress with the plumbing but am now hitting errors because of the plain Symbol
s that are created in a kernel's symbol table for all of the reserved names. I need to work out why that isn't a problem on master.
As found here: https://github.com/stfc/PSyclone/issues/2663#issuecomment-2332037300
The problem seems to be that we rename the interface rather than the actual subroutine that is being called.