Update MO extensions enabling/disabling mechanism (#3873)
* Add id for NormalizeToNarmalizeL2 transformation * Update copyright year * Update extensions enabling/disabling mechanism * Remove copyright change * Copyright year * Update documentation * Revert missed year in copyright
This commit is contained in:
committed by
GitHub
parent
2117020cbb
commit
d462626826
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright (C) 2018-2020 Intel Corporation
|
||||
Copyright (C) 2018-2021 Intel Corporation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -82,11 +82,13 @@ def _update(cls, registered_list: list, registered_dict: dict, key: str, enabled
|
||||
|
||||
for c in cls.__subclasses__():
|
||||
# Force enabling operations
|
||||
if hasattr(c, 'id') and c.id in enabled_transforms:
|
||||
if hasattr(c, 'id') and c.id in enabled_transforms or \
|
||||
".".join([c.__module__, c.__name__]) in enabled_transforms:
|
||||
setattr(c, 'enabled', True)
|
||||
|
||||
# Force disabling operations
|
||||
if hasattr(c, 'id') and c.id in disabled_transforms:
|
||||
if hasattr(c, 'id') and c.id in disabled_transforms or \
|
||||
".".join([c.__module__, c.__name__]) in disabled_transforms:
|
||||
setattr(c, 'enabled', False)
|
||||
|
||||
if c not in registered_list:
|
||||
|
||||
Reference in New Issue
Block a user