Closed mlange05 closed 2 months ago
Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/296/index.html
Attention: Patch coverage is 95.71046%
with 16 lines
in your changes are missing coverage. Please review.
Project coverage is 95.09%. Comparing base (
102dafd
) to head (fb56455
).
Files | Patch % | Lines |
---|---|---|
loki/tools/files.py | 15.78% | 16 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks, really nice! I'm happy with it and haven't discovered anything problematic. Nevertheless some comments:
I think in order to be consistent:
transformations/build_system/tests/test_transform_dependency.py
--> transformations/build_system/test_dependency.py
transformations/tests/test_transform_derived_types.py
--> transformations/tests/test_derived_types.py
Why not?
transformations/transform_loop.py
--> transformations/loop.py
transformations/transform_region.py
--> transfrormations/region.py
Me thinking out loud:
transformations/temporaries/
(or something like that) for hoist-variables, pool_allocator, ...transformations/control_flow/
(or something like that) for loop, inline, region, ...transformations/utilities/
for utilities, remove_code, drhook, ...transformation
and pipeline
to be within batch
as they are interfacing the scheduler
, however, I somehow would have expected them to be in transformations/
I guess that further repo reorganisation like "separate operations (inlinecall, subscript, sum, ...) from the symbols/literals" will be done in a future/separate PR?!
@MichaelSt98 Many thanks for the review - to answer your questions:
transformations/build_system/tests/test_transform_dependency.py --> transformations/build_system/test_dependency.py
transformations/tests/test_transform_derived_types.py --> transformations/tests/test_derived_types.py
Yes, absolutely, that was an oversight! Will fix in the needed rebase!
transformations/transform_loop.py --> transformations/loop.py
transformations/transform_region.py --> transfrormations/region.py
Mostly because I actually thought "transform" to be a good high-level description for "fusion/fission/interchange" and "hoist/extract". Open for suggestions though, as the grouping by target "node type" seemed not scalable to me.
Agree in general on the proposed further sub-division or the transformations
package; this will potentially also require some re-jigging of the stuff insied some of those transformation (eg. lots in SCCBase could go into utility
) and I simply wanted to keep this PR manageable.
With regards to Transformation
/Pipeline
moving, this simply creates a clean import chain, as everything in loki.transformations
should be "do something to code", and thus depend on the ir
/expression
and batch
sub-packages. Hope this makes sense. :wink:
Ok, apologies, this took a bit longer than anticipated. @reuterbal I think I've addressed all comments - many thanks for the suggestions!
I've also tried to address the naming inconsistencies pointed out by @MichaelSt98, but those generated some name clashes in the test base (test_derived_type
existed twice). So instead I've opted to rename loki.transformations.derived_type
to loki.transformations.transform_derived_types
to match the test. I hope this works now, and I think we'll get to tidy this up a little further in a follow-on PR.
The next step in our spring clean (issue #253) is to move all the internally support transformations into the core package, alongside the associated tests. This then also merges the
loki.transform
general utilities into the more customloki.transformations
packages.I've tried to restrain myself to only move files and fix-up import headers, with a few small exceptions listed in the details below:
Transformation
andPipeline
class have been moved intoloki.batch
as they are the interface to the schedulertransformations
has been moved intoloki.transformations
loki.tools
loki.transformations.single_column
,loki.transformations.transpile
andloki.transformations.build_system
have been separatedDependencyTransformation
andModuleWrapTransformation
have been mode to separate files insidetrnasformations.build_system
loki.transform
has been moved intoloki.transformations
, often removing thetransform_xxx
prefixAnd finally, apologies to @MichaelSt98 , as this one might conflict quite a bit with his current stuff... :grimacing: