1# RUN: %PYTHON %s | FileCheck %s 2# This is just a smoke test that the dialect is functional. 3 4from mlir.ir import * 5from mlir.dialects import rocdl 6 7 8def constructAndPrintInModule(f): 9 print("\nTEST:", f.__name__) 10 with Context(), Location.unknown(): 11 module = Module.create() 12 with InsertionPoint(module.body): 13 f() 14 print(module) 15 return f 16 17 18# CHECK-LABEL: testSmoke 19@constructAndPrintInModule 20def testSmoke(): 21 # CHECK: rocdl.barrier 22 rocdl.BarrierOp() 23