brintos

brintos / llvm-project-archived public Read only

0
0
Text · 762 B · 1de8b25 Raw
28 lines · python
1# RUN: %PYTHON %s | FileCheck %s2 3from mlir.ir import *4from mlir.dialects import transform5from mlir.dialects.transform import nvgpu6 7 8def run(f):9    with Context(), Location.unknown():10        module = Module.create()11        with InsertionPoint(module.body):12            print("\nTEST:", f.__name__)13            f()14        print(module)15    return f16 17 18@run19def testCreateAsyncGroups():20    sequence = transform.SequenceOp(21        transform.FailurePropagationMode.Propagate, [], transform.AnyOpType.get()22    )23    with InsertionPoint(sequence.body):24        nvgpu.CreateAsyncGroupsOp(transform.AnyOpType.get(), sequence.bodyTarget)25        transform.YieldOp()26    # CHECK-LABEL: TEST: testCreateAsyncGroups27    # CHECK: transform.nvgpu.create_async_groups28