mlir.dialects.transform.xegpu¶
Classes¶
Specialization for ConvertLayoutOp class. |
|
Specialization for GetDescOp class. |
|
Specialization for InsertPrefetchOp class. |
|
Specialization for SetDescLayoutOp class. |
|
Specialization for SetGPULaunchThreadsOp class. |
|
Specialization for SetOpLayoutAttrOp class. |
|
Specialization for GetDescOp class. |
|
Specialization for SetDescLayoutOp class. |
|
Specialization for SetOpLayoutAttrOp class. |
|
Specialization for SetGPULaunchThreadsOp class. |
|
Specialization for InsertPrefetchOp class. |
|
Specialization for ConvertLayoutOp class. |
Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Module Contents¶
- class mlir.dialects.transform.xegpu.ConvertLayoutOp(newConvertOp, target, input_sg_layout, input_sg_data, input_inst_data, target_sg_layout, target_sg_data, target_inst_data, *, static_input_sg_layout=None, static_input_sg_data=None, static_input_inst_data=None, static_target_sg_layout=None, static_target_sg_data=None, static_target_inst_data=None, loc=None, ip=None)¶
Bases:
_ods_irAdds an
xegpu.convert_layoutop to convert thexegpu.layoutattribute of a value. The input and target layouts are defined by the*sg_layout,*sg_dataand optional*inst_dataattributes. Returns a handle to the emittedxegpu.convert_layoutop.- OPERATION_NAME = 'transform.xegpu.convert_layout'¶
- _ODS_OPERAND_SEGMENTS¶
- _ODS_REGIONS = (0, True)¶
- target() _ods_ir¶
- input_sg_layout() _ods_ir¶
- input_sg_data() _ods_ir¶
- input_inst_data() _ods_ir¶
- target_sg_layout() _ods_ir¶
- target_sg_data() _ods_ir¶
- target_inst_data() _ods_ir¶
- static_input_sg_layout() _ods_ir | None¶
- static_input_sg_data() _ods_ir | None¶
- static_input_inst_data() _ods_ir | None¶
- static_target_sg_layout() _ods_ir | None¶
- static_target_sg_data() _ods_ir | None¶
- static_target_inst_data() _ods_ir | None¶
- newConvertOp() _ods_ir¶
- mlir.dialects.transform.xegpu.xegpu_convert_layout(new_convert_op, target, input_sg_layout, input_sg_data, input_inst_data, target_sg_layout, target_sg_data, target_inst_data, *, static_input_sg_layout=None, static_input_sg_data=None, static_input_inst_data=None, static_target_sg_layout=None, static_target_sg_data=None, static_target_inst_data=None, loc=None, ip=None) _ods_ir¶
- class mlir.dialects.transform.xegpu.GetDescOp(descHandle, target, *, loc=None, ip=None)¶
Bases:
_ods_irTraces the producers of the given value until an
xegpu.create_nd_tdescdescriptor op is found. Returns a handle to it. Currently traces producers by following only the first operand of producer ops.- OPERATION_NAME = 'transform.xegpu.get_desc_op'¶
- _ODS_REGIONS = (0, True)¶
- target() _ods_ir¶
- descHandle() _ods_ir¶
- mlir.dialects.transform.xegpu.xegpu_get_desc_op(desc_handle, target, *, loc=None, ip=None) _ods_ir¶
- class mlir.dialects.transform.xegpu.InsertPrefetchOp(desc_op, target, *, dynamic_nb_prefetch=None, static_nb_prefetch=None, loc=None, ip=None)¶
Bases:
_ods_irGiven a target value (e.g.,
vector) residing in ascf.forloop, this transform finds the correspondingxegpu.load_ndop and insertsxegpu.prefetch_ndoperations for the tile. The load op must reside within thescf.forloop. Number of prefetch steps is set by thenb_prefetchargument (default value is 1). Returns a handle to the createdxegpu.create_nd_descop.- OPERATION_NAME = 'transform.xegpu.insert_prefetch'¶
- _ODS_REGIONS = (0, True)¶
- target() _ods_ir¶
- dynamic_nb_prefetch() _ods_ir | None¶
- static_nb_prefetch() _ods_ir | None¶
- desc_op() _ods_ir¶
- mlir.dialects.transform.xegpu.xegpu_insert_prefetch(desc_op, target, *, dynamic_nb_prefetch=None, static_nb_prefetch=None, loc=None, ip=None) _ods_ir¶
- class mlir.dialects.transform.xegpu.SetDescLayoutOp(transformed, target, sg_layout, sg_data, inst_data, *, static_sg_layout=None, static_sg_data=None, static_inst_data=None, slice_dims=None, loc=None, ip=None)¶
Bases:
_ods_irGiven an
xegpu.create_nd_descoperation, this transform addsxegpu.layoutattribute to the result tensor descriptor. The layout is defined by thesg_layout, andsg_dataand optionalinst_dataattributes. Ifslice_dimsis provided, thexegpu.layoutattribute is wrapped in anxegpu.slice<..., dims=slice_dims>attribute. Returns a handle to the transformed op.- OPERATION_NAME = 'transform.xegpu.set_desc_layout'¶
- _ODS_OPERAND_SEGMENTS¶
- _ODS_REGIONS = (0, True)¶
- target() _ods_ir¶
- sg_layout() _ods_ir¶
- sg_data() _ods_ir¶
- inst_data() _ods_ir¶
- static_sg_layout() _ods_ir | None¶
- static_sg_data() _ods_ir | None¶
- static_inst_data() _ods_ir | None¶
- slice_dims() _ods_ir | None¶
- transformed() _ods_ir¶
- mlir.dialects.transform.xegpu.xegpu_set_desc_layout(transformed, target, sg_layout, sg_data, inst_data, *, static_sg_layout=None, static_sg_data=None, static_inst_data=None, slice_dims=None, loc=None, ip=None) _ods_ir¶
- class mlir.dialects.transform.xegpu.SetGPULaunchThreadsOp(target, threads, *, static_threads=None, loc=None, ip=None)¶
Bases:
_ods_irOverrides the x,y,z threads operands of a given
gpu.launchoperation in-place.- OPERATION_NAME = 'transform.xegpu.set_gpu_launch_threads'¶
- _ODS_REGIONS = (0, True)¶
- target() _ods_ir¶
- threads() _ods_ir¶
- static_threads() _ods_ir | None¶
- mlir.dialects.transform.xegpu.xegpu_set_gpu_launch_threads(target, threads, *, static_threads=None, loc=None, ip=None) SetGPULaunchThreadsOp¶
- class mlir.dialects.transform.xegpu.SetOpLayoutAttrOp(target, sg_layout, sg_data, inst_data, *, index=None, static_sg_layout=None, static_sg_data=None, static_inst_data=None, slice_dims=None, result=None, loc=None, ip=None)¶
Bases:
_ods_irSets the
xegpu.layoutattribute of an op. Ifresult=true, sets thelayout_result_{index}, otherwiselayout_operand_{index}attribute. The target operand/result value is defined by theindexargument. The layout is defined by thesg_layout,sg_dataand optionalinst_dataattributes. Ifslice_dimsis provided, thexegpu.layoutattribute is wrapped in anxegpu.slice<..., dims=slice_dims>attribute.- OPERATION_NAME = 'transform.xegpu.set_op_layout_attr'¶
- _ODS_OPERAND_SEGMENTS¶
- _ODS_REGIONS = (0, True)¶
- target() _ods_ir¶
- sg_layout() _ods_ir¶
- sg_data() _ods_ir¶
- inst_data() _ods_ir¶
- index() _ods_ir | None¶
- static_sg_layout() _ods_ir | None¶
- static_sg_data() _ods_ir | None¶
- static_inst_data() _ods_ir | None¶
- slice_dims() _ods_ir | None¶
- result() bool¶
- mlir.dialects.transform.xegpu.xegpu_set_op_layout_attr(target, sg_layout, sg_data, inst_data, *, index=None, static_sg_layout=None, static_sg_data=None, static_inst_data=None, slice_dims=None, result=None, loc=None, ip=None) SetOpLayoutAttrOp¶
- class mlir.dialects.transform.xegpu.GetDescOp(target: Value, *, loc=None, ip=None)¶
Bases:
GetDescOpSpecialization for GetDescOp class.
- class mlir.dialects.transform.xegpu.SetDescLayoutOp(target: Operation | Value, sg_layout: mlir.dialects._ods_common.MixedValues, sg_data: mlir.dialects._ods_common.MixedValues, *, inst_data: mlir.dialects._ods_common.MixedValues | None = None, slice_dims: mlir.dialects._ods_common.MixedInt | None = None, loc=None, ip=None)¶
Bases:
SetDescLayoutOpSpecialization for SetDescLayoutOp class.
- mlir.dialects.transform.xegpu.set_desc_layout(target: Operation | Value, sg_layout: mlir.dialects._ods_common.MixedValues, sg_data: mlir.dialects._ods_common.MixedValues, *, inst_data: mlir.dialects._ods_common.MixedValues | None = None, slice_dims: mlir.dialects._ods_common.MixedInt | None = None, loc=None, ip=None) OpResult¶
- class mlir.dialects.transform.xegpu.SetOpLayoutAttrOp(target: Operation | Value, sg_layout: mlir.dialects._ods_common.MixedValues, sg_data: mlir.dialects._ods_common.MixedValues, *, inst_data: mlir.dialects._ods_common.MixedValues | None = None, slice_dims: mlir.dialects._ods_common.MixedInt | None = None, index: int | Attribute | None = None, result: bool | Attribute | None = None, loc=None, ip=None)¶
Bases:
SetOpLayoutAttrOpSpecialization for SetOpLayoutAttrOp class.
- mlir.dialects.transform.xegpu.set_op_layout_attr(target: Operation | Value, sg_layout: mlir.dialects._ods_common.MixedValues, sg_data: mlir.dialects._ods_common.MixedValues, *, inst_data: mlir.dialects._ods_common.MixedValues | None = None, slice_dims: mlir.dialects._ods_common.MixedInt | None = None, index: int | Attribute | None = None, result: bool | Attribute | None = None, loc=None, ip=None) SetOpLayoutAttrOp¶
- class mlir.dialects.transform.xegpu.SetGPULaunchThreadsOp(launch_op: Operation | Value, threads: mlir.dialects._ods_common.MixedValues, *, loc=None, ip=None)¶
Bases:
SetGPULaunchThreadsOpSpecialization for SetGPULaunchThreadsOp class.
- mlir.dialects.transform.xegpu.set_gpu_launch_threads(launch_op: Operation | Value, threads: mlir.dialects._ods_common.MixedValues, *, loc=None, ip=None) SetGPULaunchThreadsOp¶
- class mlir.dialects.transform.xegpu.InsertPrefetchOp(target: Value, *, nb_prefetch: mlir.dialects._ods_common.MixedInt | None = 1, loc=None, ip=None)¶
Bases:
InsertPrefetchOpSpecialization for InsertPrefetchOp class.
- mlir.dialects.transform.xegpu.insert_prefetch(target: Value, *, nb_prefetch: mlir.dialects._ods_common.MixedInt | None = 1, loc=None, ip=None) OpResult¶
- class mlir.dialects.transform.xegpu.ConvertLayoutOp(target: Value, input_sg_layout: mlir.dialects._ods_common.MixedValues, input_sg_data: mlir.dialects._ods_common.MixedValues, target_sg_layout: mlir.dialects._ods_common.MixedValues, target_sg_data: mlir.dialects._ods_common.MixedValues, *, input_inst_data: mlir.dialects._ods_common.MixedValues | None = None, target_inst_data: mlir.dialects._ods_common.MixedValues | None = None, loc=None, ip=None)¶
Bases:
ConvertLayoutOpSpecialization for ConvertLayoutOp class.
- mlir.dialects.transform.xegpu.convert_layout(target: Value, input_sg_layout: mlir.dialects._ods_common.MixedValues, input_sg_data: mlir.dialects._ods_common.MixedValues, target_sg_layout: mlir.dialects._ods_common.MixedValues, target_sg_data: mlir.dialects._ods_common.MixedValues, *, input_inst_data: mlir.dialects._ods_common.MixedValues | None = None, target_inst_data: mlir.dialects._ods_common.MixedValues | None = None, loc=None, ip=None) ConvertLayoutOp¶