Partition forms by Index
Partition forms by index.
Blueprint information
- Status:
- Complete
- Approver:
- Martin Sandve Alnæs
- Priority:
- Medium
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
- Needs Code Review
- Milestone target:
- None
- Started by
- Martin Sandve Alnæs
- Completed by
- Martin Sandve Alnæs
Whiteboard
The code generation strategy of MCFC involves breaking a form into portions where all the Expr nodes in each portion use the same set of indices, and then generating an individual expression for each portion in the outermost loop possible. An additional expression that combines the portions is also generated. For an example, see slides 6-16 of http://
The main motivation for using this strategy is to reduce the size of the generated code - it is also possible that producing an affine loop nest instead of a large expression may make the generated code more amenable to optimisation (e.g. using the polyhedral model) by the target C compiler.
In order that this code generation strategy might be implemented in other form compilers, I have begun factoring out the partitioning code from MCFC and adding it into a branch of UFL ( lp:~grm08/ufl/indexpartitioning ). I suspect one problem is that the partitioning code is not efficient (in ufl/algorithms/
Any further comments would be gratefully received.
MSA: I didn't see this before now, because blueprints are not automatically emailed. Will take a look but not right away.
GRM: I just linked the related branch. The original implementation wasn't very elegant, and I think it will be slow on large forms. I think I need to come up with some unit tests to demonstrate what it is supposed to do.
Work Items
Work items:
Complete lifting the implementation of the IndexPartitioner from MCFC: TODO
Add suitable tests: TODO