Skip to content
Open
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
64 changes: 64 additions & 0 deletions modelopt/onnx/op_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,67 @@ def is_data_dependent_shape_op(op_type: str):
"NonZero",
"RoiAlign",
]


def get_bool_ops():
"""Returns set of bool operations."""
return {
"Not",
"And",
"Or",
"Xor",
}


def get_bitwise_ops():
"""Returns set of bitwise operations."""
return {
"BitwiseAnd",
"BitwiseOr",
"BitwiseXor",
"BitShift",
}


def get_value_check_ops():
"""Returns set of value checking operations."""
return {
"IsNaN",
"IsInf",
"Sign",
"Abs",
}


def get_comparison_ops():
"""Returns set of comparison operations."""
return {
"Equal",
"Greater",
"GreaterOrEqual",
"Less",
"LessOrEqual",
}


def get_conditional_ops():
"""Returns set of conditional operations."""
return {
"Where",
}


def get_aggregation_ops():
"""Returns set of aggregation operations."""
return {
"All",
"Any",
}


def get_set_ops():
"""Returns set of set/search operations."""
return {
"Unique",
"NonZero",
}
Loading