Skip to content

Commit 2e95b10

Browse files
Regenerate MLIR Bindings (#1541)
Co-authored-by: enzyme-ci-bot[bot] <78882869+enzyme-ci-bot[bot]@users.noreply.github.com>
1 parent f85ac76 commit 2e95b10

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

src/mlir/Dialects/Gpu.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,7 +1932,7 @@ end
19321932
`rotate`
19331933
19341934
The \"rotate\" op moves values across lanes in a subgroup (a.k.a., local
1935-
invocations) within the same subgroup. The `width` argument specifies the
1935+
invocations) within the same subgroup. The `width` attribute specifies the
19361936
number of lanes that participate in the rotation, and must be uniform across
19371937
all participating lanes. Further, the first `width` lanes of the subgroup
19381938
must be active.
@@ -1953,26 +1953,26 @@ Returns the `rotateResult` and `true` if the current lane id is smaller than
19531953
example:
19541954
19551955
```mlir
1956-
%offset = arith.constant 1 : i32
1957-
%width = arith.constant 16 : i32
1958-
%1, %2 = gpu.rotate %0, %offset, %width : f32
1956+
%1, %2 = gpu.rotate %0, 1, 16 : f32
19591957
```
19601958
19611959
For lane `k`, returns the value from lane `(k + cst1) % width`.
19621960
"""
19631961
function rotate(
1964-
value::Value,
1965-
offset::Value,
1966-
width::Value;
1962+
value::Value;
19671963
rotateResult=nothing::Union{Nothing,IR.Type},
19681964
valid=nothing::Union{Nothing,IR.Type},
1965+
offset,
1966+
width,
19691967
location=Location(),
19701968
)
19711969
op_ty_results = IR.Type[]
1972-
operands = Value[value, offset, width]
1970+
operands = Value[value,]
19731971
owned_regions = Region[]
19741972
successors = Block[]
1975-
attributes = NamedAttribute[]
1973+
attributes = NamedAttribute[
1974+
namedattribute("offset", offset), namedattribute("width", width)
1975+
]
19761976
!isnothing(rotateResult) && push!(op_ty_results, rotateResult)
19771977
!isnothing(valid) && push!(op_ty_results, valid)
19781978

src/mlir/libMLIR_h.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,6 +1710,17 @@ function mlirOperationMoveBefore(op, other)
17101710
@ccall mlir_c.mlirOperationMoveBefore(op::MlirOperation, other::MlirOperation)::Cvoid
17111711
end
17121712

1713+
"""
1714+
mlirOperationIsBeforeInBlock(op, other)
1715+
1716+
Given an operation 'other' that is within the same parent block, return whether the current operation is before 'other' in the operation list of the parent block. Note: This function has an average complexity of O(1), but worst case may take O(N) where N is the number of operations within the parent block.
1717+
"""
1718+
function mlirOperationIsBeforeInBlock(op, other)
1719+
@ccall mlir_c.mlirOperationIsBeforeInBlock(
1720+
op::MlirOperation, other::MlirOperation
1721+
)::Bool
1722+
end
1723+
17131724
"""
17141725
MlirWalkResult
17151726

0 commit comments

Comments
 (0)