Skip to content

Commit 1bfa3b1

Browse files
Faster tile shape exploration
1 parent a21c3ac commit 1bfa3b1

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

accelforge/mapper/FFM/_make_pmappings/make_pmappings_from_templates/make_tile_shapes.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,11 @@ def _try_admit(n: int) -> bool:
761761
else:
762762
n += 1
763763

764+
# Force n to be a multiple of the inner size. ctrl-f for
765+
# IMPERFECT_OUTER_ONLY_ASSUMPTION. Note we also require that the enumeration
766+
# order is inner -> outer if we're doing imperfect.
767+
n = math.ceil(n / inner_size) * inner_size
768+
764769
# One more in case coarseness jumped the max value
765770
_try_admit(outer_size)
766771

@@ -1220,10 +1225,11 @@ def hybrid(s):
12201225
if isinstance(tiled_by, Symbol) and tiled_by not in enumerated_set:
12211226
score_unknown -= 1
12221227

1223-
# Score for bringing in an entirely-new formula
1228+
# Score for bringing in an entirely-new formula. NOTE: This caused memory to
1229+
# blow up for some workloads when the punishment was set higher.
12241230
for o in objectives:
12251231
if s in o._free_symbols and not o._free_symbols & enumerated_set:
1226-
score_unknown -= 10
1232+
score_unknown -= .1
12271233

12281234
return (
12291235
-keep, # Punish enumerating keep symbols because they're always diff

0 commit comments

Comments
 (0)