Files
llvm-tms34010/mlir/test/python/dialects/transform_nvgpu_ext.py
T
2023-10-03 14:52:52 +02:00

28 lines
762 B
Python

# RUN: %PYTHON %s | FileCheck %s
from mlir.ir import *
from mlir.dialects import transform
from mlir.dialects.transform import nvgpu
def run(f):
with Context(), Location.unknown():
module = Module.create()
with InsertionPoint(module.body):
print("\nTEST:", f.__name__)
f()
print(module)
return f
@run
def testCreateAsyncGroups():
sequence = transform.SequenceOp(
transform.FailurePropagationMode.Propagate, [], transform.AnyOpType.get()
)
with InsertionPoint(sequence.body):
nvgpu.CreateAsyncGroupsOp(transform.AnyOpType.get(), sequence.bodyTarget)
transform.YieldOp()
# CHECK-LABEL: TEST: testCreateAsyncGroups
# CHECK: transform.nvgpu.create_async_groups