code: def fast_group_norm(
      x: torch.Tensor,
      num_groups: int,
      weight: Optional[torch.Tensor] = None,
      bias: Optional[torch.Tensor] = None,
      eps: float = 1e-5,
  ) -> torch.Tensor:
      if torch.jit.is_scripting():
          # currently cannot use is_autocast_enabled within torchscript
          return F.group_norm(x, num_groups, weight, bias, eps)
  
      if torch.is_autocast_enabled():
          # normally native AMP casts GN inputs to float32
          # here we use the low precision autocast dtype
          # FIXME what to do re CPU autocast?
          dt = torch.get_autocast_gpu_dtype()
          x, weight, bias = (
              x.to(dt),
              weight.to(dt),
              bias.to(dt) if bias is not None else None,
          )
  
      with torch.cuda.amp.autocast(enabled=False):
          return F.group_norm(x, num_groups, weight, bias, eps)
  
file_path: pytorch-image-models/timm/layers/fast_norm.py
imports: from typing import List, Optional
  import torch
  from torch.nn import functional
label_desc: Use image node_id 3 for calling a global function with example usage: fast_group_norm(x, num_groups, weight, bias, eps) and returns: F, F