mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 01:15:50 +08:00
[MLIR][XeGPU][TransformOps] Add set_gpu_launch_threads op (#166865)
Adds `transform.xegpu.set_gpu_launch_threads` that overrides `gpu.launch` operation threads.
This commit is contained in:
@@ -113,3 +113,18 @@ def setOpLayoutAttrResult():
|
||||
# CHECK: sg_layout = [6, 4]
|
||||
# CHECK: sg_data = [32, 16]
|
||||
# CHECK: inst_data = [8, 16]
|
||||
|
||||
|
||||
@run
|
||||
def setGPULaunchThreadsOp():
|
||||
sequence = transform.SequenceOp(
|
||||
transform.FailurePropagationMode.Propagate,
|
||||
[],
|
||||
transform.OperationType.get("gpu.launch"),
|
||||
)
|
||||
with InsertionPoint(sequence.body):
|
||||
xegpu.set_gpu_launch_threads(sequence.bodyTarget, threads=[8, 4, 1])
|
||||
transform.YieldOp()
|
||||
# CHECK-LABEL: TEST: setGPULaunchThreadsOp
|
||||
# CHECK: transform.xegpu.set_gpu_launch_threads
|
||||
# CHECK: threads = [8, 4, 1]
|
||||
|
||||
Reference in New Issue
Block a user