Files
clang-p2996/mlir/test/python/dialects/gpu.py
rkayaith 66645a03fc [mlir][python] Include anchor op in PassManager.parse
The pipeline string must now include the pass manager's anchor op. This
makes the parse API properly roundtrip the printed form of a pass
manager.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D136405
2022-11-03 11:49:48 -04:00

20 lines
381 B
Python

# RUN: %PYTHON %s | FileCheck %s
from mlir.ir import *
import mlir.dialects.gpu
import mlir.dialects.gpu.passes
from mlir.passmanager import *
def run(f):
print("\nTEST:", f.__name__)
f()
def testGPUPass():
with Context() as context:
PassManager.parse('any(gpu-kernel-outlining)')
print('SUCCESS')
# CHECK-LABEL: testGPUPass
# CHECK: SUCCESS
run(testGPUPass)