Skip to content
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
7 changes: 0 additions & 7 deletions src/mlir/Dialects/Triton.jl
Original file line number Diff line number Diff line change
Expand Up @@ -785,17 +785,12 @@ tensor. The input and indices tensors must have the same number of
dimension, and each dimension of the indices tensor that is not the gather
dimension cannot be greater than the corresponding dimension in the input
tensor.

The `efficient_layout` attribute is set when the compiler has determined an
optimized layout for the operation, indicating that it should not be
changed.
"""
function gather(
src::Value,
indices::Value;
result=nothing::Union{Nothing,IR.Type},
axis,
efficient_layout=nothing,
location=Location(),
)
op_ty_results = IR.Type[]
Expand All @@ -804,8 +799,6 @@ function gather(
successors = Block[]
attributes = NamedAttribute[namedattribute("axis", axis),]
!isnothing(result) && push!(op_ty_results, result)
!isnothing(efficient_layout) &&
push!(attributes, namedattribute("efficient_layout", efficient_layout))

return create_operation(
"tt.gather",
Expand Down
134 changes: 134 additions & 0 deletions src/mlir/libMLIR_h.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6903,6 +6903,140 @@ function mlirGetDialectHandle__emitc__()
@ccall mlir_c.mlirGetDialectHandle__emitc__()::MlirDialectHandle
end

@cenum MlirEmitCCmpPredicate::UInt64 begin
MLIR_EMITC_CMP_PREDICATE_EQ = 0x0000000000000000
MLIR_EMITC_CMP_PREDICATE_NE = 0x0000000000000001
MLIR_EMITC_CMP_PREDICATE_LT = 0x0000000000000002
MLIR_EMITC_CMP_PREDICATE_LE = 0x0000000000000003
MLIR_EMITC_CMP_PREDICATE_GT = 0x0000000000000004
MLIR_EMITC_CMP_PREDICATE_GE = 0x0000000000000005
MLIR_EMITC_CMP_PREDICATE_THREE_WAY = 0x0000000000000006
end

function mlirTypeIsAEmitCArrayType(type)
@ccall mlir_c.mlirTypeIsAEmitCArrayType(type::MlirType)::Bool
end

function mlirEmitCArrayTypeGetTypeID()
@ccall mlir_c.mlirEmitCArrayTypeGetTypeID()::MlirTypeID
end

function mlirEmitCArrayTypeGet(nDims, shape, elementType)
@ccall mlir_c.mlirEmitCArrayTypeGet(
nDims::intptr_t, shape::Ptr{Int64}, elementType::MlirType
)::MlirType
end

function mlirTypeIsAEmitCLValueType(type)
@ccall mlir_c.mlirTypeIsAEmitCLValueType(type::MlirType)::Bool
end

function mlirEmitCLValueTypeGetTypeID()
@ccall mlir_c.mlirEmitCLValueTypeGetTypeID()::MlirTypeID
end

function mlirEmitCLValueTypeGet(valueType)
@ccall mlir_c.mlirEmitCLValueTypeGet(valueType::MlirType)::MlirType
end

function mlirTypeIsAEmitCOpaqueType(type)
@ccall mlir_c.mlirTypeIsAEmitCOpaqueType(type::MlirType)::Bool
end

function mlirEmitCOpaqueTypeGetTypeID()
@ccall mlir_c.mlirEmitCOpaqueTypeGetTypeID()::MlirTypeID
end

function mlirEmitCOpaqueTypeGet(ctx, value)
@ccall mlir_c.mlirEmitCOpaqueTypeGet(ctx::MlirContext, value::MlirStringRef)::MlirType
end

function mlirTypeIsAEmitCPointerType(type)
@ccall mlir_c.mlirTypeIsAEmitCPointerType(type::MlirType)::Bool
end

function mlirEmitCPointerTypeGetTypeID()
@ccall mlir_c.mlirEmitCPointerTypeGetTypeID()::MlirTypeID
end

function mlirEmitCPointerTypeGet(pointee)
@ccall mlir_c.mlirEmitCPointerTypeGet(pointee::MlirType)::MlirType
end

function mlirTypeIsAEmitCPtrDiffTType(type)
@ccall mlir_c.mlirTypeIsAEmitCPtrDiffTType(type::MlirType)::Bool
end

function mlirEmitCPtrDiffTTypeGetTypeID()
@ccall mlir_c.mlirEmitCPtrDiffTTypeGetTypeID()::MlirTypeID
end

function mlirEmitCPtrDiffTTypeGet(ctx)
@ccall mlir_c.mlirEmitCPtrDiffTTypeGet(ctx::MlirContext)::MlirType
end

function mlirTypeIsAEmitCSignedSizeTType(type)
@ccall mlir_c.mlirTypeIsAEmitCSignedSizeTType(type::MlirType)::Bool
end

function mlirEmitCSignedSizeTTypeGetTypeID()
@ccall mlir_c.mlirEmitCSignedSizeTTypeGetTypeID()::MlirTypeID
end

function mlirEmitCSignedSizeTTypeGet(ctx)
@ccall mlir_c.mlirEmitCSignedSizeTTypeGet(ctx::MlirContext)::MlirType
end

function mlirTypeIsAEmitCSizeTType(type)
@ccall mlir_c.mlirTypeIsAEmitCSizeTType(type::MlirType)::Bool
end

function mlirEmitCSizeTTypeGetTypeID()
@ccall mlir_c.mlirEmitCSizeTTypeGetTypeID()::MlirTypeID
end

function mlirEmitCSizeTTypeGet(ctx)
@ccall mlir_c.mlirEmitCSizeTTypeGet(ctx::MlirContext)::MlirType
end

function mlirAttributeIsAEmitCCmpPredicate(attr)
@ccall mlir_c.mlirAttributeIsAEmitCCmpPredicate(attr::MlirAttribute)::Bool
end

function mlirEmitCCmpPredicateAttrGet(ctx, val)
@ccall mlir_c.mlirEmitCCmpPredicateAttrGet(
ctx::MlirContext, val::MlirEmitCCmpPredicate
)::MlirAttribute
end

function mlirEmitCCmpPredicateAttrGetValue(attr)
@ccall mlir_c.mlirEmitCCmpPredicateAttrGetValue(
attr::MlirAttribute
)::MlirEmitCCmpPredicate
end

function mlirEmitCCmpPredicateAttrGetTypeID()
@ccall mlir_c.mlirEmitCCmpPredicateAttrGetTypeID()::MlirTypeID
end

function mlirAttributeIsAEmitCOpaque(attr)
@ccall mlir_c.mlirAttributeIsAEmitCOpaque(attr::MlirAttribute)::Bool
end

function mlirEmitCOpaqueAttrGet(ctx, value)
@ccall mlir_c.mlirEmitCOpaqueAttrGet(
ctx::MlirContext, value::MlirStringRef
)::MlirAttribute
end

function mlirEmitCOpaqueAttrGetValue(attr)
@ccall mlir_c.mlirEmitCOpaqueAttrGetValue(attr::MlirAttribute)::MlirStringRef
end

function mlirEmitCOpaqueAttrGetTypeID()
@ccall mlir_c.mlirEmitCOpaqueAttrGetTypeID()::MlirTypeID
end

function mlirGetDialectHandle__func__()
@ccall mlir_c.mlirGetDialectHandle__func__()::MlirDialectHandle
end
Expand Down