Skip to content

Commit

Permalink
cleanup/remove some unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSt98 committed Jun 18, 2024
1 parent c0eca9b commit c09c352
Showing 1 changed file with 6 additions and 32 deletions.
38 changes: 6 additions & 32 deletions loki/transformations/single_column/scc_low_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,32 @@

from loki.batch import Pipeline, Transformation
from loki.transformations.hoist_variables import HoistTemporaryArraysAnalysis
# from loki import Transformation

from loki.transformations.single_column.base import SCCBaseTransformation
from loki.transformations.single_column.vector import (
SCCDevectorTransformation, SCCRevectorTransformation, SCCDemoteTransformation
)
from loki.transformations.single_column.scc_cuf import (
HoistTemporaryArraysDeviceAllocatableTransformation,
HoistTemporaryArraysPragmaOffloadTransformation, # SccCufTransformationNew,
HoistTemporaryArraysPragmaOffloadTransformation,
SccLowLevelDataOffload, SccLowLevelLaunchConfiguration
)
# __all__ = ['BlockViewToFieldViewTransformation', 'InjectBlockIndexTransformation',
# 'LowerBlockIndexTransformation', 'LowerBlockLoopTransformation']
from loki.transformations.block_index_transformations import (
InjectBlockIndexTransformation,
LowerBlockIndexTransformation, LowerBlockLoopTransformation
)
from loki.transformations.transform_derived_types import DerivedTypeArgumentsTransformation
from loki.transformations.data_offload import (
GlobalVariableAnalysis, # GlobalVarOffloadTransformation,
GlobalVarHoistTransformation
GlobalVariableAnalysis, GlobalVarHoistTransformation
)
from loki.transformations.parametrise import ParametriseTransformation
from loki.transformations.inline import (
inline_constant_parameters, inline_elemental_functions
)

##

# from loki.transformations.hoist_variables import HoistVariablesTransformation
# from loki.transformations.sanitise import resolve_associates
# from loki.transformations.single_column.base import SCCBaseTransformation
# from loki.transformations.single_column.vector import SCCDevectorTransformation
# from loki.transformations.utilities import single_variable_declaration

__all__ = ['SCCLowLevelCufHoist', 'SCCLowLevelCufParametrise', 'SCCLowLevelHoist',
'SCCLowLevelParametrise', 'SCCLowLevelCuf']
__all__ = [
'SCCLowLevelCufHoist', 'SCCLowLevelCufParametrise', 'SCCLowLevelHoist',
'SCCLowLevelParametrise', 'SCCLowLevelCuf'
]

def inline_elemental_kernel(routine, **kwargs):
role = kwargs['role']
Expand All @@ -55,8 +44,6 @@ def inline_elemental_kernel(routine, **kwargs):
inline_constant_parameters(routine, external_only=True)
inline_elemental_functions(routine)

# InlineTrafo = type("InlineTrafo", (Transformation, object), {
# "transform_subroutine": lambda self, routine, **kwargs: inline_elemental_kernel(routine, **kwargs)})()

class InlineTransformation(Transformation):

Expand Down Expand Up @@ -85,10 +72,6 @@ def transform_subroutine(self, routine, **kwargs):

SCCLowLevelCufParametrise = partial(
Pipeline, classes=(
# InlineTransformation,
# GlobalVariableAnalysis,
# GlobalVarHoistTransformation,
# DerivedTypeArgumentsTransformation,
SCCBaseTransformation,
SCCDevectorTransformation,
SCCDemoteTransformation,
Expand All @@ -98,18 +81,12 @@ def transform_subroutine(self, routine, **kwargs):
LowerBlockLoopTransformation,
SccLowLevelLaunchConfiguration,
SccLowLevelDataOffload,
# HoistTemporaryArraysAnalysis,
# HoistTemporaryArraysCstyleTransformation,
ParametriseTransformation
)
)

SCCLowLevelCufHoist = partial(
Pipeline, classes=(
# InlineTransformation,
# GlobalVariableAnalysis,
# GlobalVarHoistTransformation,
# DerivedTypeArgumentsTransformation,
SCCBaseTransformation,
SCCDevectorTransformation,
SCCDemoteTransformation,
Expand All @@ -120,7 +97,6 @@ def transform_subroutine(self, routine, **kwargs):
SccLowLevelLaunchConfiguration,
SccLowLevelDataOffload,
HoistTemporaryArraysAnalysis,
# HoistTemporaryArraysCstyleTransformation,
HoistTemporaryArraysDeviceAllocatableTransformation
)
)
Expand All @@ -140,8 +116,6 @@ def transform_subroutine(self, routine, **kwargs):
LowerBlockLoopTransformation,
SccLowLevelLaunchConfiguration,
SccLowLevelDataOffload,
# HoistTemporaryArraysAnalysis,
# HoistTemporaryArraysCstyleTransformation,
ParametriseTransformation
)
)
Expand Down

0 comments on commit c09c352

Please sign in to comment.