code: def reference_bias_act_implementation(
      input: torch.Tensor,
      bias: Optional[torch.Tensor],
      act_type: ActivationType,
  ) -> torch.Tensor:
      bias_func_map = {
          ActivationType.RELU: torch.nn.functional.relu,
          ActivationType.GELU: torch.nn.functional.gelu,
          ActivationType.SILU: torch.nn.functional.silu,
          ActivationType.IDENTITY: lambda x: x,
      }
  
      dtype = input.dtype
      input_f = input.to(torch.float32)
      if bias is not None:
          bias_f = bias.to(torch.float32)
          output_f = input_f + bias_f
      else:
          output_f = input_f
      output_f = bias_func_map[act_type](output_f)
  
      return output_f.to(dtype)
  
file_path: deepspeed/tests/unit/inference/v2/kernels/core_ops/test_bias_activation.py
imports: from typing import Optional
  import pytest
  import torch
  from deepspeed.accelerator import get_accelerator
  from deepspeed.inference.v2.inference_utils import ActivationType, DtypeEnum
  from deepspeed.inference.v2.kernels.core_ops import CUDABiasActivation
  from ....v2.inference_test_utils import get_dtypes, allclose
label_desc: Use image node_id 1 for calling a global function with example usage: reference_bias_act_implementation(input, bias, act_type) and returns: output_f