larroy commented on a change in pull request #15606: [Opperf] Add array
rearrange operators to opperf
URL: https://github.com/apache/incubator-mxnet/pull/15606#discussion_r306478450
##########
File path: benchmark/opperf/utils/op_registry_utils.py
##########
@@ -262,6 +264,26 @@ def get_all_sorting_searching_operators():
return sort_search_mx_operators
+def get_all_rearrange_operators():
+ """Gets all array rearrange operators registered with MXNet.
+
+ Returns
+ -------
+ {"operator_name": {"has_backward", "nd_op_handle", "params"}}
+ """
+ rearrange_ops =
['transpose','swapaxes','flip','depth_to_space','space_to_depth']
Review comment:
This should be a set if repeatedly testing for in.
Could we refactor all these get_ functions and make some kind of yaml file
where we add tags to the list of operators, I think a declarative thing would
be much easier to maintain than all this logic which can be factored out just
to select some ops based on the names.
Let me know if what I'm suggesting is not clear.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services