transform.xegpu.convert_layout (transform::ConvertLayoutOp) ¶
Convert xegpu.layout attribute for a value.
Syntax:
operation ::= `transform.xegpu.convert_layout` $target
`input_sg_layout` `=` custom<DynamicIndexList>($input_sg_layout, $static_input_sg_layout)
`input_sg_data` `=` custom<DynamicIndexList>($input_sg_data, $static_input_sg_data)
(`input_inst_data` `=` custom<DynamicIndexList>($input_inst_data, $static_input_inst_data)^)?
(`input_order` `=` $input_order^)?
`target_sg_layout` `=` custom<DynamicIndexList>($target_sg_layout, $static_target_sg_layout)
`target_sg_data` `=` custom<DynamicIndexList>($target_sg_data, $static_target_sg_data)
(`target_inst_data` `=` custom<DynamicIndexList>($target_inst_data, $static_target_inst_data)^)?
(`target_order` `=` $target_order^)?
attr-dict `:` functional-type(operands, results)
Adds an xegpu.convert_layout op to convert the xegpu.layout attribute
of a value before its first use. The input and target layouts are defined
by the *sg_layout, *sg_data and optional *inst_data and *order
attributes. Returns a handle to the emitted xegpu.convert_layout op.
Traits: AttrSizedOperandSegments
Interfaces: MemoryEffectOpInterface, TransformOpInterface
Attributes: ¶
| Attribute | MLIR Type | Description |
|---|---|---|
input_order | ::mlir::DenseI32ArrayAttr | i32 dense array attribute |
static_input_sg_layout | ::mlir::DenseI64ArrayAttr | i64 dense array attribute |
static_input_sg_data | ::mlir::DenseI64ArrayAttr | i64 dense array attribute |
static_input_inst_data | ::mlir::DenseI64ArrayAttr | i64 dense array attribute |
static_target_sg_layout | ::mlir::DenseI64ArrayAttr | i64 dense array attribute |
static_target_sg_data | ::mlir::DenseI64ArrayAttr | i64 dense array attribute |
static_target_inst_data | ::mlir::DenseI64ArrayAttr | i64 dense array attribute |
target_order | ::mlir::DenseI32ArrayAttr | i32 dense array attribute |
Operands: ¶
| Operand | Description |
|---|---|
target | TransformValueHandleTypeInterface instance |
input_sg_layout | variadic of transform any param type or any handle type |
input_sg_data | variadic of transform any param type or any handle type |
input_inst_data | variadic of transform any param type or any handle type |
target_sg_layout | variadic of transform any param type or any handle type |
target_sg_data | variadic of transform any param type or any handle type |
target_inst_data | variadic of transform any param type or any handle type |
Results: ¶
| Result | Description |
|---|---|
newConvertOp | TransformHandleTypeInterface instance |
transform.xegpu.get_load_op (transform::GetLoadOp) ¶
Get a handle to the load_nd op in producer chain of a value.
Syntax:
operation ::= `transform.xegpu.get_load_op` $target attr-dict `:` functional-type(operands, results)
Traces the producers of the given value until an xegpu.load_nd or
xegpu.load op is found. Returns a handle to it. Currently traces
producers by following only the first operand of producer ops.
Traits: NavigationTransformOpTrait
Interfaces: MemoryEffectsOpInterface, TransformOpInterface
Operands: ¶
| Operand | Description |
|---|---|
target | TransformValueHandleTypeInterface instance |
Results: ¶
| Result | Description |
|---|---|
loadNdHandle | TransformHandleTypeInterface instance |
transform.xegpu.insert_prefetch (transform::InsertPrefetchOp) ¶
Adds xegpu prefetch ops to a load op.
Syntax:
operation ::= `transform.xegpu.insert_prefetch` $target
`nb_prefetch` `=` ($dynamic_nb_prefetch^):($static_nb_prefetch)?
attr-dict `:` functional-type(operands, results)
Inserts xegpu.prefetch_nd operations for the given xegpu.load_nd op.
The load op must reside within the scf.for loop. Number of prefetch steps
is set by the nb_prefetch argument (default value is 1). Returns a handle
to the created xegpu.create_nd_desc op.
Interfaces: MemoryEffectOpInterface, TransformOpInterface
Attributes: ¶
| Attribute | MLIR Type | Description |
|---|---|---|
static_nb_prefetch | ::mlir::IntegerAttr | 64-bit signless integer attribute |
Operands: ¶
| Operand | Description |
|---|---|
target | TransformHandleTypeInterface instance |
dynamic_nb_prefetch | transform any param type or any handle type |
Results: ¶
| Result | Description |
|---|---|
desc_op | TransformHandleTypeInterface instance |
transform.xegpu.set_anchor_layout (transform::SetAnchorLayoutOp) ¶
Set anchor layout of an op.
Syntax:
operation ::= `transform.xegpu.set_anchor_layout` $target (`index` `=` $index^)?
`sg_layout` `=` custom<DynamicIndexList>($sg_layout, $static_sg_layout)
`sg_data` `=` custom<DynamicIndexList>($sg_data, $static_sg_data)
(`inst_data` `=` custom<DynamicIndexList>($inst_data, $static_inst_data)^)?
(`order` `=` $order^)?
(`slice_dims` `=` $slice_dims^)?
attr-dict `:` qualified(type(operands))
Sets the xegpu.layout anchor layout for XeGPU ops that support it. The
target operand value can be set by the index argument (currently only
applicable to a DPAS op). The layout is defined by the sg_layout,
sg_data and optional inst_data and order attributes. If slice_dims
is provided, the xegpu.layout attribute is wrapped in an
xegpu.slice<..., dims=slice_dims> attribute. Emits a silenceable failure
if the target op does not support anchor layouts.
Traits: AttrSizedOperandSegments
Interfaces: MemoryEffectOpInterface, TransformOpInterface
Attributes: ¶
| Attribute | MLIR Type | Description |
|---|---|---|
index | ::mlir::IntegerAttr | 64-bit signless integer attribute |
static_sg_layout | ::mlir::DenseI64ArrayAttr | i64 dense array attribute |
static_sg_data | ::mlir::DenseI64ArrayAttr | i64 dense array attribute |
static_inst_data | ::mlir::DenseI64ArrayAttr | i64 dense array attribute |
order | ::mlir::DenseI32ArrayAttr | i32 dense array attribute |
slice_dims | ::mlir::DenseI64ArrayAttr | i64 dense array attribute |
Operands: ¶
| Operand | Description |
|---|---|
target | TransformHandleTypeInterface instance |
sg_layout | variadic of transform any param type or any handle type |
sg_data | variadic of transform any param type or any handle type |
inst_data | variadic of transform any param type or any handle type |
transform.xegpu.set_gpu_launch_threads (transform::SetGPULaunchThreadsOp) ¶
Set number of threads for a given gpu.launch operation
Syntax:
operation ::= `transform.xegpu.set_gpu_launch_threads` $target
`threads` `=` custom<DynamicIndexList>($threads, $static_threads)
attr-dict `:` qualified(type(operands))
Overrides the x,y,z threads operands of a given gpu.launch operation in-place.
Interfaces: MemoryEffectOpInterface, TransformOpInterface
Attributes: ¶
| Attribute | MLIR Type | Description |
|---|---|---|
static_threads | ::mlir::DenseI64ArrayAttr | i64 dense array attribute |
Operands: ¶
| Operand | Description |
|---|---|
target | TransformHandleTypeInterface instance |
threads | variadic of transform any param type or any handle type |
MLIR