Skip to content

Commit a4496d2

Browse files
committed
Fix Python type annotations
1 parent 9508fa1 commit a4496d2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mlir/python/mlir/extras/types.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

55
from functools import partial
6-
from typing import Optional, List
6+
from typing import Optional, List, Union
77

88
from ..ir import (
99
Attribute,
10+
AffineMapAttr,
1011
BF16Type,
1112
ComplexType,
1213
ContiguousLayoutAttr,
@@ -153,7 +154,9 @@ def memref(
153154
*shape,
154155
element_type: Type = None,
155156
memory_space: Optional[int] = None,
156-
layout: Optional[ContiguousLayoutAttr | StridedLayoutAttr] = None,
157+
layout: Optional[
158+
Union[ContiguousLayoutAttr, StridedLayoutAttr, AffineMapAttr]
159+
] = None,
157160
):
158161
if memory_space is not None:
159162
memory_space = Attribute.parse(str(memory_space))

0 commit comments

Comments
 (0)