Skip to content

Commit 3d6029d

Browse files
committed
[mlir][python] smaller scope for vector enumgen
Don't generate enums from the main VectorOps.td file as that transitively includes enums from Arith.
1 parent 0495cd8 commit 3d6029d

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

mlir/python/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,8 @@ declare_mlir_dialect_python_bindings(
381381
TD_FILE dialects/VectorOps.td
382382
SOURCES dialects/vector.py
383383
DIALECT_NAME vector
384-
GEN_ENUM_BINDINGS)
384+
GEN_ENUM_BINDINGS_TD_FILE
385+
"dialects/VectorAttributes.td")
385386

386387
################################################################################
387388
# Python extensions.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//===-- VectorAttributes.td - Entry point for bindings -----*- 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_BINDINGS_VECTOR_ATTRDEFS_TD
10+
#define PYTHON_BINDINGS_VECTOR_ATTRDEFS_TD
11+
12+
include "mlir/Dialect/Vector/IR/VectorAttributes.td"
13+
14+
#endif // PYTHON_BINDINGS_VECTOR_ATTRDEFS_TD

0 commit comments

Comments
 (0)