def METHOD_NAME(target, dev, topi_name, dtype, tolerance, ewise_ref_data):
    target = tvm.target.Target(target)
    if target.kind.name == "vulkan" and topi_name in ["tan", "erf", "isnan", "isfinite", "isinf"]:
        pytest.xfail(f"Vulkan runtime doesn't support {topi_name} yet")
    topi_op = ewise_operations[topi_name]["topi"]
    skip_name_check = ewise_operations[topi_name].get("skip_name_check", False)
    m = te.var("m")
    l = te.var("l")
    A = te.placeholder((m, l), dtype=dtype, name="A")
    B = topi_op(A)
    assert tuple(B.shape) == tuple(A.shape)
    if not skip_name_check:
        assert B.op.body[0].op.name == "tir." + topi_name
    a_np, b_np = ewise_ref_data
    with tvm.target.Target(target):
        s = tvm.topi.testing.get_injective_schedule(target)(B)
    foo = tvm.build(s, [A, B], target, name=topi_name)
    a = tvm.nd.array(a_np, dev)
    b = tvm.nd.array(np.zeros_like(b_np), dev)
    foo(a, b)
    tvm.testing.assert_allclose(b.numpy(), b_np, rtol=tolerance, atol=tolerance)