def conv2d_gen_function(
    func_attrs,
    exec_cond_template,
    shape_eval_template,
    shape_save_template,
):
    """Generates function body.

    Parameters
    ----------
    func_attrs : Dict
        Operation attributes.
    instance_template : jinja2.Template
        Template that defines the model. e.g. 'using model=xxx'.
    exec_template : jinja2.Template
        Execution statements in main function.
    src_template : jinja2.Template
        Full main.cpp with headers, embedding all templates.
    exec_cond_template : jinja2.Template
        Generates if statement to execute kernel.
    shape_eval_template : jinja2.Template
        Generates shape calculation.
        The template is passed from compiler/ops/pool.
    shape_save_template : jinja2.Template
        Generates output dimensions.
        The template is passed from compiler/ops/pool.


    Returns
    -------
    str
        The rendered template of generated function body.
    """
    return common.gen_function(
        func_attrs,
        exec_cond_template,
        shape_eval_template,
        shape_save_template,
        "",
        extra_code=common.HEADER_CODE.render(),
    )
Generates function body.

    Parameters
    ----------
    func_attrs : Dict
        Operation attributes.
    instance_template : jinja2.Template
        Template that defines the model. e.g. 'using model=xxx'.
    exec_template : jinja2.Template
        Execution statements in main function.
    src_template : jinja2.Template
        Full main.cpp with headers, embedding all templates.
    exec_cond_template : jinja2.Template
        Generates if statement to execute kernel.
    shape_eval_template : jinja2.Template
        Generates shape calculation.
        The template is passed from compiler/ops/pool.
    shape_save_template : jinja2.Template
        Generates output dimensions.
        The template is passed from compiler/ops/pool.


    Returns
    -------
    str
        The rendered template of generated function body.
    
python/aitemplate/backend/rocm/conv2d/conv2d.py