Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3612 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 403 403
Lines 56790 56892 +102
==========================================
+ Hits 56790 56892 +102 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@LonelyCat124 This is ready for review |
LonelyCat124
left a comment
There was a problem hiding this comment.
I didn't look at the tests yet and had a fairly quick look through. It mostly looks ok (did it definitely find them all? Other than the Fuse ones iI'm currently working on), but its definitely missed a few of the things and in a couple of places it does some very non-obvious things.
It would be nice to cleanup the Nodes that take options as an input, but might be beyond the scope of this PR.
| :param options: a dictionary with options for transformations. | ||
| :type options: Optional[Dict[str, Any]] | ||
| :param bool options["create_driver"]: whether or not to create a \ | ||
| :param options["create_driver"]: whether or not to create a \ |
There was a problem hiding this comment.
rm any options["..."] throughout the changed files.
There was a problem hiding this comment.
I removed them all now
| :param options: a dictionary with options for transformations. | ||
| :type options: Optional[Dict[str, Any]] | ||
| :param str options["prefix"]: a prefix to use for the PSyData module \ | ||
| :param options["prefix"]: a prefix to use for the PSyData module \ |
There was a problem hiding this comment.
is prefix inherited or it missed it?
There was a problem hiding this comment.
Inherited from PSyDataTrans
| "driver-MODULE-REGION.f90" where MODULE and REGION will be the \ | ||
| corresponding values for this region. Defaults to False. | ||
| :param (str,str) options["region_name"]: an optional name to \ | ||
| :param options["region_name"]: an optional name to \ |
There was a problem hiding this comment.
is region name inherited or missed?
There was a problem hiding this comment.
Inherited from PSyDataTrans
| :py:class:`psyclone.domain.lfric.algorithm.LFRicAlgorithmInvokeCall` | ||
| :param options: a dictionary with options for transformations. | ||
| :type options: Optional[Dict[str, Any]] | ||
| :param options["kernels"]: this option provides a list of \ |
There was a problem hiding this comment.
Again its kept options["..."]
There was a problem hiding this comment.
I removed them all now
|
|
||
| # Check the algorithm arguments and kernel metadata match. | ||
| self.get_arguments(node, options=options, check_args=True) | ||
| self.get_arguments(node, kernels=kernels, check_args=True) |
There was a problem hiding this comment.
Should get arguments also take **kwargs (and keep options) in case of inheritance?
There was a problem hiding this comment.
I removed options (it is an internal function we don't need it). I kept kwargs, just because it is a subclass calling a method implemented in subclasses with different parameters. I think this is not the best design but maybe updating this is out-of-scope for this PR.
There was a problem hiding this comment.
I also fully deleted the options from the alg_invoke_2_psy_call family of transformations as this are only for internal use and don't need backwards compatibility apis.
| @@ -8,13 +8,17 @@ | |||
| '''This module provides the LoopTiling2DTrans, which transforms a 2D Loop | |||
| construct into a tiled implementation of the construct.''' | |||
There was a problem hiding this comment.
I had previously ignored this transformation because its deprecated, happy to have it changed but maybe we can remove/delete this transformation on a similar timeline as options anyway?
There was a problem hiding this comment.
But for this PR I won't want to leave an exception without kwargs, maybe we keep the deprecation of the transformation separate of this?
| :type nodes: :py:class:`psyclone.psyir.nodes.Node` or | ||
| list[:py:class:`psyclone.psyir.nodes.Node`] | ||
| :param bool options["force"]: whether to ignore potential control | ||
| :param force: whether to ignore potential control |
There was a problem hiding this comment.
We don't need the param on validate.
| :param force: ignore potential control-flow jumps in the region. | ||
|
|
||
| ''' | ||
| if force: |
There was a problem hiding this comment.
Is this to avoid duplicating force in kwargs? That doesn't seem possible since force is explicitly defined on this apply method so can't we just do
super().apply(nodes, force=force, options=options, **kwargs)
There was a problem hiding this comment.
Done (apparently is was due to a monkeypatched validate that didn't accept kwargs, but I fixed the test now)
| (``PREFIX_PSYDATATYPE``) - a "_" will be added automatically. \ | ||
| It defaults to "". | ||
| :param (str,str) options["region_name"]: an optional name to \ | ||
| :param region_name: an optional name to \ |
There was a problem hiding this comment.
Only needed on apply
| validate_kwargs["prefix"] = prefix | ||
| if region_name is not None: | ||
| validate_kwargs["region_name"] = region_name | ||
| self.validate(node_list, options, **validate_kwargs) |
There was a problem hiding this comment.
What is going on here?
|
For reference, this was the script I wrote to find all remaining transformations previously: |
No description provided.