def add_profiler(
    file_pairs: List[Any], workdir: str, op_type, output_name: str, code: str
) -> None:
    """generate code for profiling"""
    prefix = os.path.join(workdir, "profiler", op_type)
    if not os.path.exists(prefix):
        os.makedirs(prefix)
    src_path = os.path.join(prefix, output_name + ".cu")
    obj_path = os.path.join(prefix, output_name)
    if os.path.exists(obj_path):
        return
    with open(src_path, "w") as f:
        f.write(code)
    file_pairs.append((src_path, obj_path))
generate code for profiling
python/aitemplate/backend/common/vision_ops/nms_common.py