• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===-- python_test_ops.td - Python test Op definitions ----*- tablegen -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef PYTHON_TEST_OPS
10#define PYTHON_TEST_OPS
11
12include "mlir/Bindings/Python/Attributes.td"
13include "mlir/IR/OpBase.td"
14
15def Python_Test_Dialect : Dialect {
16  let name = "python_test";
17  let cppNamespace = "PythonTest";
18}
19class TestOp<string mnemonic, list<OpTrait> traits = []>
20    : Op<Python_Test_Dialect, mnemonic, traits>;
21
22def AttributedOp : TestOp<"attributed_op"> {
23  let arguments = (ins I32Attr:$mandatory_i32,
24                   OptionalAttr<I32Attr>:$optional_i32,
25                   UnitAttr:$unit);
26}
27
28#endif // PYTHON_TEST_OPS
29