Skip to content

Commit 52c17c2

Browse files
Regenerate MLIR Bindings (#1139)
Co-authored-by: enzyme-ci-bot[bot] <78882869+enzyme-ci-bot[bot]@users.noreply.github.com>
1 parent 23cd15f commit 52c17c2

File tree

1 file changed

+275
-22
lines changed

1 file changed

+275
-22
lines changed

src/mlir/libMLIR_h.jl

Lines changed: 275 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,6 @@ struct MlirDialectRegistry
260260
ptr::Ptr{Cvoid}
261261
end
262262

263-
"""
264-
MlirOperation
265-
"""
266263
struct MlirOperation
267264
ptr::Ptr{Cvoid}
268265
end
@@ -287,9 +284,6 @@ struct MlirSymbolTable
287284
ptr::Ptr{Cvoid}
288285
end
289286

290-
"""
291-
MlirAttribute
292-
"""
293287
struct MlirAttribute
294288
ptr::Ptr{Cvoid}
295289
end
@@ -298,10 +292,6 @@ struct MlirIdentifier
298292
ptr::Ptr{Cvoid}
299293
end
300294

301-
"""
302-
MlirLocation
303-
A location in MLIR.
304-
"""
305295
struct MlirLocation
306296
ptr::Ptr{Cvoid}
307297
end
@@ -310,10 +300,6 @@ struct MlirModule
310300
ptr::Ptr{Cvoid}
311301
end
312302

313-
"""
314-
MlirType
315-
A type in MLIR.
316-
"""
317303
struct MlirType
318304
ptr::Ptr{Cvoid}
319305
end
@@ -3372,7 +3358,7 @@ end
33723358
"""
33733359
mlirIntegerSetIsCanonicalEmpty(set)
33743360
3375-
Checks whether the given set is a canonical empty set, e.g., the set returned by [`Reactant.MLIR.API.mlirIntegerSetEmptyGet`](@ref).
3361+
Checks whether the given set is a canonical empty set, e.g., the set returned by [`mlirIntegerSetEmptyGet`](@ref).
33763362
"""
33773363
function mlirIntegerSetIsCanonicalEmpty(set)
33783364
@ccall mlir_c.mlirIntegerSetIsCanonicalEmpty(set::MlirIntegerSet)::Bool
@@ -5727,7 +5713,7 @@ end
57275713
"""
57285714
mlirRankedTensorTypeGet(rank, shape, elementType, encoding)
57295715
5730-
Creates a tensor type of a fixed rank with the given shape, element type, and optional encoding in the same context as the element type. The type is owned by the context. Tensor types without any specific encoding field should assign [`Reactant.MLIR.API.mlirAttributeGetNull`](@ref)() to this parameter.
5716+
Creates a tensor type of a fixed rank with the given shape, element type, and optional encoding in the same context as the element type. The type is owned by the context. Tensor types without any specific encoding field should assign [`mlirAttributeGetNull`](@ref)() to this parameter.
57315717
"""
57325718
function mlirRankedTensorTypeGet(rank, shape, elementType, encoding)
57335719
@ccall mlir_c.mlirRankedTensorTypeGet(
@@ -7355,6 +7341,48 @@ function mlirLinalgFillBuiltinNamedOpRegion(mlirOp)
73557341
@ccall mlir_c.mlirLinalgFillBuiltinNamedOpRegion(mlirOp::MlirOperation)::Cvoid
73567342
end
73577343

7344+
function mlirLinalgIsAContractionOp(op)
7345+
@ccall mlir_c.mlirLinalgIsAContractionOp(op::MlirOperation)::Bool
7346+
end
7347+
7348+
struct MlirLinalgContractionDimensions
7349+
batch::MlirAttribute
7350+
m::MlirAttribute
7351+
n::MlirAttribute
7352+
k::MlirAttribute
7353+
end
7354+
7355+
function mlirLinalgInferContractionDimensions(op)
7356+
@ccall mlir_c.mlirLinalgInferContractionDimensions(
7357+
op::MlirOperation
7358+
)::MlirLinalgContractionDimensions
7359+
end
7360+
7361+
function mlirLinalgIsAConvolutionOp(op)
7362+
@ccall mlir_c.mlirLinalgIsAConvolutionOp(op::MlirOperation)::Bool
7363+
end
7364+
7365+
struct MlirLinalgConvolutionDimensions
7366+
batch::MlirAttribute
7367+
outputImage::MlirAttribute
7368+
outputChannel::MlirAttribute
7369+
filterLoop::MlirAttribute
7370+
inputChannel::MlirAttribute
7371+
depth::MlirAttribute
7372+
strides::MlirAttribute
7373+
dilations::MlirAttribute
7374+
end
7375+
7376+
function mlirLinalgInferConvolutionDimensions(op)
7377+
@ccall mlir_c.mlirLinalgInferConvolutionDimensions(
7378+
op::MlirOperation
7379+
)::MlirLinalgConvolutionDimensions
7380+
end
7381+
7382+
function mlirLinalgGetIndexingMapsAttribute(op)
7383+
@ccall mlir_c.mlirLinalgGetIndexingMapsAttribute(op::MlirOperation)::MlirAttribute
7384+
end
7385+
73587386
function mlirGetDialectHandle__linalg__()
73597387
@ccall mlir_c.mlirGetDialectHandle__linalg__()::MlirDialectHandle
73607388
end
@@ -7941,6 +7969,208 @@ function mlirGetDialectHandle__scf__()
79417969
@ccall mlir_c.mlirGetDialectHandle__scf__()::MlirDialectHandle
79427970
end
79437971

7972+
function mlirGetDialectHandle__smt__()
7973+
@ccall mlir_c.mlirGetDialectHandle__smt__()::MlirDialectHandle
7974+
end
7975+
7976+
"""
7977+
mlirSMTTypeIsAnyNonFuncSMTValueType(type)
7978+
7979+
Checks if the given type is any non-func SMT value type.
7980+
"""
7981+
function mlirSMTTypeIsAnyNonFuncSMTValueType(type)
7982+
@ccall mlir_c.mlirSMTTypeIsAnyNonFuncSMTValueType(type::MlirType)::Bool
7983+
end
7984+
7985+
"""
7986+
mlirSMTTypeIsAnySMTValueType(type)
7987+
7988+
Checks if the given type is any SMT value type.
7989+
"""
7990+
function mlirSMTTypeIsAnySMTValueType(type)
7991+
@ccall mlir_c.mlirSMTTypeIsAnySMTValueType(type::MlirType)::Bool
7992+
end
7993+
7994+
"""
7995+
mlirSMTTypeIsAArray(type)
7996+
7997+
Checks if the given type is a smt::ArrayType.
7998+
"""
7999+
function mlirSMTTypeIsAArray(type)
8000+
@ccall mlir_c.mlirSMTTypeIsAArray(type::MlirType)::Bool
8001+
end
8002+
8003+
"""
8004+
mlirSMTTypeGetArray(ctx, domainType, rangeType)
8005+
8006+
Creates an array type with the given domain and range types.
8007+
"""
8008+
function mlirSMTTypeGetArray(ctx, domainType, rangeType)
8009+
@ccall mlir_c.mlirSMTTypeGetArray(
8010+
ctx::MlirContext, domainType::MlirType, rangeType::MlirType
8011+
)::MlirType
8012+
end
8013+
8014+
"""
8015+
mlirSMTTypeIsABitVector(type)
8016+
8017+
Checks if the given type is a smt::BitVectorType.
8018+
"""
8019+
function mlirSMTTypeIsABitVector(type)
8020+
@ccall mlir_c.mlirSMTTypeIsABitVector(type::MlirType)::Bool
8021+
end
8022+
8023+
"""
8024+
mlirSMTTypeGetBitVector(ctx, width)
8025+
8026+
Creates a smt::BitVectorType with the given width.
8027+
"""
8028+
function mlirSMTTypeGetBitVector(ctx, width)
8029+
@ccall mlir_c.mlirSMTTypeGetBitVector(ctx::MlirContext, width::Int32)::MlirType
8030+
end
8031+
8032+
"""
8033+
mlirSMTTypeIsABool(type)
8034+
8035+
Checks if the given type is a smt::BoolType.
8036+
"""
8037+
function mlirSMTTypeIsABool(type)
8038+
@ccall mlir_c.mlirSMTTypeIsABool(type::MlirType)::Bool
8039+
end
8040+
8041+
"""
8042+
mlirSMTTypeGetBool(ctx)
8043+
8044+
Creates a smt::BoolType.
8045+
"""
8046+
function mlirSMTTypeGetBool(ctx)
8047+
@ccall mlir_c.mlirSMTTypeGetBool(ctx::MlirContext)::MlirType
8048+
end
8049+
8050+
"""
8051+
mlirSMTTypeIsAInt(type)
8052+
8053+
Checks if the given type is a smt::IntType.
8054+
"""
8055+
function mlirSMTTypeIsAInt(type)
8056+
@ccall mlir_c.mlirSMTTypeIsAInt(type::MlirType)::Bool
8057+
end
8058+
8059+
"""
8060+
mlirSMTTypeGetInt(ctx)
8061+
8062+
Creates a smt::IntType.
8063+
"""
8064+
function mlirSMTTypeGetInt(ctx)
8065+
@ccall mlir_c.mlirSMTTypeGetInt(ctx::MlirContext)::MlirType
8066+
end
8067+
8068+
"""
8069+
mlirSMTTypeIsASMTFunc(type)
8070+
8071+
Checks if the given type is a smt::FuncType.
8072+
"""
8073+
function mlirSMTTypeIsASMTFunc(type)
8074+
@ccall mlir_c.mlirSMTTypeIsASMTFunc(type::MlirType)::Bool
8075+
end
8076+
8077+
"""
8078+
mlirSMTTypeGetSMTFunc(ctx, numberOfDomainTypes, domainTypes, rangeType)
8079+
8080+
Creates a smt::FuncType with the given domain and range types.
8081+
"""
8082+
function mlirSMTTypeGetSMTFunc(ctx, numberOfDomainTypes, domainTypes, rangeType)
8083+
@ccall mlir_c.mlirSMTTypeGetSMTFunc(
8084+
ctx::MlirContext,
8085+
numberOfDomainTypes::Csize_t,
8086+
domainTypes::Ptr{MlirType},
8087+
rangeType::MlirType,
8088+
)::MlirType
8089+
end
8090+
8091+
"""
8092+
mlirSMTTypeIsASort(type)
8093+
8094+
Checks if the given type is a smt::SortType.
8095+
"""
8096+
function mlirSMTTypeIsASort(type)
8097+
@ccall mlir_c.mlirSMTTypeIsASort(type::MlirType)::Bool
8098+
end
8099+
8100+
"""
8101+
mlirSMTTypeGetSort(ctx, identifier, numberOfSortParams, sortParams)
8102+
8103+
Creates a smt::SortType with the given identifier and sort parameters.
8104+
"""
8105+
function mlirSMTTypeGetSort(ctx, identifier, numberOfSortParams, sortParams)
8106+
@ccall mlir_c.mlirSMTTypeGetSort(
8107+
ctx::MlirContext,
8108+
identifier::MlirIdentifier,
8109+
numberOfSortParams::Csize_t,
8110+
sortParams::Ptr{MlirType},
8111+
)::MlirType
8112+
end
8113+
8114+
"""
8115+
mlirSMTAttrCheckBVCmpPredicate(ctx, str)
8116+
8117+
Checks if the given string is a valid smt::BVCmpPredicate.
8118+
"""
8119+
function mlirSMTAttrCheckBVCmpPredicate(ctx, str)
8120+
@ccall mlir_c.mlirSMTAttrCheckBVCmpPredicate(ctx::MlirContext, str::MlirStringRef)::Bool
8121+
end
8122+
8123+
"""
8124+
mlirSMTAttrCheckIntPredicate(ctx, str)
8125+
8126+
Checks if the given string is a valid smt::IntPredicate.
8127+
"""
8128+
function mlirSMTAttrCheckIntPredicate(ctx, str)
8129+
@ccall mlir_c.mlirSMTAttrCheckIntPredicate(ctx::MlirContext, str::MlirStringRef)::Bool
8130+
end
8131+
8132+
"""
8133+
mlirSMTAttrIsASMTAttribute(attr)
8134+
8135+
Checks if the given attribute is a smt::SMTAttribute.
8136+
"""
8137+
function mlirSMTAttrIsASMTAttribute(attr)
8138+
@ccall mlir_c.mlirSMTAttrIsASMTAttribute(attr::MlirAttribute)::Bool
8139+
end
8140+
8141+
"""
8142+
mlirSMTAttrGetBitVector(ctx, value, width)
8143+
8144+
Creates a smt::BitVectorAttr with the given value and width.
8145+
"""
8146+
function mlirSMTAttrGetBitVector(ctx, value, width)
8147+
@ccall mlir_c.mlirSMTAttrGetBitVector(
8148+
ctx::MlirContext, value::UInt64, width::Cuint
8149+
)::MlirAttribute
8150+
end
8151+
8152+
"""
8153+
mlirSMTAttrGetBVCmpPredicate(ctx, str)
8154+
8155+
Creates a smt::BVCmpPredicateAttr with the given string.
8156+
"""
8157+
function mlirSMTAttrGetBVCmpPredicate(ctx, str)
8158+
@ccall mlir_c.mlirSMTAttrGetBVCmpPredicate(
8159+
ctx::MlirContext, str::MlirStringRef
8160+
)::MlirAttribute
8161+
end
8162+
8163+
"""
8164+
mlirSMTAttrGetIntPredicate(ctx, str)
8165+
8166+
Creates a smt::IntPredicateAttr with the given string.
8167+
"""
8168+
function mlirSMTAttrGetIntPredicate(ctx, str)
8169+
@ccall mlir_c.mlirSMTAttrGetIntPredicate(
8170+
ctx::MlirContext, str::MlirStringRef
8171+
)::MlirAttribute
8172+
end
8173+
79448174
function mlirGetDialectHandle__spirv__()
79458175
@ccall mlir_c.mlirGetDialectHandle__spirv__()::MlirDialectHandle
79468176
end
@@ -8507,9 +8737,6 @@ function mlirInferShapedTypeOpInterfaceInferReturnTypes(
85078737
)::MlirLogicalResult
85088738
end
85098739

8510-
"""
8511-
MlirPass
8512-
"""
85138740
struct MlirPass
85148741
ptr::Ptr{Cvoid}
85158742
end
@@ -9247,6 +9474,35 @@ function mlirApplyPatternsAndFoldGreedily(op, patterns, arg3)
92479474
)::MlirLogicalResult
92489475
end
92499476

9477+
"""
9478+
mlirTranslateModuleToSMTLIB(arg1, arg2, userData, inlineSingleUseValues, indentLetBody)
9479+
9480+
Emits SMTLIB for the specified module using the provided callback and user data
9481+
"""
9482+
function mlirTranslateModuleToSMTLIB(
9483+
arg1, arg2, userData, inlineSingleUseValues, indentLetBody
9484+
)
9485+
@ccall mlir_c.mlirTranslateModuleToSMTLIB(
9486+
arg1::MlirModule,
9487+
arg2::MlirStringCallback,
9488+
userData::Ptr{Cvoid},
9489+
inlineSingleUseValues::Bool,
9490+
indentLetBody::Bool,
9491+
)::MlirLogicalResult
9492+
end
9493+
9494+
function mlirTranslateOperationToSMTLIB(
9495+
arg1, arg2, userData, inlineSingleUseValues, indentLetBody
9496+
)
9497+
@ccall mlir_c.mlirTranslateOperationToSMTLIB(
9498+
arg1::MlirOperation,
9499+
arg2::MlirStringCallback,
9500+
userData::Ptr{Cvoid},
9501+
inlineSingleUseValues::Bool,
9502+
indentLetBody::Bool,
9503+
)::MlirLogicalResult
9504+
end
9505+
92509506
"""
92519507
` LLVMCSupportTypes Types and Enumerations`
92529508
@@ -10618,7 +10874,4 @@ function sdyManualAxesAttrGetAxesElem(attr, pos)
1061810874
)::MlirStringRef
1061910875
end
1062010876

10621-
"""
10622-
MLIR_CAPI_DWARF_ADDRESS_SPACE_NULL
10623-
"""
1062410877
const MLIR_CAPI_DWARF_ADDRESS_SPACE_NULL = -1

0 commit comments

Comments
 (0)