-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrating tsfc backend away from coffee #240
Comments
Hi Lawrence, thanks for letting us know. I think the issue is a bit more global than just your own COFFEE policy. We should in the first place decide about the support for TSFC within FFCx, @garth-wells @chrisrichardson @mscroggs. Its definitely a good time to think about FFCx-TSFC interface in the light of your loopy pipeline. |
Let me chip in with a few thoughts about the costs and benefits of re-establishing the "TSFC representation" in FFC-X. I think we can all agree that the old UFC interface was ripe for revision, and that the new interface is a clear improvement. However, due to recent developments in FFC-X, there are some more issues than just minor adjustments to kernel argument names and types:
On the benefits side, I think the primary gain for FEniCS of supporting TSFC is the more intimate integration of the form compiler with the finite elements (through FInAT). This allows to
|
Forgot to add to the benefits that, if FEniCS wants to have these features without relying on TSFC, it is hard to see how it could be done without essentially reinventing FInAT and its intermediate representation, etc. I think all these things are working already with old FEniCS (which has a "TSFC representation"), except for the zany elements (Hermite, Argyris, Morley, Bell) which would need cell sizes information from DOLFIN. |
Closing this issue as things have move on considerably in the meantime. |
Hi folks,
we have an intermediate-length plan to drop the coffee code generation backend in tsfc (most of the effort is in the loopy backend, since that's what we're using further down the pipeline). Given that you're presently not doing further transformations on the kernels once they come out of the form compiler, loopy is a pretty large and heavy dependency.
The rationale for this is also that we migrated the coffee optimisation algorithms into earlier tsfc passes, so we're just carrying around a coffee dependency as an IR->C converter [it also has some ugly code generation issues that were fixed "badly"].
At the moment the backend IR -> C code generation is pretty well encapsulated (it's not perfect, but a little refactoring would get there). My suggestion would therefore be to have FFC provide (here, rather than in the tsfc repo) an implementation of TSFCs "kernel_interface" and extend the interface to require code generation too. FFC could then use the existing C IR it has for the uflacs backend.
Am happy to help with the design and implementation, but I expect I will need some help on the FFC side.
Does this sound like a reasonable route forward? We're not going to do this imminently, but flagging now so things don't suddenly break.
The text was updated successfully, but these errors were encountered: