Conversation
4cff9b4 to
783e0c4
Compare
33c66b4 to
f445d5b
Compare
f445d5b to
de501c1
Compare
d2e362b to
592061e
Compare
1982373 to
4ab1c0d
Compare
4ab1c0d to
b49eb5c
Compare
|
I marked this PR as Draft as you still seem to be debugging. Please mark it as Ready for review when you become confident. |
996f2b4 to
5dfd17d
Compare
|
Tests are passing (modulo known doc/linkcheck failures) https://github.com/firedrakeproject/firedrake/actions/runs/17322729298/job/49186947155 @ksagiyam I feel quite happy with this, could you review? |
gem/gem.py
Outdated
| slices = tuple(i if isinstance(i, int) else slice(None) for i in multiindex) | ||
| sub = aggregate.array[slices] | ||
| sub = Literal(sub, dtype=aggregate.dtype) if isinstance(aggregate, Constant) else ListTensor(sub) | ||
| return Indexed(sub, tuple(i for i in multiindex if not isinstance(i, int))) |
There was a problem hiding this comment.
I'm not sure if this is safe. This is a recursion, and, unlike when we use DAGTraverser, the result is not cached.
There was a problem hiding this comment.
What is the issue? Are we potentially creating new objects and not freeing memory for the old ones?
There was a problem hiding this comment.
I moved this case to the remove_componenttensors DAG traverser.
d60b997 to
8d0dc41
Compare
connorjward
left a comment
There was a problem hiding this comment.
I think that this needs some more comments explaining what is going on. To someone not quite up to speed with the intricacies of GEM this is very hard to understand.
Otherwise I think I'm quite happy with this.
77d6102 to
04f0cf3
Compare
Introduces simplifications that destroy indexed structures
As a benchmark, we generate code for assembling
With this PR it takes 9.41 seconds. Using current
main, this takes around 20 minutes, the majority of which is spent insum_factorise.