You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ImportONNXDefs.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,3 +155,9 @@ necessary.
155
155
It is not always needed to keep the code for an older version, which may be rewritten into the new
156
156
operation. Thus, we just need to have the dialect definition, but not the code for inference or
157
157
lowering.
158
+
159
+
# Adding Operations from not-builtin domains
160
+
To add an operation from a not-builtin domain, it needs to be added to the `additional_op_version_dict` in gen_onnx_mlir.py. The key is the domain name and the value is the per-operation version dictionary.
161
+
The new domain also needs to be added to the `domain_abrv_dict` in gen_onnx_mlir.py. The key is the domain name and the value is the abbreviation/prefix used in ONNX-MLIR for this domain.
162
+
For operations from not-builtin domains, the operation definition specification needs to be manually provided.
163
+
This can be done via custom TableGen records for the operations. See [/src/Dialect/ONNX/AdditionalONNXOps.td](../src/Dialect/ONNX/AdditionalONNXOps.td) for examples.
0 commit comments