def METHOD_NAME(target, dev, axis, is_ascend):
    np.random.seed(0)
    dshape = (20, 100)
    data_dtype = "float32"
    data = te.placeholder(dshape, name="data", dtype=data_dtype)
    perm = np.arange(dshape[0] * dshape[1], dtype=data_dtype)
    np.random.shuffle(perm)
    np_data = perm.reshape(dshape)
    if is_ascend:
        np_sort = np.sort(np_data, axis=axis)
    else:
        np_sort = -np.sort(-np_data, axis=axis)
    if axis == 0:
        np_sort = np_sort[: dshape[axis], :]
    else:
        np_sort = np_sort[:, : dshape[axis]]
    with tvm.target.Target(target):
        fcompute, fschedule = tvm.topi.testing.dispatch(target, _sort_implement)
        out = fcompute(data, axis=axis, is_ascend=is_ascend)
        s = fschedule(out)
    tvm_data = tvm.nd.array(np_data, dev)
    tvm_out = tvm.nd.array(np.zeros(dshape, dtype=data_dtype), dev)
    f = tvm.build(s, [data, out], target)
    f(tvm_data, tvm_out)
    tvm.testing.assert_allclose(tvm_out.numpy(), np_sort, rtol=1e0)