Skip to content

Commit

Permalink
compiler: Remember to further improve block size
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Jul 22, 2024
1 parent 8a0d4d1 commit 8c62ae9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions devito/arch/archinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,8 @@ def limits(self, compiler=None, language=None):
language.
"""
return {
'max-par-dims': np.inf,
'max-block-dims': np.inf,
'max-par-dims': sys.maxsize,
'max-block-dims': sys.maxsize,
}


Expand Down
2 changes: 2 additions & 0 deletions devito/types/dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,8 @@ def _arg_values(self, interval, grid=None, args=None, **kwargs):
# no value supplied -> the sub-block will span the entire block
return {name: args[self.parent.step.name]}
else:
# TODO": Check the args for space order and apply heuristics (e.g.,
# `2*space_order`?) for even better block sizes
value = self._arg_defaults()[name]
if value <= args[self.root.max_name] - args[self.root.min_name] + 1:
return {name: value}
Expand Down

0 comments on commit 8c62ae9

Please sign in to comment.