def get_gen_profiler(a_layout, b_layout, c_layout):
    """
    Return gen_profiler for given layouts of A, B, and C/bias.
    """

    def gen_profiler(func_attrs, workdir, profiler_filename, dim_info_dict):
        a_dims = bmm_common.reverse_dim_info_mapping(
            dim_info_dict, gemm_common.Source.INPUT, 0
        )
        b_dims = bmm_common.reverse_dim_info_mapping(
            dim_info_dict, gemm_common.Source.INPUT, 1
        )
        c_dims = bmm_common.reverse_dim_info_mapping(
            dim_info_dict, gemm_common.Source.OUTPUT, 0
        )

        args_parser = bmm_common.ARGS_PARSER_TEMPLATE.render(
            a_dims=a_dims, b_dims=b_dims, c_dims=c_dims
        )

        problem_args = _get_problem_args(a_layout, b_layout, c_layout)
        default_mm_info = bmm_common.get_default_problem_info(
            problem_args,
            bias_ptr="d_ptr",
            alpha_value=func_attrs.get("alpha", 1),
            beta_value=1,
        )
        a_shapes = func_attrs["input_accessors"][0].original_shapes
        b_shapes = func_attrs["input_accessors"][1].original_shapes
        d_shapes = func_attrs["input_accessors"][2].original_shapes
        bmm_common._update_stride_info(default_mm_info, a_shapes, b_shapes, d_shapes)

        problem_args = bmm_common.PROBLEM_ARGS_TEMPLATE.render(
            mm_info=default_mm_info,
        )
        problem_args_cutlass_3x = bmm_common.PROBLEM_ARGS_TEMPLATE_CUTLASS_3X.render(
            mm_info=bmm_common.add_elem_types_to_mm_info(
                mm_info=default_mm_info,
                func_attrs=func_attrs,
            ),
        )

        return bmm_common.gen_profiler(
            func_attrs=func_attrs,
            workdir=workdir,
            profiler_filename=profiler_filename,
            dim_info_dict=dim_info_dict,
            src_template=common.SRC_TEMPLATE,
            problem_args=problem_args,
            problem_args_cutlass_3x=problem_args_cutlass_3x,
            args_parser=args_parser,
        )

    return gen_profiler

    Return gen_profiler for given layouts of A, B, and C/bias.
    
python/aitemplate/backend/cuda/gemm_universal/bmm_xxx_add.py