Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[Opperf] Filter out deprecated ops #15541

Merged
merged 10 commits into from
Aug 16, 2019
7 changes: 7 additions & 0 deletions benchmark/opperf/utils/op_registry_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def _select_ops(operator_names, filters=("_contrib", "_"), merge_op_forward_back
By default, filter out all Contrib operators that starts with '_contrib' and internal operators that
starts with '_'.

Note - All deprecated operators are filtered out as well.

Parameters
----------
operator_names: List[str]
Expand All @@ -53,6 +55,11 @@ def _select_ops(operator_names, filters=("_contrib", "_"), merge_op_forward_back
mx_operators = {}
operators_with_backward = []

# Filter out deprecated operators
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a "Deprecated" field in the operator metadata?
Because, listing operator by names is not scalable. Everytime we deprecate a operator, we need to come here to add it which soon because un-maintained.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some digging around to find there's no exposed API from backend to retrieve deprecated ops. So at the moment, for the sake of this PR can we go ahead with that. I've created another issue to track the same. Sounds good?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filters += ("normal", "uniform", "BatchNorm_v1", "Flatten", "contrib_CTCLoss", "Pad", "Cast",
"Pooling_v1", "Concat", "Reshape", "Convolution_v1", "SliceChannel", "Crop",
"crop", "onehot_encode")

if merge_op_forward_backward:
filters += ("_backward",)

Expand Down