Skip to content

Regenerate MLIR Bindings #1541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/mlir/Dialects/Gpu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1932,7 +1932,7 @@ end
`rotate`

The \"rotate\" op moves values across lanes in a subgroup (a.k.a., local
invocations) within the same subgroup. The `width` argument specifies the
invocations) within the same subgroup. The `width` attribute specifies the
number of lanes that participate in the rotation, and must be uniform across
all participating lanes. Further, the first `width` lanes of the subgroup
must be active.
Expand All @@ -1953,26 +1953,26 @@ Returns the `rotateResult` and `true` if the current lane id is smaller than
example:

```mlir
%offset = arith.constant 1 : i32
%width = arith.constant 16 : i32
%1, %2 = gpu.rotate %0, %offset, %width : f32
%1, %2 = gpu.rotate %0, 1, 16 : f32
```

For lane `k`, returns the value from lane `(k + cst1) % width`.
"""
function rotate(
value::Value,
offset::Value,
width::Value;
value::Value;
rotateResult=nothing::Union{Nothing,IR.Type},
valid=nothing::Union{Nothing,IR.Type},
offset,
width,
location=Location(),
)
op_ty_results = IR.Type[]
operands = Value[value, offset, width]
operands = Value[value,]
owned_regions = Region[]
successors = Block[]
attributes = NamedAttribute[]
attributes = NamedAttribute[
namedattribute("offset", offset), namedattribute("width", width)
]
!isnothing(rotateResult) && push!(op_ty_results, rotateResult)
!isnothing(valid) && push!(op_ty_results, valid)

Expand Down
11 changes: 11 additions & 0 deletions src/mlir/libMLIR_h.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1710,6 +1710,17 @@ function mlirOperationMoveBefore(op, other)
@ccall mlir_c.mlirOperationMoveBefore(op::MlirOperation, other::MlirOperation)::Cvoid
end

"""
mlirOperationIsBeforeInBlock(op, other)

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.
"""
function mlirOperationIsBeforeInBlock(op, other)
@ccall mlir_c.mlirOperationIsBeforeInBlock(
op::MlirOperation, other::MlirOperation
)::Bool
end

"""
MlirWalkResult

Expand Down