def gen_profiler(func_attrs, workdir, header_files, backend_spec):
    """the function for generating profiler for nms op"""
    op_type = func_attrs["op"]
    file_pairs = []
    elem_input_type = backend_spec.dtype_to_backend_type(
        func_attrs["inputs"][0]._attrs["dtype"]
    )
    code = PROFILER_TEMPLATE.render(
        header_files=header_files,
        elem_input_type=elem_input_type,
        kernel=kernel.render(
            prefix=backend_spec.prefix,
            cub=backend_spec.cub,
            elem_input_type=elem_input_type,
        ),
        func_signature=FUNC_SIGNATURE.render(
            func_name=func_attrs["name"], prefix=backend_spec.prefix
        ),
    )
    op_name = func_attrs["op"]
    add_profiler(file_pairs, workdir, op_type, op_name, code)
    return file_pairs
the function for generating profiler for nms op
python/aitemplate/backend/common/vision_ops/efficient_nms_common.py