I think if you make a metatransformation it would work anyway (i.e. if you have class MaximalOMPParallelRegionTrans(MaximalRegionTrans, OMPParalllelTrans)) via get_valid_options
Ah, we had a naming confusion here, I was using metatransformations to mean transformations that call other transformations, not that inherit from multiple transformations. I haven't though about apply/validate MRO (but I don't think this PR should go that far)
I don't like the if not found branch though , as it already duplicates checks done by validate_options
What about:
self_kwargs = dict(kwargs)
trans_kwargs = {}
for key in kwargs:
if key in type(self._trans).get_valid_options():
trans_kwargs[key] = kwargs[key]
if key not in type(self).get_valid_options():
del self_kwargs[key]
This would only remove self_kwards IFF they are in _trans and not self, so self.validate_options still works as expected for invalid options.
I have a slight reservation with just automatically making all of the options of self._trans for all MaximalRegionTrans going forward without requiring full testing of all options (which could be a pain), but maybe its just handled by the failure states we have already.
I don't think that's true, it does full testing of all options some through
self.validate(self_kwargs)
others with
self._compute_transformable_sections -> trans.validate(current_block + [child], trans_kwargs)
(the trans.validate is missing but I think we need it there otherwise we validate a potentially different thing)
Originally posted by @sergisiso in #3431 (comment)
Ah, we had a naming confusion here, I was using metatransformations to mean transformations that call other transformations, not that inherit from multiple transformations. I haven't though about apply/validate MRO (but I don't think this PR should go that far)
What about:
This would only remove self_kwards IFF they are in _trans and not self, so self.validate_options still works as expected for invalid options.
I don't think that's true, it does full testing of all options some through
self.validate(self_kwargs)
others with
self._compute_transformable_sections -> trans.validate(current_block + [child], trans_kwargs)
(the trans.validate is missing but I think we need it there otherwise we validate a potentially different thing)
Originally posted by @sergisiso in #3431 (comment)