larroy commented on a change in pull request #17511: Implement all 
miscellaneous ops
URL: https://github.com/apache/incubator-mxnet/pull/17511#discussion_r378644065
 
 

 ##########
 File path: benchmark/opperf/utils/op_registry_utils.py
 ##########
 @@ -437,6 +458,26 @@ def get_all_loss_operators():
     return loss_mx_operators
 
 
+def get_remaining_miscellaneous_operators():
+    """Gets remaining Miscellaneous operators registered with MXNet not 
covered by individual tests.
+
+    Returns
+    -------
+    {"operator_name": {"has_backward", "nd_op_handle", "params"}}
+    """
+    misc_ops = ['squeeze', 'all_finite', 'clip', 'multi_lars', 
'SequenceReverse', 'SequenceLast', 'SequenceMask', 'cast_storage', 'cumsum', 
'fill_element_0index']
+
+    # Get all mxnet operators
+    mx_operators = _get_all_mxnet_operators()
+
+    # Filter for Miscellaneous operators
+    misc_mx_operators = {}
+    for op_name, _ in mx_operators.items():
+        if op_name in misc_ops:
 
 Review comment:
   This code is duplicated it could be factored out with above. also testing 
for element in a list is linear, better use a set.

----------------------------------------------------------------
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

Reply via email to