-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Target Platform Capabilities - Phase 3 #1297
base: main
Are you sure you want to change the base?
Conversation
Remove context manager functionality from Target Platform Model. Fix all tests and tp models.
@@ -82,7 +82,10 @@ def is_opset_in_model(tp_model: TargetPlatformModel, opset_name: str) -> bool: | |||
bool: True if an OperatorsSet with the given name exists in the target platform model, | |||
otherwise False. | |||
""" | |||
return opset_name in [x.name for x in tp_model.operator_set] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return tp_model.operator_set is not None and opset_name in [x.name for x in tp_model.operator_set]
@@ -52,7 +52,7 @@ def __init__(self, | |||
self.op_sets_to_layers = OperationsToLayers() # Init an empty OperationsToLayers | |||
self.layer2qco, self.filterlayer2qco = {}, {} # Init empty mappings from layers/LayerFilterParams to QC options | |||
# Track the unused opsets for warning purposes. | |||
self.__tp_model_opsets_not_used = [s.name for s in tp_model.operator_set] | |||
self.__tp_model_opsets_not_used = [s.name for s in tp_model.operator_set] if tp_model.operator_set else [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can tp_model.operator_set be None? isn't it something that we want to raise exception on or is it a common case that we can handle?
anyway, I don;t like the empty list initialization here, if a None tp_model.operator_set might raise issues going forward than we should address it and not hide it with an empty list
…rboard when using this version of matplotlib (#1298)
Remove context manager functionality from Target Platform Model. Fix all tests and tp models.
Remove context manager functionality from Target Platform Model. Fix all tests and tp models.
Make all schema classes fully immutable (no more lists).
Pull Request Description:
Checklist before requesting a review: