Omp
omp
OMP = Dialect('omp', [ParallelOp, TerminatorOp, WsLoopOp, LoopNestOp, YieldOp, TargetOp, MapBoundsOp, MapInfoOp, SimdOp, TeamsOp, DistributeOp, PrivateClauseOp, TargetEnterDataOp, TargetExitDataOp, TargetUpdateOp, TargetDataOp, DeclareReductionOp], [ClauseRequiresKindAttr, ClauseMapFlagsAttr, DataSharingClauseAttr, DeclareTargetAttr, DeclareTargetCaptureClauseAttr, DeclareTargetDeviceTypeAttr, OrderKindAttr, ProcBindKindAttr, ScheduleKindAttr, ScheduleModifierAttr, DependKindAttr, MapBoundsType, VariableCaptureKindAttr, VersionAttr, ReductionModifierAttr, OrderModifierAttr])
module-attribute
OpenMPOffloadMappingFlags
Bases: IntFlag
Copied from OMPConstants.h
map_type attribute of omp.map.info is a 64 bit integer, with each bit specifying the flags described below.
Flags can be combined with | (bitwise or) operator.
Source code in xdsl/dialects/omp.py
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 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | |
NONE = 0
class-attribute
instance-attribute
No flags
TO = 1
class-attribute
instance-attribute
Allocate memory on the device and move data from host to device.
FROM = 2
class-attribute
instance-attribute
Allocate memory on the device and move data from device to host.
ALWAYS = 4
class-attribute
instance-attribute
Always perform the requested mapping action on the element, even if it was already mapped before.
DELETE = 8
class-attribute
instance-attribute
Delete the element from the device environment, ignoring the current reference count associated with the element.
PTR_AND_OBJ = 16
class-attribute
instance-attribute
The element being mapped is a pointer-pointee pair; both the pointer and the pointee should be mapped.
TARGET_PARAM = 32
class-attribute
instance-attribute
This flags signals that the base address of an entry should be passed to the target kernel as an argument.
RETURN_PARAM = 64
class-attribute
instance-attribute
Signal that the runtime library has to return the device pointer in the current position for the data being mapped. Used when we have the use_device_ptr or use_device_addr clause.
PRIVATE = 128
class-attribute
instance-attribute
This flag signals that the reference being passed is a pointer to private data.
LITERAL = 256
class-attribute
instance-attribute
Pass the element to the device by value.
IMPLICIT = 512
class-attribute
instance-attribute
Implicit map
CLOSE = 1024
class-attribute
instance-attribute
Close is a hint to the runtime to allocate memory close to the target device.
PRESENT = 4096
class-attribute
instance-attribute
Produce a runtime error if the data is not already allocated.
OMPX_HOLD = 8192
class-attribute
instance-attribute
Increment and decrement a separate reference counter so that the data cannot be unmapped within the associated region. Thus, this flag is intended to be used on 'target' and 'target data' directives because they are inherently structured. It is not intended to be used on 'target enter data' and 'target exit data' directives because they are inherently dynamic. This is an OpenMP extension for the sake of OpenACC support.
NON_CONTIG = 17592186044416
class-attribute
instance-attribute
Signal that the runtime library should use args as an array of descriptor_dim pointers and use args_size as dims. Used when we have non-contiguous list items in target update directive
MEMBER_OF = 18446462598732840960
class-attribute
instance-attribute
The 16 MSBs of the flags indicate whether the entry is member of some struct/class.
__iter__()
available in the standard library since python 3.11
Source code in xdsl/dialects/omp.py
133 134 135 136 137 | |
ClauseMapFlags
Bases: StrEnum
Source code in xdsl/dialects/omp.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |
STORAGE = auto()
class-attribute
instance-attribute
TO = auto()
class-attribute
instance-attribute
FROM = auto()
class-attribute
instance-attribute
ALWAYS = auto()
class-attribute
instance-attribute
DELETE = 'del'
class-attribute
instance-attribute
RETURN_PARAM = auto()
class-attribute
instance-attribute
PRIVATE = 'priv'
class-attribute
instance-attribute
LITERAL = auto()
class-attribute
instance-attribute
IMPLICIT = auto()
class-attribute
instance-attribute
CLOSE = auto()
class-attribute
instance-attribute
PRESENT = auto()
class-attribute
instance-attribute
OMPX_HOLD = auto()
class-attribute
instance-attribute
ATTACH = auto()
class-attribute
instance-attribute
ATTACH_ALWAYS = auto()
class-attribute
instance-attribute
ATTACH_NONE = auto()
class-attribute
instance-attribute
ATTACH_AUTO = auto()
class-attribute
instance-attribute
REF_PTR = auto()
class-attribute
instance-attribute
REF_PTEE = auto()
class-attribute
instance-attribute
REF_PTR_PTEE = auto()
class-attribute
instance-attribute
IS_DEVICE_PTR = auto()
class-attribute
instance-attribute
ClauseMapFlagsAttr
dataclass
Bases: BitEnumAttribute[ClauseMapFlags], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
163 164 165 166 167 168 169 | |
name = 'omp.clause_map_flags'
class-attribute
instance-attribute
none_value = 'none'
class-attribute
instance-attribute
separator_value = '|'
class-attribute
instance-attribute
delimiter_value = AttrParser.Delimiter.NONE
class-attribute
instance-attribute
ScheduleKind
Bases: StrEnum
Source code in xdsl/dialects/omp.py
188 189 190 191 | |
STATIC = auto()
class-attribute
instance-attribute
DYNAMIC = auto()
class-attribute
instance-attribute
AUTO = auto()
class-attribute
instance-attribute
ScheduleModifier
Bases: StrEnum
Source code in xdsl/dialects/omp.py
194 195 196 197 198 | |
NONE = auto()
class-attribute
instance-attribute
MONOTONIC = auto()
class-attribute
instance-attribute
NONMONOTONIC = auto()
class-attribute
instance-attribute
SIMD = auto()
class-attribute
instance-attribute
OrderKind
Bases: StrEnum
Source code in xdsl/dialects/omp.py
201 202 | |
CONCURRENT = auto()
class-attribute
instance-attribute
OrderModifier
Bases: StrEnum
Source code in xdsl/dialects/omp.py
205 206 207 | |
REPRODUCIBLE = auto()
class-attribute
instance-attribute
UNCONSTRAINED = auto()
class-attribute
instance-attribute
DependKind
Bases: StrEnum
Source code in xdsl/dialects/omp.py
210 211 212 213 214 215 | |
TASKDEPENDIN = auto()
class-attribute
instance-attribute
TASKDEPENDOUT = auto()
class-attribute
instance-attribute
TASKDEPENDINOUT = auto()
class-attribute
instance-attribute
TASKDEPENDMUTEXINOUTSET = auto()
class-attribute
instance-attribute
TASKDEPENDINOUTSET = auto()
class-attribute
instance-attribute
VariableCaptureKind
Bases: StrEnum
Source code in xdsl/dialects/omp.py
218 219 220 221 222 | |
THIS = 'This'
class-attribute
instance-attribute
BY_REF = 'ByRef'
class-attribute
instance-attribute
BY_COPY = 'ByCopy'
class-attribute
instance-attribute
VLA_TYPE = 'VLAType'
class-attribute
instance-attribute
DataSharingClauseKind
Bases: StrEnum
Source code in xdsl/dialects/omp.py
225 226 227 | |
PRIVATE = auto()
class-attribute
instance-attribute
FIRSTPRIVATE = auto()
class-attribute
instance-attribute
ClauseRequiresKind
Bases: StrEnum
Source code in xdsl/dialects/omp.py
230 231 232 233 234 235 | |
NONE = auto()
class-attribute
instance-attribute
REVERSE_OFFLOAD = auto()
class-attribute
instance-attribute
UNIFIED_ADDRESS = auto()
class-attribute
instance-attribute
UNIFIED_SHARED_MEMORY = auto()
class-attribute
instance-attribute
DYNAMIC_ALLOCATORS = auto()
class-attribute
instance-attribute
DeclareTargetDeviceTypeKind
Bases: StrEnum
Source code in xdsl/dialects/omp.py
238 239 240 241 | |
ANY = auto()
class-attribute
instance-attribute
HOST = auto()
class-attribute
instance-attribute
NOHOST = auto()
class-attribute
instance-attribute
DeclareTargetCaptureClauseKind
Bases: StrEnum
Source code in xdsl/dialects/omp.py
244 245 246 247 | |
TO = auto()
class-attribute
instance-attribute
LINK = auto()
class-attribute
instance-attribute
ENTER = auto()
class-attribute
instance-attribute
ReductionModifier
Bases: StrEnum
Source code in xdsl/dialects/omp.py
250 251 252 253 | |
DEFAULTMOD = auto()
class-attribute
instance-attribute
INSCAN = auto()
class-attribute
instance-attribute
TASK = auto()
class-attribute
instance-attribute
LoopWrapper
dataclass
Bases: NoTerminator
Check that the omp operation is a loop wrapper as defined upstream.
See external documentation
Source code in xdsl/dialects/omp.py
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | |
verify(op: Operation) -> None
Source code in xdsl/dialects/omp.py
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | |
BlockArgOpenMPOperation
dataclass
Bases: IRDLOperation, ABC
Verifies that the operation has the appropriate number of block arguments corresponding to the following operands:
host_eval_vars, in_reduction_vars, map_vars, private_vars, reduction_vars,
task_reduction_vars, use_device_addr_vars and use_device_ptr_vars.
Source code in xdsl/dialects/omp.py
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | |
verify_() -> None
Source code in xdsl/dialects/omp.py
293 294 295 296 297 298 299 300 301 302 303 304 305 | |
num_block_args() -> int
abstractmethod
Source code in xdsl/dialects/omp.py
307 308 | |
ScheduleKindAttr
dataclass
Bases: EnumAttribute[ScheduleKind], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
314 315 316 | |
name = 'omp.schedulekind'
class-attribute
instance-attribute
ScheduleModifierAttr
dataclass
Bases: EnumAttribute[ScheduleModifier], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
319 320 321 322 323 | |
name = 'omp.sched_mod'
class-attribute
instance-attribute
DependKindAttr
dataclass
Bases: EnumAttribute[DependKind], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
326 327 328 329 330 331 332 333 334 335 336 337 | |
name = 'omp.clause_task_depend'
class-attribute
instance-attribute
print_parameter(printer: Printer) -> None
Source code in xdsl/dialects/omp.py
330 331 332 | |
parse_parameter(parser: AttrParser) -> DependKind
classmethod
Source code in xdsl/dialects/omp.py
334 335 336 337 | |
OrderKindAttr
dataclass
Bases: EnumAttribute[OrderKind], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
340 341 342 | |
name = 'omp.orderkind'
class-attribute
instance-attribute
ReductionModifierAttr
dataclass
Bases: EnumAttribute[ReductionModifier], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
345 346 347 348 349 350 351 352 353 354 355 356 357 358 | |
name = 'omp.reduction_modifier'
class-attribute
instance-attribute
print_parameter(printer: Printer) -> None
Source code in xdsl/dialects/omp.py
351 352 353 | |
parse_parameter(parser: AttrParser) -> ReductionModifier
classmethod
Source code in xdsl/dialects/omp.py
355 356 357 358 | |
OrderModifierAttr
dataclass
Bases: EnumAttribute[OrderModifier], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
361 362 363 | |
name = 'omp.order_mod'
class-attribute
instance-attribute
VariableCaptureKindAttr
dataclass
Bases: EnumAttribute[VariableCaptureKind], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
366 367 368 369 370 371 372 373 374 375 376 377 378 379 | |
name = 'omp.variable_capture_kind'
class-attribute
instance-attribute
print_parameter(printer: Printer) -> None
Source code in xdsl/dialects/omp.py
372 373 374 | |
parse_parameter(parser: AttrParser) -> VariableCaptureKind
classmethod
Source code in xdsl/dialects/omp.py
376 377 378 379 | |
DeclareTargetDeviceTypeAttr
dataclass
Bases: EnumAttribute[DeclareTargetDeviceTypeKind], SpacedOpaqueSyntaxAttribute
Implementation of upstream omp.device_type See external documentation.
Source code in xdsl/dialects/omp.py
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | |
name = 'omp.device_type'
class-attribute
instance-attribute
parse_parameter(parser: AttrParser) -> DeclareTargetDeviceTypeKind
classmethod
Source code in xdsl/dialects/omp.py
393 394 395 396 | |
print_parameter(printer: Printer) -> None
Source code in xdsl/dialects/omp.py
398 399 400 | |
DeclareTargetCaptureClauseAttr
dataclass
Bases: EnumAttribute[DeclareTargetCaptureClauseKind], SpacedOpaqueSyntaxAttribute
Implementation of upstream omp.capture_clause See external documentation.
Source code in xdsl/dialects/omp.py
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | |
name = 'omp.capture_clause'
class-attribute
instance-attribute
parse_parameter(parser: AttrParser) -> DeclareTargetCaptureClauseKind
classmethod
Source code in xdsl/dialects/omp.py
414 415 416 417 | |
print_parameter(printer: Printer) -> None
Source code in xdsl/dialects/omp.py
419 420 421 | |
DeclareTargetAttr
dataclass
Bases: ParametrizedAttribute, SpacedOpaqueSyntaxAttribute
Implementation of upstream omp.declaretarget See external documentation.
Source code in xdsl/dialects/omp.py
424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 | |
name = 'omp.declaretarget'
class-attribute
instance-attribute
device_type: DeclareTargetDeviceTypeAttr
instance-attribute
capture_clause: DeclareTargetCaptureClauseAttr
instance-attribute
parse_parameters(parser: AttrParser) -> list[Attribute]
classmethod
Source code in xdsl/dialects/omp.py
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | |
print_parameters(printer: Printer)
Source code in xdsl/dialects/omp.py
452 453 454 455 456 457 | |
ClauseRequiresKindAttr
dataclass
Bases: EnumAttribute[ClauseRequiresKind], SpacedOpaqueSyntaxAttribute
Implementation of upstream omp.clause_requires See external documentation.
Source code in xdsl/dialects/omp.py
460 461 462 463 464 465 466 467 468 469 | |
name = 'omp.clause_requires'
class-attribute
instance-attribute
DataSharingClauseAttr
dataclass
Bases: EnumAttribute[DataSharingClauseKind], SpacedOpaqueSyntaxAttribute
Implementation of upstream omp.data_sharing_type See external documentation.
Source code in xdsl/dialects/omp.py
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 | |
name = 'omp.data_sharing_type'
class-attribute
instance-attribute
parse_parameter(parser: AttrParser) -> DataSharingClauseKind
classmethod
Source code in xdsl/dialects/omp.py
483 484 485 486 487 488 | |
print_parameter(printer: Printer) -> None
Source code in xdsl/dialects/omp.py
490 491 492 493 | |
VersionAttr
dataclass
Bases: ParametrizedAttribute, SpacedOpaqueSyntaxAttribute
Implementation of upstream omp.version See external documentation.
Source code in xdsl/dialects/omp.py
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 | |
name = 'omp.version'
class-attribute
instance-attribute
version: IntAttr
instance-attribute
parse_parameters(parser: AttrParser) -> list[Attribute]
classmethod
Source code in xdsl/dialects/omp.py
507 508 509 510 511 512 513 | |
print_parameters(printer: Printer)
Source code in xdsl/dialects/omp.py
515 516 517 518 | |
MapBoundsType
dataclass
Bases: ParametrizedAttribute, TypeAttribute
Source code in xdsl/dialects/omp.py
521 522 523 | |
name = 'omp.map_bounds_ty'
class-attribute
instance-attribute
LoopNestOp
dataclass
Bases: IRDLOperation
Source code in xdsl/dialects/omp.py
526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 | |
name = 'omp.loop_nest'
class-attribute
instance-attribute
lowerBound = var_operand_def(base(IntegerType) | base(IndexType))
class-attribute
instance-attribute
upperBound = var_operand_def(base(IntegerType) | base(IndexType))
class-attribute
instance-attribute
step = var_operand_def(base(IntegerType) | base(IndexType))
class-attribute
instance-attribute
collapse_num_loops = opt_prop_def(IntegerAttr)
class-attribute
instance-attribute
loop_inclusive = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
body = region_def('single_block')
class-attribute
instance-attribute
irdl_options = (SameVariadicOperandSize(),)
class-attribute
instance-attribute
traits = traits_def(RecursiveMemoryEffect())
class-attribute
instance-attribute
WsLoopOp
dataclass
Bases: BlockArgOpenMPOperation
Source code in xdsl/dialects/omp.py
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 | |
name = 'omp.wsloop'
class-attribute
instance-attribute
LINEAR_COUNT: ClassVar = IntVarConstraint('LINEAR_COUNT', AnyInt())
class-attribute
instance-attribute
REDUCTION_COUNT: ClassVar = IntVarConstraint('REDUCTION_COUNT', AnyInt())
class-attribute
instance-attribute
allocate_vars = var_operand_def()
class-attribute
instance-attribute
allocator_vars = var_operand_def()
class-attribute
instance-attribute
linear_vars = var_operand_def(RangeOf(AnyAttr()).of_length(LINEAR_COUNT))
class-attribute
instance-attribute
linear_step_vars = var_operand_def(RangeOf(eq(i32)).of_length(LINEAR_COUNT))
class-attribute
instance-attribute
private_vars = var_operand_def()
class-attribute
instance-attribute
reduction_vars = var_operand_def(RangeOf(AnyAttr()).of_length(REDUCTION_COUNT))
class-attribute
instance-attribute
schedule_chunk = opt_operand_def()
class-attribute
instance-attribute
reduction_syms = opt_prop_def(ArrayAttr.constr(RangeOf(base(SymbolRefAttr)).of_length(REDUCTION_COUNT)))
class-attribute
instance-attribute
reduction_mod = opt_prop_def(ReductionModifierAttr)
class-attribute
instance-attribute
reduction_byref = opt_prop_def(DenseArrayBase[i1])
class-attribute
instance-attribute
schedule_kind = opt_prop_def(ScheduleKindAttr)
class-attribute
instance-attribute
schedule_mod = opt_prop_def(ScheduleModifierAttr)
class-attribute
instance-attribute
schedule_simd = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
nowait = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
ordered = opt_prop_def(IntegerAttr.constr(value=AtLeast(0), type=base(IntegerType)))
class-attribute
instance-attribute
order = opt_prop_def(OrderKindAttr)
class-attribute
instance-attribute
order_mod = opt_prop_def(OrderModifierAttr)
class-attribute
instance-attribute
private_syms = opt_prop_def(ArrayAttr[SymbolRefAttr])
class-attribute
instance-attribute
private_needs_barrier = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
linear_var_types = opt_prop_def(ArrayAttr)
class-attribute
instance-attribute
body = region_def('single_block')
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
traits = traits_def(LoopWrapper(), RecursiveMemoryEffect())
class-attribute
instance-attribute
num_block_args() -> int
Source code in xdsl/dialects/omp.py
583 584 | |
ProcBindKindEnum
Bases: StrEnum
Source code in xdsl/dialects/omp.py
587 588 589 590 591 | |
PRIMARY = auto()
class-attribute
instance-attribute
MASTER = auto()
class-attribute
instance-attribute
CLOSE = auto()
class-attribute
instance-attribute
SPREAD = auto()
class-attribute
instance-attribute
ProcBindKindAttr
dataclass
Bases: EnumAttribute[ProcBindKindEnum], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
594 595 | |
name = 'omp.procbindkind'
class-attribute
instance-attribute
ParallelOp
dataclass
Bases: BlockArgOpenMPOperation
Source code in xdsl/dialects/omp.py
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 | |
name = 'omp.parallel'
class-attribute
instance-attribute
allocate_vars = var_operand_def()
class-attribute
instance-attribute
allocators_vars = var_operand_def()
class-attribute
instance-attribute
if_expr = opt_operand_def(i1)
class-attribute
instance-attribute
num_threads = opt_operand_def(base(IntegerType) | base(IndexType))
class-attribute
instance-attribute
private_vars = var_operand_def()
class-attribute
instance-attribute
reduction_vars = var_operand_def()
class-attribute
instance-attribute
region = region_def()
class-attribute
instance-attribute
reductions = opt_prop_def(ArrayAttr[SymbolRefAttr])
class-attribute
instance-attribute
proc_bind_kind = opt_prop_def(ProcBindKindAttr)
class-attribute
instance-attribute
privatizers = opt_prop_def(ArrayAttr[SymbolRefAttr])
class-attribute
instance-attribute
private_syms = opt_prop_def(ArrayAttr[SymbolRefAttr])
class-attribute
instance-attribute
reduction_mod = opt_prop_def(ReductionModifierAttr)
class-attribute
instance-attribute
reduction_byref = opt_prop_def(DenseArrayBase[i1])
class-attribute
instance-attribute
reduction_syms = opt_prop_def(ArrayAttr[SymbolRefAttr])
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
traits = traits_def(RecursiveMemoryEffect())
class-attribute
instance-attribute
num_block_args() -> int
Source code in xdsl/dialects/omp.py
625 626 | |
DeclareReductionOp
dataclass
Bases: IRDLOperation
Implementation of upstream omp.declare_reduction See external documentation.
Source code in xdsl/dialects/omp.py
629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 | |
name = 'omp.declare_reduction'
class-attribute
instance-attribute
sym_name = prop_def(SymbolNameConstraint())
class-attribute
instance-attribute
var_type = prop_def(TypeAttribute, prop_name='type')
class-attribute
instance-attribute
alloc_region = region_def()
class-attribute
instance-attribute
init_region = region_def()
class-attribute
instance-attribute
reduction_region = region_def()
class-attribute
instance-attribute
atomic_reduction_region = region_def()
class-attribute
instance-attribute
cleanup_region = region_def()
class-attribute
instance-attribute
data_ptr_ptr_region = region_def()
class-attribute
instance-attribute
traits = traits_def(IsolatedFromAbove(), SymbolOpInterface())
class-attribute
instance-attribute
assembly_format = '\n $sym_name `:` $type attr-dict-with-keyword\n ( `alloc` $alloc_region^ )?\n `init` $init_region\n `combiner` $reduction_region\n ( `atomic` $atomic_reduction_region^ )?\n ( `cleanup` $cleanup_region^ )?\n ( `data_ptr_ptr` $data_ptr_ptr_region^ )?\n '
class-attribute
instance-attribute
verify_() -> None
Source code in xdsl/dialects/omp.py
660 661 662 663 664 | |
PrivateClauseOp
dataclass
Bases: IRDLOperation
Implementation of upstream omp.private See external documentation.
Source code in xdsl/dialects/omp.py
667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 | |
name = 'omp.private'
class-attribute
instance-attribute
sym_name = prop_def(SymbolNameConstraint())
class-attribute
instance-attribute
var_type = prop_def(TypeAttribute, prop_name='type')
class-attribute
instance-attribute
data_sharing_type = prop_def(DataSharingClauseAttr)
class-attribute
instance-attribute
init_region = region_def()
class-attribute
instance-attribute
copy_region = region_def()
class-attribute
instance-attribute
dealloc_region = region_def()
class-attribute
instance-attribute
traits = traits_def(IsolatedFromAbove())
class-attribute
instance-attribute
assembly_format = '\n $data_sharing_type $sym_name `:` $type\n (`init` $init_region^)?\n (`copy` $copy_region^)?\n (`dealloc` $dealloc_region^)?\n attr-dict\n '
class-attribute
instance-attribute
YieldOp
dataclass
Bases: AbstractYieldOperation[Attribute]
Source code in xdsl/dialects/omp.py
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 | |
name = 'omp.yield'
class-attribute
instance-attribute
assembly_format = '( `(` $arguments^ `:` type($arguments) `)` )? attr-dict'
class-attribute
instance-attribute
traits = traits_def(IsTerminator(), Pure(), HasParent(LoopNestOp, PrivateClauseOp, DeclareReductionOp))
class-attribute
instance-attribute
TerminatorOp
dataclass
Bases: IRDLOperation
Source code in xdsl/dialects/omp.py
714 715 716 717 718 | |
name = 'omp.terminator'
class-attribute
instance-attribute
traits = traits_def(IsTerminator(), Pure())
class-attribute
instance-attribute
TargetOp
dataclass
Bases: BlockArgOpenMPOperation
Implementation of upstream omp.target See external documentation.
Source code in xdsl/dialects/omp.py
721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 | |
name = 'omp.target'
class-attribute
instance-attribute
DEP_COUNT: ClassVar = IntVarConstraint('DEP_COUNT', AnyInt())
class-attribute
instance-attribute
allocate_vars = var_operand_def()
class-attribute
instance-attribute
allocator_vars = var_operand_def()
class-attribute
instance-attribute
depend_vars = var_operand_def(RangeOf(AnyAttr()).of_length(DEP_COUNT))
class-attribute
instance-attribute
device = opt_operand_def(IntegerType)
class-attribute
instance-attribute
has_device_addr_vars = var_operand_def()
class-attribute
instance-attribute
host_eval_vars = var_operand_def()
class-attribute
instance-attribute
if_expr = opt_operand_def(i1)
class-attribute
instance-attribute
in_reduction_vars = var_operand_def()
class-attribute
instance-attribute
is_device_ptr_vars = var_operand_def()
class-attribute
instance-attribute
map_vars = var_operand_def()
class-attribute
instance-attribute
private_vars = var_operand_def()
class-attribute
instance-attribute
thread_limit = opt_operand_def(IntegerType | IndexType)
class-attribute
instance-attribute
bare = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
depend_kinds = opt_prop_def(ArrayAttr.constr(RangeOf(base(DependKindAttr)).of_length(DEP_COUNT)))
class-attribute
instance-attribute
in_reduction_byref = opt_prop_def(DenseArrayBase[i1])
class-attribute
instance-attribute
in_reduction_syms = opt_prop_def(ArrayAttr[SymbolRefAttr])
class-attribute
instance-attribute
nowait = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
private_syms = opt_prop_def(ArrayAttr[SymbolRefAttr])
class-attribute
instance-attribute
private_needs_barrier = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
private_maps = opt_prop_def(DenseArrayBase[i64])
class-attribute
instance-attribute
region = region_def()
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
traits = traits_def(IsolatedFromAbove())
class-attribute
instance-attribute
num_block_args() -> int
Source code in xdsl/dialects/omp.py
765 766 767 768 769 770 771 | |
verify_() -> None
Source code in xdsl/dialects/omp.py
773 774 775 776 777 778 779 | |
MapBoundsOp
dataclass
Bases: IRDLOperation
Implementation of upstream omp.map.bounds See external documentation.
Source code in xdsl/dialects/omp.py
782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 | |
name = 'omp.map.bounds'
class-attribute
instance-attribute
lower_bound = opt_operand_def(IntegerType | IndexType)
class-attribute
instance-attribute
upper_bound = opt_operand_def(IntegerType | IndexType)
class-attribute
instance-attribute
extent = opt_operand_def(IntegerType | IndexType)
class-attribute
instance-attribute
stride = opt_operand_def(IntegerType | IndexType)
class-attribute
instance-attribute
start_idx = opt_operand_def(IntegerType | IndexType)
class-attribute
instance-attribute
stride_in_bytes = prop_def(BoolAttr, default_value=BoolAttr.from_bool(False))
class-attribute
instance-attribute
res = result_def(MapBoundsType)
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
MapInfoOp
dataclass
Bases: IRDLOperation
Implementation of upstream omp.map.info See external documentation.
Source code in xdsl/dialects/omp.py
805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 | |
name = 'omp.map.info'
class-attribute
instance-attribute
var_ptr = operand_def()
class-attribute
instance-attribute
var_ptr_ptr = opt_operand_def()
class-attribute
instance-attribute
members = var_operand_def()
class-attribute
instance-attribute
bounds = var_operand_def(MapBoundsType)
class-attribute
instance-attribute
var_type = prop_def(TypeAttribute)
class-attribute
instance-attribute
map_type = prop_def(ClauseMapFlagsAttr)
class-attribute
instance-attribute
To set or test flags in map_type use the bits defined in OpenMPOffloadMappingFlags
map_capture_type = prop_def(VariableCaptureKindAttr)
class-attribute
instance-attribute
members_index = opt_prop_def(ArrayAttr[ArrayAttr[IntegerAttr[i64]]])
class-attribute
instance-attribute
var_name = opt_prop_def(StringAttr, prop_name='name')
class-attribute
instance-attribute
partial_map = opt_prop_def(BoolAttr, default_value=BoolAttr.from_bool(False))
class-attribute
instance-attribute
omp_ptr = result_def()
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
verify_() -> None
Source code in xdsl/dialects/omp.py
833 834 835 | |
SimdOp
dataclass
Bases: BlockArgOpenMPOperation
Implementation of upstream omp.simd See external documentation.
Source code in xdsl/dialects/omp.py
838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 | |
name = 'omp.simd'
class-attribute
instance-attribute
ALIGN_COUNT: ClassVar = IntVarConstraint('ALIGN_COUNT', AnyInt())
class-attribute
instance-attribute
LINEAR_COUNT: ClassVar = IntVarConstraint('LINEAR_COUNT', AnyInt())
class-attribute
instance-attribute
aligned_vars = var_operand_def(RangeOf(AnyAttr()).of_length(ALIGN_COUNT))
class-attribute
instance-attribute
if_expr = opt_operand_def(i1)
class-attribute
instance-attribute
linear_vars = var_operand_def(RangeOf(AnyAttr()).of_length(LINEAR_COUNT))
class-attribute
instance-attribute
linear_step_vars = var_operand_def(RangeOf(eq(i32)).of_length(LINEAR_COUNT))
class-attribute
instance-attribute
nontemporal_vars = opt_operand_def()
class-attribute
instance-attribute
private_vars = var_operand_def()
class-attribute
instance-attribute
reduction_vars = var_operand_def()
class-attribute
instance-attribute
alignments = opt_prop_def(ArrayAttr.constr(RangeOf(base(IntegerAttr[i64])).of_length(ALIGN_COUNT)))
class-attribute
instance-attribute
order = opt_prop_def(OrderKindAttr)
class-attribute
instance-attribute
order_mod = opt_prop_def(OrderModifierAttr)
class-attribute
instance-attribute
private_syms = opt_prop_def(ArrayAttr[SymbolRefAttr])
class-attribute
instance-attribute
reduction_mod = opt_prop_def(ReductionModifierAttr)
class-attribute
instance-attribute
reduction_byref = opt_prop_def(DenseArrayBase[i1])
class-attribute
instance-attribute
reduction_syms = opt_prop_def(ArrayAttr[SymbolRefAttr])
class-attribute
instance-attribute
simdlen = opt_prop_def(IntegerAttr.constr(value=AtLeast(1), type=eq(i64)))
class-attribute
instance-attribute
safelen = opt_prop_def(IntegerAttr.constr(value=AtLeast(1), type=eq(i64)))
class-attribute
instance-attribute
linear_var_types = opt_prop_def(ArrayAttr)
class-attribute
instance-attribute
body = region_def('single_block')
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
traits = traits_def(RecursiveMemoryEffect(), LoopWrapper())
class-attribute
instance-attribute
num_block_args() -> int
Source code in xdsl/dialects/omp.py
881 882 | |
verify_() -> None
Source code in xdsl/dialects/omp.py
884 885 886 887 888 889 890 | |
TeamsOp
dataclass
Bases: BlockArgOpenMPOperation
Implementation of upstream omp.teams See external documentation.
Source code in xdsl/dialects/omp.py
893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 | |
name = 'omp.teams'
class-attribute
instance-attribute
allocate_vars = var_operand_def()
class-attribute
instance-attribute
allocator_vars = var_operand_def()
class-attribute
instance-attribute
if_expr = opt_operand_def(i1)
class-attribute
instance-attribute
num_teams_lower = opt_operand_def(IntegerType)
class-attribute
instance-attribute
num_teams_upper = opt_operand_def(IntegerType)
class-attribute
instance-attribute
private_vars = var_operand_def()
class-attribute
instance-attribute
reduction_vars = var_operand_def()
class-attribute
instance-attribute
thread_limit = opt_operand_def(IntegerType)
class-attribute
instance-attribute
private_syms = opt_prop_def(ArrayAttr[SymbolRefAttr])
class-attribute
instance-attribute
reduction_mod = opt_prop_def(ReductionModifierAttr)
class-attribute
instance-attribute
reduction_byref = opt_prop_def(DenseArrayBase[i1])
class-attribute
instance-attribute
reduction_syms = opt_prop_def(ArrayAttr[SymbolRefAttr])
class-attribute
instance-attribute
body = region_def()
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
traits = traits_def(RecursiveMemoryEffect())
class-attribute
instance-attribute
num_block_args() -> int
Source code in xdsl/dialects/omp.py
921 922 | |
DistributeOp
dataclass
Bases: BlockArgOpenMPOperation
Implementation of upstream omp.distribute https://mlir.llvm.org/docs/Dialects/OpenMPDialect/ODS/#ompdistribute-ompdistributeop
Source code in xdsl/dialects/omp.py
925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 | |
name = 'omp.distribute'
class-attribute
instance-attribute
allocate_vars = var_operand_def()
class-attribute
instance-attribute
allocator_vars = var_operand_def()
class-attribute
instance-attribute
dist_schedule_chunk_size = opt_operand_def(IntegerType | IndexType)
class-attribute
instance-attribute
private_vars = var_operand_def()
class-attribute
instance-attribute
dist_schedule_static = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
order = opt_prop_def(OrderKindAttr)
class-attribute
instance-attribute
order_mod = opt_prop_def(OrderModifierAttr)
class-attribute
instance-attribute
private_syms = opt_prop_def(ArrayAttr[SymbolRefAttr])
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
body = region_def('single_block')
class-attribute
instance-attribute
traits = traits_def(LoopWrapper(), RecursiveMemoryEffect())
class-attribute
instance-attribute
num_block_args() -> int
Source code in xdsl/dialects/omp.py
950 951 | |
verify_() -> None
Source code in xdsl/dialects/omp.py
953 954 955 956 957 958 | |
TargetTaskBasedDataOp
dataclass
Bases: IRDLOperation
Base class representing target data movement operations which are task based, this includes enter and exit data pragmas along with data update
Source code in xdsl/dialects/omp.py
961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 | |
DEP_COUNT: ClassVar = IntVarConstraint('DEP_COUNT', AnyInt())
class-attribute
instance-attribute
depend_vars = var_operand_def(RangeOf(AnyAttr()).of_length(DEP_COUNT))
class-attribute
instance-attribute
device = opt_operand_def(IntegerType | IndexType)
class-attribute
instance-attribute
if_expr = opt_operand_def(i1)
class-attribute
instance-attribute
mapped_vars = var_operand_def()
class-attribute
instance-attribute
depend_kinds = opt_prop_def(ArrayAttr.constr(RangeOf(base(DependKindAttr)).of_length(DEP_COUNT)))
class-attribute
instance-attribute
nowait = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
TargetEnterDataOp
dataclass
Bases: TargetTaskBasedDataOp
Implementation of upstream omp.target_enter_data See external documentation.
Source code in xdsl/dialects/omp.py
986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 | |
name = 'omp.target_enter_data'
class-attribute
instance-attribute
verify_() -> None
Source code in xdsl/dialects/omp.py
995 996 997 998 999 1000 1001 | |
TargetExitDataOp
dataclass
Bases: TargetTaskBasedDataOp
Implementation of omp.target_exit_data See external documentation.
Source code in xdsl/dialects/omp.py
1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 | |
name = 'omp.target_exit_data'
class-attribute
instance-attribute
verify_() -> None
Source code in xdsl/dialects/omp.py
1013 1014 1015 1016 1017 1018 1019 | |
TargetUpdateOp
dataclass
Bases: TargetTaskBasedDataOp
Implementation of upstream omp.target_update See external documentation.
Source code in xdsl/dialects/omp.py
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 | |
name = 'omp.target_update'
class-attribute
instance-attribute
verify_() -> None
Source code in xdsl/dialects/omp.py
1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 | |
TargetDataOp
dataclass
Bases: BlockArgOpenMPOperation
Implementation of upstream omp.target_data See external documentation.
Source code in xdsl/dialects/omp.py
1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 | |
name = 'omp.target_data'
class-attribute
instance-attribute
device = opt_operand_def(IntegerType)
class-attribute
instance-attribute
if_expr = opt_operand_def(i1)
class-attribute
instance-attribute
mapped_vars = var_operand_def()
class-attribute
instance-attribute
use_device_addr_vars = var_operand_def()
class-attribute
instance-attribute
use_device_ptr_vars = var_operand_def()
class-attribute
instance-attribute
region = region_def()
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
num_block_args() -> int
Source code in xdsl/dialects/omp.py
1070 1071 1072 | |
verify_() -> None
Source code in xdsl/dialects/omp.py
1074 1075 1076 1077 1078 1079 1080 | |
verify_map_vars(vars: VarOperand, op_name: str, *, disallowed_types: Sequence[ClauseMapFlags] = ())
Source code in xdsl/dialects/omp.py
172 173 174 175 176 177 178 179 180 181 182 183 184 185 | |