From a1b44905e236cb1ba23561354586f7eb9e8d2ef3 Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 15 Jan 2020 17:06:14 -0500 Subject: [PATCH] Add documentation for handling optional arguments. --- src/dialect/onnx/onnx.td | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/dialect/onnx/onnx.td b/src/dialect/onnx/onnx.td index 7396990..027af43 100644 --- a/src/dialect/onnx/onnx.td +++ b/src/dialect/onnx/onnx.td @@ -78,6 +78,17 @@ def ONNXEntryPointOp: ONNX_Op<"EntryPoint"> { }]; } +//===----------------------------------------------------------------------===// +// ONNX Operations for handling optional arguments +//===----------------------------------------------------------------------===// + +// To allow pattern matching on operations with optional arguments/outputs we +// implement variants of the original ONNX dialect operations. The ONNX +// operations automatically generated by the `gen_doc.py` script and included +// in the `onnxop.inc` file have all optional arguments and outputs present. +// In the operations below we include the variants with missing operands +// or outputs. This decision affects only ONNX operations with optional +// arguments not ONNX operations with variadic operands. def ONNXFullGemmOp: ONNX_Op<"FullGemm", [NoSideEffect, DeclareOpInterfaceMethods]> {