Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
5e8af22
first commit
rolfhm Nov 22, 2023
14bf16f
add fix
rolfhm Nov 22, 2023
0b22924
added test and changed elif to if
rolfhm Nov 23, 2023
5231618
some coding golf to get the test module under 1500 lines
rolfhm Nov 23, 2023
5dbb3b4
pool_allocator handles range indices
rolfhm Nov 24, 2023
c1a75a2
split long line
rolfhm Nov 24, 2023
036153a
f string stuff
rolfhm Nov 24, 2023
4a37b2d
missing space making test freak out?
rolfhm Nov 24, 2023
abe3d73
some cleanup
rolfhm Nov 24, 2023
5202a18
Merge branch 'main' of github.com:ecmwf-ifs/loki into sbrm-rawstack-t…
rolfhm Nov 24, 2023
678e4bd
Merge branch 'sbrm-substitute-expressions-parent-change' into sbrm-ra…
rolfhm Nov 24, 2023
dc4182d
Merge branch 'sbrm-range-indices-in-stack' into sbrm-rawstack-transfo…
rolfhm Nov 24, 2023
2d92d3c
remove c_sizeof
rolfhm Nov 24, 2023
36791ec
change name
rolfhm Nov 28, 2023
e50146c
started stacking
rolfhm Nov 28, 2023
9044744
Merge branch 'main' of github.com:ecmwf-ifs/loki into sbrm-rawstack-t…
rolfhm Nov 29, 2023
c51a237
slouching forward
rolfhm Nov 29, 2023
efa087e
pstack(jlon, ...)
rolfhm Nov 30, 2023
2bcaf84
strange crashes
rolfhm Dec 1, 2023
3f12860
Expressions no longer lead to None dimensions
rolfhm Dec 7, 2023
7d422f1
mapping might work and begun on multiple types and kinds
rolfhm Dec 8, 2023
cd4943e
stack_sizes and declarations working
rolfhm Dec 14, 2023
3bbc52f
fixed unbounded range bug
rolfhm Dec 15, 2023
4649b86
Merge branch 'main' of github.com:ecmwf-ifs/loki into sbrm-rawstack-t…
rolfhm Dec 15, 2023
8820fac
almost works
rolfhm Dec 19, 2023
a7ceb36
appears to work
rolfhm Dec 19, 2023
b9d83a2
Merge branch 'main' of github.com:ecmwf-ifs/loki into sbrm-rawstack-t…
rolfhm Dec 19, 2023
4a6c2ec
some cleanup and beginning of documentation
rolfhm Dec 20, 2023
4fbf974
Merge branch 'main' of github.com:ecmwf-ifs/loki into sbrm-rawstack-t…
rolfhm Jan 9, 2024
73357d2
fixed some complainst from linter
rolfhm Jan 9, 2024
1f40deb
fixed some items()
rolfhm Jan 10, 2024
8636e03
more dict stuff
rolfhm Jan 10, 2024
96487e4
start testing
rolfhm Jan 10, 2024
4cf2abb
some testing
rolfhm Jan 11, 2024
a333ab5
have to deal with kind names
rolfhm Jan 11, 2024
be31f8a
fix naming and maybe pass OMNI
rolfhm Jan 12, 2024
c62ca2f
trigger omnitest
rolfhm Jan 12, 2024
6e20c1f
more omnitesting
rolfhm Jan 12, 2024
15dec38
omni
rolfhm Jan 12, 2024
792abcb
omni
rolfhm Jan 15, 2024
f5c14a3
omni
rolfhm Jan 15, 2024
ae78349
more testing
rolfhm Jan 15, 2024
8f7f8f2
more teststuff
rolfhm Jan 15, 2024
3b88190
som acc fixes and more testing
rolfhm Jan 16, 2024
91db06f
some omnifix
rolfhm Jan 16, 2024
0f07725
omni
rolfhm Jan 16, 2024
5c47fc2
omni
rolfhm Jan 16, 2024
ef73875
omni
rolfhm Jan 16, 2024
372b604
omni
rolfhm Jan 17, 2024
ffb503d
omni
rolfhm Jan 17, 2024
08007d6
omni
rolfhm Jan 17, 2024
8b5c8b3
omni
rolfhm Jan 17, 2024
ea1d04f
Merge branch 'main' of github.com:ecmwf-ifs/loki into sbrm-rawstack-t…
rolfhm Jan 17, 2024
ad91a28
ready?
rolfhm Jan 17, 2024
e3234d8
omni
rolfhm Jan 17, 2024
8b785b9
fixed optional arguments
rolfhm Jan 17, 2024
7f1a075
code checks
rolfhm Jan 17, 2024
8eb4c20
remove unused function _move_pragma_to_end_of_spec
rolfhm Jan 17, 2024
621f11e
more testing
rolfhm Jan 17, 2024
a2f45f6
omni
rolfhm Jan 18, 2024
648106d
add more documentation and remove some unused stuff
rolfhm Jan 18, 2024
2b9087e
some code checks
rolfhm Jan 18, 2024
84cb2bb
more documentation
rolfhm Jan 18, 2024
06f829b
Merge branch 'main' of github.com:ecmwf-ifs/loki into sbrm-rawstack-t…
rolfhm Feb 1, 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
2 changes: 2 additions & 0 deletions loki/expression/mappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,8 @@ def map_variable_symbol(self, expr, *args, **kwargs):
if expr.scope is None:
if parent is expr.parent and not is_type_changed:
return expr
if not is_type_changed:
return expr.clone(parent=parent)
return expr.clone(parent=parent, type=new_type)

if parent is expr.parent:
Expand Down
11 changes: 9 additions & 2 deletions scripts/loki_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from transformations.derived_types import DerivedTypeArgumentsTransformation
from transformations.utility_routines import DrHookTransformation, RemoveCallsTransformation
from transformations.pool_allocator import TemporariesPoolAllocatorTransformation
from transformations.raw_stack_allocator import TemporariesRawStackTransformation
from transformations.single_column_claw import ExtractSCATransformation, CLAWTransformation
from transformations.single_column_coalesced import (
SCCBaseTransformation, SCCAnnotateTransformation,
Expand Down Expand Up @@ -71,7 +72,7 @@ def cli(debug):
@click.option('--mode', '-m', default='idem',
type=click.Choice(
['idem', 'idem-stack', 'sca', 'claw', 'scc', 'scc-hoist', 'scc-stack',
'cuf-parametrise', 'cuf-hoist', 'cuf-dynamic']
'cuf-parametrise', 'cuf-hoist', 'cuf-dynamic', 'scc-raw-stack']
),
help='Transformation mode, selecting which code transformations to apply.')
@click.option('--config', default=None, type=click.Path(),
Expand Down Expand Up @@ -230,7 +231,7 @@ def convert(
horizontal=horizontal, claw_data_offload=use_claw_offload
))

if mode in ['scc', 'scc-hoist', 'scc-stack']:
if mode in ['scc', 'scc-hoist', 'scc-stack', 'scc-raw-stack']:
# Apply the basic SCC transformation set
scheduler.process( SCCBaseTransformation(
horizontal=horizontal, directive=directive
Expand Down Expand Up @@ -288,6 +289,12 @@ def transform_subroutine(self, routine, **kwargs):
scheduler.process(transformation=HoistTemporaryArraysAnalysis(dim_vars=(vertical.size,)))
scheduler.process(transformation=HoistTemporaryArraysDeviceAllocatableTransformation())

if mode == 'scc-raw-stack':
transformation = TemporariesRawStackTransformation(
block_dim=block_dim, horizontal=horizontal, directive=directive
)
scheduler.process(transformation=transformation)

# Housekeeping: Inject our re-named kernel and auto-wrapped it in a module
scheduler.process( ModuleWrapTransformation(module_suffix='_MOD') )
mode = mode.replace('-', '_') # Sanitize mode string
Expand Down
Loading