mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-01 12:43:47 +00:00
[mlir][linalg][transform][python] Allow no args in MaskedVectorize. (#66541)
The mix-in of this op did not allow to pass in no argument. This special case is now handled correctly and covered by the tests.
This commit is contained in:
parent
159e94a0c3
commit
86ddbdd3e7
@ -366,7 +366,7 @@ class MaskedVectorizeOp:
|
||||
def __init__(
|
||||
self,
|
||||
target: Union[Operation, OpView, Value],
|
||||
vector_sizes: Union[DynamicIndexList, ArrayAttr],
|
||||
vector_sizes: Optional[Union[DynamicIndexList, ArrayAttr]] = None,
|
||||
*,
|
||||
vectorize_nd_extract: Optional[bool] = None,
|
||||
scalable_sizes: OptionalBoolList = None,
|
||||
@ -374,7 +374,13 @@ class MaskedVectorizeOp:
|
||||
loc=None,
|
||||
ip=None,
|
||||
):
|
||||
if scalable_sizes is None and static_vector_sizes is None:
|
||||
if (
|
||||
scalable_sizes is None
|
||||
and static_vector_sizes is None
|
||||
and vector_sizes is None
|
||||
):
|
||||
dynamic_vector_sizes = []
|
||||
elif scalable_sizes is None and static_vector_sizes is None:
|
||||
(
|
||||
dynamic_vector_sizes,
|
||||
static_vector_sizes,
|
||||
|
@ -169,6 +169,16 @@ def testMatchOpNamesList(target):
|
||||
# CHECK-SAME: (!transform.any_op) -> !transform.any_op
|
||||
|
||||
|
||||
@run
|
||||
@create_sequence
|
||||
def testMaskedVectorizeNoArgs(target):
|
||||
structured.MaskedVectorizeOp(target)
|
||||
# CHECK-LABEL: TEST: testMaskedVectorizeNoArgs
|
||||
# CHECK: transform.sequence
|
||||
# CHECK: transform.structured.masked_vectorize
|
||||
# CHECK-NOT: vector_sizes
|
||||
|
||||
|
||||
@run
|
||||
@create_sequence
|
||||
def testMaskedVectorizeStatic(target):
|
||||
|
Loading…
x
Reference in New Issue
Block a user