Repository navigation
Commit 2af52d3
committed
fix: key an operator by what it does, not by which object it is
Anti-unification takes a descriptor's operator to be an attribute no
substitution may change, and compared the operator objects themselves.
The frontend builds one per use, so two max reductions of the same shape
carry two `MaxOperator` instances, and their bodies never compare equal.
SeisSol's damage step is where that shows. It states one chunk of 362
operations four times and every chunk holds two such reductions, so the
run covering 81 % of the kernel was not even a candidate: the list rolled
into 22 loops of period 1 and 77, out of 1787 operations. Keyed by class
and state it rolls into 7, the largest of period 362 and count 4, and the
families found cover 93 % of the list instead of 72 %.
An operator that does carry state keeps it in the key, and one whose
state cannot be hashed keeps its identity -- calling two bodies the same
when they are not is worse than missing a run. An `Operation` member,
which is what an elementwise descriptor carries, is already its own key.
AI-generated. Model: Opus 51 parent 16e3bf3 commit 2af52d3
2 files changed
Lines changed: 55 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
169 | 197 | | |
170 | 198 | | |
171 | 199 | | |
| |||
184 | 212 | | |
185 | 213 | | |
186 | 214 | | |
187 | | - | |
| 215 | + | |
188 | 216 | | |
189 | 217 | | |
190 | 218 | | |
191 | | - | |
| 219 | + | |
192 | 220 | | |
193 | 221 | | |
194 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | | - | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
48 | 57 | | |
49 | 58 | | |
50 | 59 | | |
| |||
117 | 126 | | |
118 | 127 | | |
119 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
120 | 144 | | |
121 | 145 | | |
122 | 146 | | |
| |||
0 commit comments