Omp
omp
¶
OMP = Dialect('omp', [ParallelOp, TerminatorOp, WsLoopOp, LoopNestOp, YieldOp, TargetOp, MapBoundsOp, MapInfoOp, SimdOp, TeamsOp, DistributeOp, PrivateClauseOp, TargetEnterDataOp, TargetExitDataOp, TargetUpdateOp, TargetDataOp, DeclareReductionOp, TaskwaitOp, TaskyieldOp, SingleOp, TaskOp, TaskgroupOp, TaskloopOp, BarrierOp, FlushOp, MasterOp, MaskedOp, CancelOp, CancellationPointOp], [ClauseRequiresKindAttr, ClauseMapFlagsAttr, DataSharingClauseAttr, DeclareTargetAttr, DeclareTargetCaptureClauseAttr, DeclareTargetDeviceTypeAttr, OrderKindAttr, ProcBindKindAttr, ScheduleKindAttr, ScheduleModifierAttr, DependKindAttr, MapBoundsType, VariableCaptureKindAttr, VersionAttr, ReductionModifierAttr, OrderModifierAttr, GrainsizeTypeAttr, NumTasksTypeAttr, CancellationConstructTypeAttr])
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
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.
ClauseMapFlags
¶
Bases: StrEnum
Source code in xdsl/dialects/omp.py
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
ScheduleKind
¶
OrderKind
¶
OrderModifier
¶
DependKind
¶
Bases: StrEnum
Source code in xdsl/dialects/omp.py
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
¶
DataSharingClauseKind
¶
ClauseRequiresKind
¶
Bases: StrEnum
Source code in xdsl/dialects/omp.py
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
¶
GrainsizeType
¶
NumTasksType
¶
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
verify(op: Operation) -> None
¶
Source code in xdsl/dialects/omp.py
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
verify_() -> None
¶
Source code in xdsl/dialects/omp.py
ScheduleKindAttr
dataclass
¶
Bases: EnumAttribute[ScheduleKind], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
name = 'omp.schedulekind'
class-attribute
instance-attribute
¶
ScheduleModifierAttr
dataclass
¶
Bases: EnumAttribute[ScheduleModifier], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
name = 'omp.sched_mod'
class-attribute
instance-attribute
¶
DependKindAttr
dataclass
¶
Bases: EnumAttribute[DependKind], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
OrderKindAttr
dataclass
¶
Bases: EnumAttribute[OrderKind], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
name = 'omp.orderkind'
class-attribute
instance-attribute
¶
ReductionModifierAttr
dataclass
¶
Bases: EnumAttribute[ReductionModifier], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
OrderModifierAttr
dataclass
¶
Bases: EnumAttribute[OrderModifier], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
name = 'omp.order_mod'
class-attribute
instance-attribute
¶
GrainsizeTypeAttr
dataclass
¶
Bases: EnumAttribute[GrainsizeType], SpacedOpaqueSyntaxAttribute
Implementation of upstream omp.grainsizetype See external documentation.
Source code in xdsl/dialects/omp.py
name = 'omp.grainsizetype'
class-attribute
instance-attribute
¶
NumTasksTypeAttr
dataclass
¶
Bases: EnumAttribute[NumTasksType], SpacedOpaqueSyntaxAttribute
Implementation of upstream omp.numtaskstype See external documentation.
Source code in xdsl/dialects/omp.py
name = 'omp.numtaskstype'
class-attribute
instance-attribute
¶
CancellationConstructTypeAttr
dataclass
¶
Bases: EnumAttribute[CancellationConstructType], SpacedOpaqueSyntaxAttribute
Implementation of upstream omp.cancellationconstructtype See external documentation.
Source code in xdsl/dialects/omp.py
name = 'omp.cancellationconstructtype'
class-attribute
instance-attribute
¶
VariableCaptureKindAttr
dataclass
¶
Bases: EnumAttribute[VariableCaptureKind], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
DeclareTargetDeviceTypeAttr
dataclass
¶
Bases: EnumAttribute[DeclareTargetDeviceTypeKind], SpacedOpaqueSyntaxAttribute
Implementation of upstream omp.device_type See external documentation.
Source code in xdsl/dialects/omp.py
DeclareTargetCaptureClauseAttr
dataclass
¶
Bases: EnumAttribute[DeclareTargetCaptureClauseKind], SpacedOpaqueSyntaxAttribute
Implementation of upstream omp.capture_clause See external documentation.
Source code in xdsl/dialects/omp.py
DeclareTargetAttr
dataclass
¶
Bases: ParametrizedAttribute, SpacedOpaqueSyntaxAttribute
Implementation of upstream omp.declaretarget See external documentation.
Source code in xdsl/dialects/omp.py
name = 'omp.declaretarget'
class-attribute
instance-attribute
¶
device_type: DeclareTargetDeviceTypeAttr | NoneAttr
instance-attribute
¶
capture_clause: DeclareTargetCaptureClauseAttr | NoneAttr
instance-attribute
¶
automap: BoolAttr | NoneAttr
instance-attribute
¶
parse_parameters(parser: AttrParser) -> list[Attribute]
classmethod
¶
Source code in xdsl/dialects/omp.py
print_parameters(printer: Printer)
¶
Source code in xdsl/dialects/omp.py
ClauseRequiresKindAttr
dataclass
¶
Bases: EnumAttribute[ClauseRequiresKind], SpacedOpaqueSyntaxAttribute
Implementation of upstream omp.clause_requires See external documentation.
Source code in xdsl/dialects/omp.py
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
VersionAttr
dataclass
¶
Bases: ParametrizedAttribute, SpacedOpaqueSyntaxAttribute
Implementation of upstream omp.version See external documentation.
Source code in xdsl/dialects/omp.py
MapBoundsType
dataclass
¶
Bases: ParametrizedAttribute, TypeAttribute
Source code in xdsl/dialects/omp.py
name = 'omp.map_bounds_ty'
class-attribute
instance-attribute
¶
LoopNestOp
dataclass
¶
Bases: IRDLOperation
Source code in xdsl/dialects/omp.py
name = 'omp.loop_nest'
class-attribute
instance-attribute
¶
lowerBound = var_operand_def(IntegerType | IndexType)
class-attribute
instance-attribute
¶
upperBound = var_operand_def(IntegerType | IndexType)
class-attribute
instance-attribute
¶
step = var_operand_def(IntegerType | 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
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(AnyRange().of_length(LINEAR_COUNT))
class-attribute
instance-attribute
¶
linear_step_vars = var_operand_def(RangeOf.get(i32).of_length(LINEAR_COUNT))
class-attribute
instance-attribute
¶
private_vars = var_operand_def()
class-attribute
instance-attribute
¶
reduction_vars = var_operand_def(AnyRange().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.get(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=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
¶
ProcBindKindAttr
dataclass
¶
Bases: EnumAttribute[ProcBindKindEnum], SpacedOpaqueSyntaxAttribute
Source code in xdsl/dialects/omp.py
name = 'omp.procbindkind'
class-attribute
instance-attribute
¶
ParallelOp
dataclass
¶
Bases: BlockArgOpenMPOperation
Source code in xdsl/dialects/omp.py
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(IntegerType | 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
¶
DeclareReductionOp
dataclass
¶
Bases: IRDLOperation
Implementation of upstream omp.declare_reduction See external documentation.
Source code in xdsl/dialects/omp.py
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
¶
PrivateClauseOp
dataclass
¶
Bases: IRDLOperation
Implementation of upstream omp.private See external documentation.
Source code in xdsl/dialects/omp.py
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(), SymbolOpInterface())
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
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
TargetOp
dataclass
¶
Bases: BlockArgOpenMPOperation
Implementation of upstream omp.target See external documentation.
Source code in xdsl/dialects/omp.py
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(AnyRange().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.get(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
¶
MapBoundsOp
dataclass
¶
Bases: IRDLOperation
Implementation of upstream omp.map.bounds See external documentation.
Source code in xdsl/dialects/omp.py
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
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
¶
SimdOp
dataclass
¶
Bases: BlockArgOpenMPOperation
Implementation of upstream omp.simd See external documentation.
Source code in xdsl/dialects/omp.py
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(AnyRange().of_length(ALIGN_COUNT))
class-attribute
instance-attribute
¶
if_expr = opt_operand_def(i1)
class-attribute
instance-attribute
¶
linear_vars = var_operand_def(AnyRange().of_length(LINEAR_COUNT))
class-attribute
instance-attribute
¶
linear_step_vars = var_operand_def(RangeOf.get(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.get(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=i64))
class-attribute
instance-attribute
¶
safelen = opt_prop_def(IntegerAttr.constr(value=AtLeast(1), type=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
¶
verify_() -> None
¶
TeamsOp
dataclass
¶
Bases: BlockArgOpenMPOperation
Implementation of upstream omp.teams See external documentation.
Source code in xdsl/dialects/omp.py
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
¶
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
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
¶
verify_() -> None
¶
Source code in xdsl/dialects/omp.py
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
DEP_COUNT: ClassVar = IntVarConstraint('DEP_COUNT', AnyInt())
class-attribute
instance-attribute
¶
depend_vars = var_operand_def(AnyRange().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.get(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
name = 'omp.target_enter_data'
class-attribute
instance-attribute
¶
TargetExitDataOp
dataclass
¶
Bases: TargetTaskBasedDataOp
Implementation of omp.target_exit_data See external documentation.
Source code in xdsl/dialects/omp.py
TargetUpdateOp
dataclass
¶
Bases: TargetTaskBasedDataOp
Implementation of upstream omp.target_update See external documentation.
Source code in xdsl/dialects/omp.py
name = 'omp.target_update'
class-attribute
instance-attribute
¶
verify_() -> None
¶
Source code in xdsl/dialects/omp.py
TargetDataOp
dataclass
¶
Bases: BlockArgOpenMPOperation
Implementation of upstream omp.target_data See external documentation.
Source code in xdsl/dialects/omp.py
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
¶
TaskwaitOp
dataclass
¶
Bases: IRDLOperation
Implementation of upstream omp.taskwait See external documentation.
Source code in xdsl/dialects/omp.py
name = 'omp.taskwait'
class-attribute
instance-attribute
¶
DEP_COUNT: ClassVar = IntVarConstraint('DEP_COUNT', AnyInt())
class-attribute
instance-attribute
¶
depend_vars = var_operand_def(AnyRange().of_length(DEP_COUNT))
class-attribute
instance-attribute
¶
depend_kinds = opt_prop_def(ArrayAttr.constr(RangeOf.get(DependKindAttr).of_length(DEP_COUNT)))
class-attribute
instance-attribute
¶
nowait = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
¶
TaskyieldOp
dataclass
¶
Bases: IRDLOperation
Implementation of upstream omp.taskyield See external documentation.
Source code in xdsl/dialects/omp.py
name = 'omp.taskyield'
class-attribute
instance-attribute
¶
SingleOp
dataclass
¶
Bases: BlockArgOpenMPOperation
Implementation of upstream omp.single See external documentation.
Source code in xdsl/dialects/omp.py
name = 'omp.single'
class-attribute
instance-attribute
¶
allocate_vars = var_operand_def()
class-attribute
instance-attribute
¶
allocator_vars = var_operand_def()
class-attribute
instance-attribute
¶
copyprivate_vars = var_operand_def()
class-attribute
instance-attribute
¶
private_vars = var_operand_def()
class-attribute
instance-attribute
¶
copyprivate_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
¶
region = region_def()
class-attribute
instance-attribute
¶
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
¶
num_block_args() -> int
¶
verify_() -> None
¶
Source code in xdsl/dialects/omp.py
TaskOp
dataclass
¶
Bases: BlockArgOpenMPOperation
Implementation of upstream omp.task See external documentation.
Source code in xdsl/dialects/omp.py
name = 'omp.task'
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(AnyRange().of_length(DEP_COUNT))
class-attribute
instance-attribute
¶
final = opt_operand_def(i1)
class-attribute
instance-attribute
¶
if_expr = opt_operand_def(i1)
class-attribute
instance-attribute
¶
in_reduction_vars = var_operand_def()
class-attribute
instance-attribute
¶
priority = opt_operand_def(IntegerType)
class-attribute
instance-attribute
¶
private_vars = var_operand_def()
class-attribute
instance-attribute
¶
event_handle = opt_operand_def()
class-attribute
instance-attribute
¶
depend_kinds = opt_prop_def(ArrayAttr.constr(RangeOf.get(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
¶
mergeable = 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
¶
untied = opt_prop_def(UnitAttr)
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
¶
verify_() -> None
¶
Source code in xdsl/dialects/omp.py
TaskgroupOp
dataclass
¶
Bases: BlockArgOpenMPOperation
Implementation of upstream omp.taskgroup See external documentation.
Source code in xdsl/dialects/omp.py
name = 'omp.taskgroup'
class-attribute
instance-attribute
¶
allocate_vars = var_operand_def()
class-attribute
instance-attribute
¶
allocator_vars = var_operand_def()
class-attribute
instance-attribute
¶
task_reduction_vars = var_operand_def()
class-attribute
instance-attribute
¶
task_reduction_byref = opt_prop_def(DenseArrayBase[i1])
class-attribute
instance-attribute
¶
task_reduction_syms = opt_prop_def(ArrayAttr[SymbolRefAttr])
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
¶
verify_() -> None
¶
Source code in xdsl/dialects/omp.py
TaskloopOp
dataclass
¶
Bases: BlockArgOpenMPOperation
Implementation of upstream omp.taskloop See external documentation.
Source code in xdsl/dialects/omp.py
1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 | |
name = 'omp.taskloop'
class-attribute
instance-attribute
¶
allocate_vars = var_operand_def()
class-attribute
instance-attribute
¶
allocator_vars = var_operand_def()
class-attribute
instance-attribute
¶
final = opt_operand_def(i1)
class-attribute
instance-attribute
¶
grainsize = opt_operand_def(IntegerType | IndexType)
class-attribute
instance-attribute
¶
if_expr = opt_operand_def(i1)
class-attribute
instance-attribute
¶
in_reduction_vars = var_operand_def()
class-attribute
instance-attribute
¶
num_tasks = opt_operand_def(IntegerType | IndexType)
class-attribute
instance-attribute
¶
priority = 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
¶
grainsize_mod = opt_prop_def(GrainsizeTypeAttr)
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
¶
mergeable = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
¶
nogroup = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
¶
num_tasks_mod = opt_prop_def(NumTasksTypeAttr)
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
¶
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
¶
untied = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
¶
region = 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
¶
verify_() -> None
¶
Source code in xdsl/dialects/omp.py
BarrierOp
dataclass
¶
Bases: IRDLOperation
Implementation of upstream omp.barrier See external documentation.
Source code in xdsl/dialects/omp.py
name = 'omp.barrier'
class-attribute
instance-attribute
¶
FlushOp
dataclass
¶
Bases: IRDLOperation
Implementation of upstream omp.flush See external documentation.
Source code in xdsl/dialects/omp.py
MasterOp
dataclass
¶
Bases: IRDLOperation
Implementation of upstream omp.master See external documentation.
Source code in xdsl/dialects/omp.py
MaskedOp
dataclass
¶
Bases: IRDLOperation
Implementation of upstream omp.masked See external documentation.
Source code in xdsl/dialects/omp.py
CancelOp
dataclass
¶
Bases: IRDLOperation
Implementation of upstream omp.cancel See external documentation.
Source code in xdsl/dialects/omp.py
name = 'omp.cancel'
class-attribute
instance-attribute
¶
if_expr = opt_operand_def(i1)
class-attribute
instance-attribute
¶
cancel_directive = prop_def(CancellationConstructTypeAttr)
class-attribute
instance-attribute
¶
verify_() -> None
¶
Source code in xdsl/dialects/omp.py
CancellationPointOp
dataclass
¶
Bases: IRDLOperation
Implementation of upstream omp.cancellation_point See external documentation.
Source code in xdsl/dialects/omp.py
verify_map_vars(vars: VarOperand, op_name: str, *, disallowed_types: Sequence[ClauseMapFlags] = ())
¶
Source code in xdsl/dialects/omp.py
verify_cancel_construct_parent(op: Operation, construct: CancellationConstructType, directive: str) -> Operation | None
¶
Verifies that op is nested in the region the construct refers to, ignoring any
non-omp operations in between, and returns the operation of that region.