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)^)?
`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)^)?
attr-dict `:` functional-type(operands, results)
Adds an xegpu.convert_layout op to convert the xegpu.layout attribute
of a value. The input and target layouts are defined by the *sg_layout,
*sg_data and optional *inst_data attributes. Returns a handle to the
emitted xegpu.convert_layout op.
Traits: AttrSizedOperandSegments
Interfaces: MemoryEffectOpInterface, TransformOpInterface
Attributes: ¶
| Attribute | MLIR Type | Description |
|---|---|---|
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 |
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_desc_op (transform::GetDescOp) ¶
Get a handle to the descriptor op of a value.
Syntax:
operation ::= `transform.xegpu.get_desc_op` $target attr-dict `:` functional-type(operands, results)
Traces the producers of the given value until an xegpu.create_nd_tdesc
descriptor 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 |
|---|---|
descHandle | TransformHandleTypeInterface instance |
transform.xegpu.insert_prefetch (transform::InsertPrefetchOp) ¶
Adds xegpu prefetch ops to matmul operand tiles.
Syntax:
operation ::= `transform.xegpu.insert_prefetch` $target
`nb_prefetch` `=` ($dynamic_nb_prefetch^):($static_nb_prefetch)?
attr-dict `:` functional-type(operands, results)
Given a target value (e.g., vector) residing in a scf.for loop, this
transform finds the corresponding xegpu.load_nd op and inserts
xegpu.prefetch_nd operations for the tile. 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 | TransformValueHandleTypeInterface instance |
dynamic_nb_prefetch | transform any param type or any handle type |
Results: ¶
| Result | Description |
|---|---|
desc_op | TransformHandleTypeInterface instance |
transform.xegpu.set_desc_layout (transform::SetDescLayoutOp) ¶
Set xegpu.layout attribute to a xegpu.create_nd_desc op result.
Syntax:
operation ::= `transform.xegpu.set_desc_layout` $target
`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)^)?
(`slice_dims` `=` $slice_dims^)?
attr-dict `:` functional-type(operands, results)
Given an xegpu.create_nd_desc operation, this transform adds
xegpu.layout attribute to the result tensor descriptor. The layout is
defined by the sg_layout, and sg_data and optional inst_data
attributes. If slice_dims is provided, the xegpu.layout attribute is
wrapped in an xegpu.slice<..., dims=slice_dims> attribute. Returns a handle to
the transformed op.
Traits: AttrSizedOperandSegments
Interfaces: MemoryEffectOpInterface, TransformOpInterface
Attributes: ¶
| Attribute | MLIR Type | Description |
|---|---|---|
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 |
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 |
Results: ¶
| Result | Description |
|---|---|
transformed | TransformHandleTypeInterface instance |
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 |
transform.xegpu.set_op_layout_attr (transform::SetOpLayoutAttrOp) ¶
Set xegpu.layout attribute of an op.
Syntax:
operation ::= `transform.xegpu.set_op_layout_attr` $target (`result` $result^)? (`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)^)?
(`slice_dims` `=` $slice_dims^)?
attr-dict `:` qualified(type(operands))
Sets the xegpu.layout attribute of an op. If result=true, sets the
layout_result_{index}, otherwise layout_operand_{index} attribute. The
target operand/result value is defined by the index argument. The layout
is defined by the sg_layout, sg_data and optional inst_data
attributes. If slice_dims is provided, the xegpu.layout attribute is
wrapped in an xegpu.slice<..., dims=slice_dims> attribute.
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 |
slice_dims | ::mlir::DenseI64ArrayAttr | i64 dense array attribute |
result | ::mlir::UnitAttr | unit 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 |
MLIR