[REFACTOR][IR] Unified IR Primitive Op and Registry (#4687)
This PR migrates relay's Op into the ir folder. Op and its registry provides an useful mechanism to store any attribute meta-data of an operator include function signatures, lowering rules, side effect etc. These features are not only useful for Relay, but also needed in the low-level IR. At the current moment, intrinsic functions in the low-level IR are simply represented by a string. This means we cannot type-check the low-level IR when the type does not meet the constraint, nor can we obtain further information such as side-effect and read write relation of these intrinsics wrt to arguments. Op will be used as the way to handle primitive ops(in DL terminology) (builtin intrinsics or in compiler terminology). We will perform follow-up refactors to make low-level CallNode take Op as the function argument.
Showing
include/tvm/ir/op.h
0 → 100644
This diff is collapsed.
Click to expand it.
include/tvm/ir/type_relation.h
0 → 100644
This diff is collapsed.
Click to expand it.
src/ir/type_relation.cc
0 → 100644
Please
register
or
sign in
to comment