def METHOD_NAME(batch, m, k, n, lib, transa=False, transb=False, dtype="float32"):
    ashape = (batch, k, m) if transa else (batch, m, k)
    bshape = (batch, n, k) if transb else (batch, k, n)
    A = te.placeholder(ashape, name="A", dtype=dtype)
    B = te.placeholder(bshape, name="B", dtype=dtype)
    C = lib.batch_matmul(A, B, transa, transb)
    s = te.create_schedule(C.op)
    def get_numpy(a, b, transa, transb):
        if transa:
            a = a.transpose(0, 2, 1)
        if not transb:
            b = b.transpose(0, 2, 1)
        return tvm.topi.testing.batch_matmul(a, b)
    def verify(target="rocm"):
        if not tvm.testing.device_enabled(target):
            print("skip because %s is not enabled..." % target)
            return
        if not tvm.get_global_func(lib.__name__ + ".batch_matmul", True):
            print("skip because extern function is not available")
            return
        dev = tvm.rocm(0)
        f = tvm.build(s, [A, B, C], target)
        a = tvm.nd.array(np.random.uniform(size=ashape).astype(A.dtype), dev)
        b = tvm.nd.array(np.random.uniform(size=bshape).astype(B.dtype), dev)
        c = tvm.nd.array(np.zeros((batch, m, n), dtype=C.dtype), dev)
        f(a, b, c)
        tvm.testing.assert_allclose(
            c.numpy(), get_numpy(a.numpy(), b.numpy(), transa, transb), rtol=1e-5
        )
    verify()