From 67879b22040dca1bd99989549ab809805c9e660d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?= Date: Tue, 8 Oct 2024 23:49:21 -0400 Subject: [PATCH] Format code --- src/IR/Attribute.jl | 18 +++++++++--------- src/IR/Pass.jl | 12 ++++++------ src/IR/Type.jl | 24 ++++++++++++------------ 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/IR/Attribute.jl b/src/IR/Attribute.jl index 92dbd1e8..e8195e5d 100644 --- a/src/IR/Attribute.jl +++ b/src/IR/Attribute.jl @@ -614,10 +614,10 @@ end # TODO mlirDenseElementsAttrGetRawData """ - isopaqueelements(attr) + isopaqueelements(attr) - Checks whether the given attribute is an opaque elements attribute. - """ +Checks whether the given attribute is an opaque elements attribute. +""" function isopaqueelements(attr::Attribute) MLIR_VERSION[] >= v"15" || throw( MLIRException("`isopaqueelements(::Attribute)` requires MLIR version 15 or later"), @@ -637,10 +637,10 @@ issparseelements(attr::Attribute) = API.mlirAttributeIsASparseElements(attr) # TODO mlirSparseElementsAttrGetValues """ - isdensearray(attr, ::Core.Type{T}) + isdensearray(attr, ::Core.Type{T}) - Checks whether the given attribute is a dense array attribute. - """ +Checks whether the given attribute is a dense array attribute. +""" function isdensearray end function isdensearray(attr::Attribute, ::Core.Type{Bool}) @@ -707,10 +707,10 @@ function isdensearray(attr::Attribute, ::Core.Type{Float64}) end """ - DenseArrayAttribute(array; context=context()) + DenseArrayAttribute(array; context=context()) - Create a dense array attribute with the given elements. - """ +Create a dense array attribute with the given elements. +""" function DenseArrayAttribute end function DenseArrayAttribute(values::AbstractArray{Bool}; context::Context=context()) diff --git a/src/IR/Pass.jl b/src/IR/Pass.jl index e8441076..1ca2fdb3 100644 --- a/src/IR/Pass.jl +++ b/src/IR/Pass.jl @@ -26,10 +26,10 @@ Create a new top-level PassManager. PassManager(; context::Context=context()) = PassManager(API.mlirPassManagerCreate(context)) """ - PassManager(anchorOp; context=context()) + PassManager(anchorOp; context=context()) - Create a new top-level PassManager anchored on `anchorOp`. - """ +Create a new top-level PassManager anchored on `anchorOp`. +""" function PassManager(anchor_op::Operation; context::Context=context()) MLIR_VERSION[] >= v"16" || throw(MLIRException("`PassManager(::Operation)` requires MLIR version 16 or later")) @@ -173,10 +173,10 @@ function Base.parse(opm::OpPassManager, pipeline::String) end """ - add_pipeline!(passManager, pipelineElements, callback, userData) + add_pipeline!(passManager, pipelineElements, callback, userData) - Parse a sequence of textual MLIR pass pipeline elements and add them to the provided OpPassManager. If parsing fails an error message is reported using the provided callback. - """ +Parse a sequence of textual MLIR pass pipeline elements and add them to the provided OpPassManager. If parsing fails an error message is reported using the provided callback. +""" function add_pipeline!(op_pass::OpPassManager, pipeline) if MLIR_VERSION[] >= v"16" io = IOBuffer() diff --git a/src/IR/Type.jl b/src/IR/Type.jl index e52ef001..a62c2925 100644 --- a/src/IR/Type.jl +++ b/src/IR/Type.jl @@ -141,10 +141,10 @@ end # Floating point types """ - Float8E5M2(; context=context()) + Float8E5M2(; context=context()) - Creates an f8E5M2 type in the given context. The type is owned by the context. - """ +Creates an f8E5M2 type in the given context. The type is owned by the context. +""" function Float8E5M2(; context::Context=context()) MLIR_VERSION[] >= v"16" || throw(MLIRException("`Float8E5M2()` requires MLIR version 16 or later")) @@ -152,10 +152,10 @@ function Float8E5M2(; context::Context=context()) end """ - Float8E4M3FN(; context=context()) + Float8E4M3FN(; context=context()) - Creates an f8E4M3FN type in the given context. The type is owned by the context. - """ +Creates an f8E4M3FN type in the given context. The type is owned by the context. +""" function Float8E4M3FN(; context::Context=context()) MLIR_VERSION[] >= v"16" || throw(MLIRException("`Float8E4M3FN()` requires MLIR version 16 or later")) @@ -191,10 +191,10 @@ Creates a f64 type in the given context. The type is owned by the context. Type(::Core.Type{Float64}; context::Context=context()) = Type(API.mlirF64TypeGet(context)) """ - isf8e5m2(type) + isf8e5m2(type) - Checks whether the given type is an f8E5M2 type. - """ +Checks whether the given type is an f8E5M2 type. +""" function isf8e5m2(type::Type) MLIR_VERSION[] >= v"16" || throw(MLIRException("`isf8e5m2()` requires MLIR version 16 or later")) @@ -202,10 +202,10 @@ function isf8e5m2(type::Type) end """ - isf8e4m3fn(type) + isf8e4m3fn(type) - Checks whether the given type is an f8E4M3FN type. - """ +Checks whether the given type is an f8E4M3FN type. +""" function isf8e4m3fn(type::Type) MLIR_VERSION[] >= v"16" || throw(MLIRException("`isf8e4m3fn()` requires MLIR version 16 or later"))