def groupnorm_gen_profiler(
    func_attrs: Dict[str, Any],
    workdir: str,
    indent: str = "  ",
    use_swish: bool = False,
) -> str:
    """Generates standalone executables for profiler.

    Parameters
    ----------
    func_attrs : Dict
        Operation attributes.
    workdir : str
        Directory to store the generated outputs.
    indent : str, optional
        Indent for codegen, target dependent e.g. C++, python, etc., by default "  ".
    use_swish : bool, optional
        Use swish if True
    """
    # N, H, W, C
    shapes = func_attrs["inputs"][0]._attrs["shape"]

    for dim_idx in (1, 2, 3):
        assert isinstance(
            shapes[dim_idx], IntImm
        ), f"groupnorm requires reduction dim {dim_idx=} to be static"

    return norm_common.gen_profiler(
        func_attrs,
        workdir,
        5,  # rank
        SHAPE_EVAL_TEMPLATE,
        EXEC_TEMPLATE,
        TENSOR_DECL_TEMPLATE,
        EXTRA_HEADERS,
        get_func_signature_profiler,
        EXTRA_CODE_TEMPLATE.render(use_swish=use_swish),
        PROFILER_FUNC_CALL_TEMPLATE,
        indent,
    )
Generates standalone executables for profiler.

Parameters
----------
func_attrs : Dict
Operation attributes.
workdir : str
Directory to store the generated outputs.
indent : str, optional
Indent for codegen, target dependent e.g. C++, python, etc., by default "  ".
use_swish : bool, optional
Use swish if True
python/aitemplate/backend/rocm/normalization/groupnorm.py