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

Loki: C transpilation from pipeline in config file #106

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Changes from all commits
Commits
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
47 changes: 41 additions & 6 deletions src/cloudsc_loki/cloudsc_loki.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ enable_imports = true # Chase dependencies incurred via imports
# do not attempt to look up the source files for these.
disable = ['timer_mod', 'abort', 'file_io_mod', 'foe*', 'fokoop']

# Prune these moduels from the treeto ensure they are not processed by
# transformations
ignore = ['parkind1', 'yomphyder', 'yoecldp', 'fc*_mod']


# Call tree entry points ("driver" subroutines)
# -------------------------------------------------------------------
Expand All @@ -41,6 +37,28 @@ ignore = ['parkind1', 'yomphyder', 'yoecldp', 'fc*_mod']
role = 'driver'
expand = true

# Explicitly marked "header" modules needed by the C transpilation
# -------------------------------------------------------------------
[routines.yoethf]
role = 'header'
expand = false

[routines.yomcst]
role = 'header'
expand = false

[routines.yoecldp]
role = 'header'
expand = false

[routines.yomphyder]
role = 'header'
expand = false

[routines.parkind1]
role = 'header'
expand = false


# Configuration of "Dimension" variables
# -------------------------------------------------------------------
Expand Down Expand Up @@ -125,10 +143,10 @@ preprocess = true
check_bounds = true


[transformations.InlineTransformation]
[transformations.Inline]
classname = 'InlineTransformation'
module = 'loki.transformations'
[transformations.InlineTransformation.options]
[transformations.Inline.options]
inline_internals = false
inline_marked = true
inline_stmt_funcs = true
Expand All @@ -137,6 +155,15 @@ preprocess = true
resolve_sequence_association = false


[transformations.FortranToC]
classname = 'FortranCTransformation'
module = 'loki.transformations.transpile'

[transformations.FortranISOCWrapper]
classname = 'FortranISOCWrapperTransformation'
module = 'loki.transformations.transpile'


# Loki-SCC family of transformations
# -------------------------------------------------------------------
# A set of transformation passes that transforms SIMD vectorisation
Expand Down Expand Up @@ -195,6 +222,11 @@ preprocess = true
module = 'loki.transformations.build_system'
options = { suffix = '_LOKI', module_suffix = '_MOD' }

[transformations.Dependency_CToF]
classname = 'DependencyTransformation'
module = 'loki.transformations.build_system'
options = { suffix = '_FC', module_suffix = '_MOD' }


# Full transformation pipelines
# -------------------------------------------------------------------
Expand Down Expand Up @@ -226,3 +258,6 @@ preprocess = true

[pipelines.scc-stack]
transformations = ['DataOffload', 'Sanitise', 'SCCStack', 'ModuleWrap', 'Dependency']

[pipelines.c]
transformations = ['Sanitise', 'Inline', 'FortranToC', 'FortranISOCWrapper', 'ModuleWrap', 'Dependency_CToF']