Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions modelopt/onnx/op_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,3 +367,22 @@ def get_set_ops():
"Unique",
"NonZero",
}


def get_symmetric_ops():
"""Returns set of commutative/symmetric operations where operand order doesn't matter."""
return {
"Add",
"Mul",
"And",
"Or",
"Xor",
"Equal",
"Max",
"Min",
"Sum",
"Mean",
"BitwiseAnd",
"BitwiseOr",
"BitwiseXor",
}
Loading