Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summarize changes to support prediction #1

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e733704
Apply CEESD changes
MTCam Jul 18, 2024
ea7aa6b
Merge branch 'main' into production-pilot
MTCam Jul 26, 2024
f400c8a
Add annular cylinder init func.
MTCam Jul 30, 2024
adbfac3
Merge branch 'add-annular-cylinder-init' into production-pilot
MTCam Jul 30, 2024
4cd3e78
Merge branch 'main' into production-pilot-up2date
MTCam Aug 29, 2024
86d8611
Defer switch to actx.np.zeros
MTCam Aug 29, 2024
0bf78f8
Merge branch 'main' into production-pilot
MTCam Sep 3, 2024
2275a94
Revert "Add some diagnostic checks to ferret out loop-nest errors."
matthiasdiener Sep 4, 2024
039bdbd
Fusion actx: cache transform_loopy_program
matthiasdiener Sep 5, 2024
6eeba39
Merge pull request #8 from illinois-ceesd/fusion-actx-cache-loopy-tra…
matthiasdiener Sep 6, 2024
d88cba9
Merge branch 'main' into production-pilot
matthiasdiener Sep 6, 2024
6886f21
hotfix: don't fail when another rank added transformation
matthiasdiener Sep 6, 2024
fb3f2df
Merge branch 'main' into production-pilot
MTCam Oct 13, 2024
749dfae
slight pedantry
MTCam Oct 21, 2024
a809c47
Merge branch 'main' into production-pilot
MTCam Nov 5, 2024
cc8e781
Remove extraneous Optional
MTCam Nov 5, 2024
0224ca9
Merge branch 'production-pilot' into production
MTCam Nov 6, 2024
451e7f8
Merge branch 'main' into production-pilot
MTCam Nov 15, 2024
60f25c0
Merge branch 'production-pilot' into production
MTCam Nov 19, 2024
751336b
Merge branch 'main' into production-pilot
MTCam Nov 19, 2024
8957330
Merge branch 'main' into production-pilot
MTCam Nov 28, 2024
a7237df
Merge branch 'main' into production-pilot
MTCam Dec 2, 2024
e414d6d
Merge branch 'main' into production-pilot
MTCam Dec 5, 2024
aa108f1
upgrade cache miss to logger.info
matthiasdiener Dec 11, 2024
de4f9ed
Merge branch 'production-pilot' into production
MTCam Dec 12, 2024
55883af
Merge branch 'main' into production-pilot
MTCam Dec 17, 2024
7fd9109
Merge branch 'production-pilot' into production
MTCam Dec 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fusion actx: cache transform_loopy_program
  • Loading branch information
matthiasdiener committed Sep 5, 2024
commit 039bdbd38901bf74ad85f8a5747d45b5a564ba2b
20 changes: 19 additions & 1 deletion meshmode/array_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,9 @@ def _combine_einsum_domains(knl):
return knl.copy(domains=new_domains)


from pytools.persistent_dict import WriteOncePersistentDict
from pytato.analysis import PytatoKeyBuilder

class FusionContractorArrayContext(
SingleGridWorkBalancingPytatoArrayContext):

Expand All @@ -1272,6 +1275,10 @@ def __init__(
self.use_axis_tag_inference_fallback = use_axis_tag_inference_fallback
self.use_einsum_inference_fallback = use_einsum_inference_fallback

self.transform_loopy_cache = WriteOncePersistentDict("meshmode-fusion_actx_transform_loopy_cache-v1",
key_builder=PytatoKeyBuilder(),
safe_sync=False)

def transform_dag(self, dag):
import pytato as pt

Expand Down Expand Up @@ -1639,11 +1646,20 @@ def transform_loopy_program(self, t_unit):
from arraycontext.impl.pytato.compile import FromArrayContextCompile

original_t_unit = t_unit
knl = t_unit.default_entrypoint

try:
r = self.transform_loopy_cache[t_unit]
except KeyError:
logger.debug(f"FusionContractorArrayContext.transform_loopy_program '{knl.name}': cache miss")
pass
else:
logger.info(f"FusionContractorArrayContext.transform_loopy_program '{knl.name}': cache hit")
return r

# from loopy.transform.instruction import simplify_indices
# t_unit = simplify_indices(t_unit)

knl = t_unit.default_entrypoint

logger.info(f"Transforming kernel '{knl.name}' with {len(knl.instructions)} statements.")

Expand Down Expand Up @@ -1866,6 +1882,8 @@ def transform_loopy_program(self, t_unit):

# }}}

self.transform_loopy_cache[original_t_unit] = t_unit

return t_unit


Expand Down
Loading