def abs_sum_run(shape, reduce_axis, keepdims, dtype, attrs):
    op_attrs = [reduce_axis, keepdims]
    if ('tuning' in attrs.keys()):
        t = attrs.get('tuning', False)
        kernel_name = attrs.get('kernel_name', False)
        mod = utils.op_build_test(abs_sum.abs_sum, [shape], [dtype], op_attrs, kernel_name=kernel_name, attrs=attrs, tuning=t)
        if t:
            (expect, input1, output) = gen_data(dtype, keepdims, reduce_axis, shape)
            return (mod, expect, (input1, output))
        else:
            return mod
    else:
        (expect, input1, output) = gen_data(dtype, keepdims, reduce_axis, shape)
        mod = utils.op_build_test(abs_sum.abs_sum, [shape], [dtype], op_attrs, kernel_name='abs_sum', attrs=attrs)
        output = utils.mod_launch(mod, (input1, output), expect=expect)
        return (input1, output, expect, compare_tensor(output, expect, rtol=0.005, atol=0.005, equal_nan=True))
def abs_sum_run(shape, reduce_axis, keepdims, dtype, attrs):
    op_attrs = [reduce_axis, keepdims]
    if ('tuning' in attrs.keys()):
        t = attrs.get('tuning', False)
        kernel_name = attrs.get('kernel_name', False)
        mod = utils.op_build_test(abs_sum.abs_sum, [shape], [dtype], op_attrs, kernel_name=kernel_name, attrs=attrs, tuning=t)
        if t:
            (expect, input1, output) = gen_data(dtype, keepdims, reduce_axis, shape)
            return (mod, expect, (input1, output))
        else:
            return mod
    else:
        (expect, input1, output) = gen_data(dtype, keepdims, reduce_axis, shape)
        mod = utils.op_build_test(abs_sum.abs_sum, [shape], [dtype], op_attrs, kernel_name='abs_sum', attrs=attrs)
        output = utils.mod_launch(mod, (input1, output), expect=expect)
        return (input1, output, expect, compare_tensor(output, expect, rtol=0.005, atol=0.005, equal_nan=True))