Skip to content

BugReport: CInstructions in inlining and vectorisation #634

@sv2518

Description

@sv2518

Hello!

It seems like CInstructions are not treated correctly in the inlining and vectorisation process.

I have written an iterative solver in loopy. This loopy kernel is used in other kernels in the Firedrake codebase. Because loopy does not support while loops I am using a for-loop and a stopping criterion. Because loopy does not support a break statement, I am using a CInstruction to generate the stop criterion. I ran into trouble in two cases.

  • In the inlining because the variable names in the criterion do not change (but all other variables in the kernel are)
  • In the vectorisation because we need to linearise the stop criterion variable (I was doing this by hand previously but I think it should be loopy's job)

I spent all day writing a minimal failing example, but I am stuck with a scheduling error. I don't get the scheduling error in the Firedrake codebase, so I am doing something wrong in the construction of the MFE. The MFE is here https://gist.github.com/sv2518/3e1cbc3bd894320bc4dcabfeb3c86457

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions