def METHOD_NAME(target, dev, axis, is_ascend):
    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_indices = np.argsort(np_data, axis=axis)
    else:
        np_indices = np.argsort(-np_data, axis=axis)
    if axis == 0:
        np_indices = np_indices[: dshape[axis], :]
    else:
        np_indices = np_indices[:, : dshape[axis]]
    with tvm.target.Target(target):
        fcompute, fschedule = tvm.topi.testing.dispatch(target, _argsort_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_indices.astype(data_dtype), rtol=1e0)