Skip to content

Commit 0c4aad0

Browse files
committed
Revert "[mlir][linalg][transform][python] Add mix-in for BufferizeToAllocOp."
This reverts commit 20966fc. Bot is broken https://lab.llvm.org/buildbot/#/builders/61/builds/47577
1 parent 0c3a02b commit 0c4aad0

File tree

2 files changed

+0
-70
lines changed

2 files changed

+0
-70
lines changed

mlir/python/mlir/dialects/_structured_transform_ops_ext.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -84,40 +84,6 @@ def _get_int_int_array_attr(
8484
return ArrayAttr.get(values)
8585

8686

87-
class BufferizeToAllocationOp:
88-
"""Specialization for BufferizeToAllocationOp class."""
89-
90-
def __init__(
91-
self,
92-
target: Union[Operation, OpView, Value],
93-
*,
94-
memory_space: Optional[int | str | Attribute] = None,
95-
memcpy_op: Optional[str] = None,
96-
alloc_op: Optional[str] = None,
97-
bufferize_destination_only: Optional[bool] = None,
98-
loc=None,
99-
ip=None,
100-
):
101-
# No other types are allowed, so hard-code those here.
102-
allocated_buffer_type = transform.AnyValueType.get()
103-
new_ops_type = transform.AnyOpType.get()
104-
105-
if isinstance(memory_space, int):
106-
memory_space = str(memory_space)
107-
if isinstance(memory_space, str):
108-
memory_space = Attribute.parse(memory_space)
109-
110-
super().__init__(
111-
allocated_buffer_type,
112-
new_ops_type,
113-
target,
114-
memory_space=memory_space,
115-
memcpy_op=memcpy_op,
116-
alloc_op=alloc_op,
117-
bufferize_destination_only=bufferize_destination_only,
118-
)
119-
120-
12187
class DecomposeOp:
12288
"""Specialization for DecomposeOp class."""
12389

mlir/test/python/dialects/transform_structured_ext.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,6 @@ def run(f):
1818
return f
1919

2020

21-
@run
22-
def testBufferizeToAllocationOpCompact():
23-
sequence = transform.SequenceOp(
24-
transform.FailurePropagationMode.PROPAGATE, [], pdl.OperationType.get()
25-
)
26-
with InsertionPoint(sequence.body):
27-
structured.BufferizeToAllocationOp(sequence.bodyTarget)
28-
transform.YieldOp()
29-
# CHECK-LABEL: TEST: testBufferizeToAllocationOpCompact
30-
# CHECK: transform.sequence
31-
# CHECK: transform.structured.bufferize_to_allocation
32-
33-
34-
@run
35-
def testBufferizeToAllocationOpArgs():
36-
sequence = transform.SequenceOp(
37-
transform.FailurePropagationMode.PROPAGATE, [], pdl.OperationType.get()
38-
)
39-
with InsertionPoint(sequence.body):
40-
structured.BufferizeToAllocationOp(
41-
sequence.bodyTarget,
42-
memory_space=3,
43-
memcpy_op="memref.copy",
44-
alloc_op="memref.alloca",
45-
bufferize_destination_only=True,
46-
)
47-
transform.YieldOp()
48-
# CHECK-LABEL: TEST: testBufferizeToAllocationOpArgs
49-
# CHECK: transform.sequence
50-
# CHECK: transform.structured.bufferize_to_allocation
51-
# CHECK-SAME: alloc_op = "memref.alloca"
52-
# CHECK-SAME: bufferize_destination_only
53-
# CHECK-SAME: memcpy_op = "memref.copy"
54-
# CHECK-SAME: memory_space = 3
55-
56-
5721
@run
5822
def testDecompose():
5923
sequence = transform.SequenceOp(

0 commit comments

Comments
 (0)