Affine
affine
Affine = Dialect('affine', [ApplyOp, ForOp, ParallelOp, IfOp, StoreOp, LoadOp, MinOp, YieldOp], [])
module-attribute
ApplyOp
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
name = 'affine.apply'
class-attribute
instance-attribute
mapOperands = var_operand_def(IndexType)
class-attribute
instance-attribute
map = prop_def(AffineMapAttr)
class-attribute
instance-attribute
result = result_def(IndexType)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(map_operands: Sequence[SSAValue], affine_map: AffineMapAttr)
Source code in xdsl/dialects/affine.py
58 59 60 61 62 63 | |
verify_() -> None
Source code in xdsl/dialects/affine.py
65 66 67 68 69 70 71 72 73 74 | |
parse(parser: Parser) -> ApplyOp
classmethod
Source code in xdsl/dialects/affine.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
print(printer: Printer)
Source code in xdsl/dialects/affine.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
ForOp
dataclass
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
name = 'affine.for'
class-attribute
instance-attribute
lowerBoundOperands = var_operand_def(IndexType)
class-attribute
instance-attribute
upperBoundOperands = var_operand_def(IndexType)
class-attribute
instance-attribute
inits = var_operand_def()
class-attribute
instance-attribute
res = var_result_def()
class-attribute
instance-attribute
lowerBoundMap = prop_def(AffineMapAttr)
class-attribute
instance-attribute
upperBoundMap = prop_def(AffineMapAttr)
class-attribute
instance-attribute
step = prop_def(IntegerAttr)
class-attribute
instance-attribute
body = region_def()
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
verify_() -> None
Source code in xdsl/dialects/affine.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
from_region(lowerBoundOperands: Sequence[Operation | SSAValue], upperBoundOperands: Sequence[Operation | SSAValue], inits: Sequence[Operation | SSAValue], result_types: Sequence[Attribute], lower_bound: int | AffineMapAttr, upper_bound: int | AffineMapAttr, region: Region, step: int | IntegerAttr = 1) -> ForOp
staticmethod
Source code in xdsl/dialects/affine.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
IfOp
dataclass
Bases: IRDLOperation
See external documentation.
Source code in xdsl/dialects/affine.py
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | |
name = 'affine.if'
class-attribute
instance-attribute
args = var_operand_def(IndexType)
class-attribute
instance-attribute
res = var_result_def()
class-attribute
instance-attribute
condition = prop_def(AffineSetAttr)
class-attribute
instance-attribute
then_region = region_def('single_block')
class-attribute
instance-attribute
else_region = region_def()
class-attribute
instance-attribute
traits = traits_def(RecursiveMemoryEffect(), RecursivelySpeculatable())
class-attribute
instance-attribute
ParallelOp
dataclass
Bases: IRDLOperation
See external documentation.
Source code in xdsl/dialects/affine.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | |
name = 'affine.parallel'
class-attribute
instance-attribute
map_operands = var_operand_def(IndexType)
class-attribute
instance-attribute
reductions = prop_def(ArrayAttr[StringAttr])
class-attribute
instance-attribute
lowerBoundsMap = prop_def(AffineMapAttr)
class-attribute
instance-attribute
lowerBoundsGroups = prop_def(DenseIntElementsAttr)
class-attribute
instance-attribute
upperBoundsMap = prop_def(AffineMapAttr)
class-attribute
instance-attribute
upperBoundsGroups = prop_def(DenseIntElementsAttr)
class-attribute
instance-attribute
steps = prop_def(ArrayAttr[IntegerAttr[IntegerType]])
class-attribute
instance-attribute
res = var_result_def()
class-attribute
instance-attribute
body = region_def('single_block')
class-attribute
instance-attribute
verify_() -> None
Source code in xdsl/dialects/affine.py
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | |
StoreOp
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | |
name = 'affine.store'
class-attribute
instance-attribute
T: ClassVar = VarConstraint('T', AnyAttr())
class-attribute
instance-attribute
value = operand_def(T)
class-attribute
instance-attribute
memref = operand_def(MemRefType.constr(T))
class-attribute
instance-attribute
indices = var_operand_def(IndexType)
class-attribute
instance-attribute
map = opt_prop_def(AffineMapAttr)
class-attribute
instance-attribute
__init__(value: SSAValue, memref: SSAValue, indices: Sequence[SSAValue], map: AffineMapAttr | None = None)
Source code in xdsl/dialects/affine.py
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | |
LoadOp
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | |
name = 'affine.load'
class-attribute
instance-attribute
T: ClassVar = VarConstraint('T', AnyAttr())
class-attribute
instance-attribute
memref = operand_def(MemRefType.constr(T))
class-attribute
instance-attribute
indices = var_operand_def(IndexType)
class-attribute
instance-attribute
result = result_def(T)
class-attribute
instance-attribute
map = opt_prop_def(AffineMapAttr)
class-attribute
instance-attribute
__init__(memref: SSAValue, indices: Sequence[SSAValue], map: AffineMapAttr | None = None, result_type: Attribute | None = None)
Source code in xdsl/dialects/affine.py
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | |
MinOp
dataclass
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | |
name = 'affine.min'
class-attribute
instance-attribute
arguments = var_operand_def(IndexType())
class-attribute
instance-attribute
result = result_def(IndexType())
class-attribute
instance-attribute
map = prop_def(AffineMapAttr)
class-attribute
instance-attribute
verify_() -> None
Source code in xdsl/dialects/affine.py
349 350 351 352 353 354 355 356 | |
YieldOp
dataclass
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
359 360 361 362 363 364 365 366 367 368 | |
name = 'affine.yield'
class-attribute
instance-attribute
arguments = var_operand_def()
class-attribute
instance-attribute
traits = traits_def(IsTerminator(), Pure())
class-attribute
instance-attribute
get(*operands: SSAValue | Operation) -> YieldOp
staticmethod
Source code in xdsl/dialects/affine.py
366 367 368 | |