Files
clang-p2996/mlir/test/python/dialects/transform_nvgpu_ext.py
Oleksandr "Alex" Zinenko bc30b415ca [mlir] enable python bindings for nvgpu transforms (#68088)
Expose the autogenerated bindings.

Co-authored-by: Martin Lücke <mluecke@google.com>
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