code: def chatglm_rms_norm_forward(self, hidden_states):
      if hidden_states.device.type == "xpu" and not (
          self.training and hidden_states.requires_grad
      ):
          import linear_q4_0
  
          result = linear_q4_0.fused_rms_norm(
              hidden_states,
              [self.weight.size(0)],
              self.weight,
              None,
              self.eps,
          )
          # if nelement == 0, means fused norm failed, go back to python implement.
          if result.nelement != 0:
              # We should copy this result to avoid <unk> by unknown reason on Arc GPUs.
              result = result.clone()
              return result
      input_dtype = hidden_states.dtype
      hidden_states = hidden_states.to(torch.float32)
      variance = hidden_states.pow(2).mean(-1, keepdim=True)
      hidden_states = hidden_states * torch.rsqrt(variance + self.eps)
      return self.weight * hidden_states.to(input_dtype)
  
file_path: BigDL/python/llm/src/bigdl/llm/transformers/models/chatglm2.py
imports: import math
  import torch
  from typing import Optional, Tuple, List
  import torch.nn.functional
  from transformers.modeling_outputs import BaseModelOutputWithPast
  from bigdl.llm.transformers.models.utils import init_kv_cache, extend_kv_cache, append_kv_cache
  from bigdl.llm.transformers.models.utils import use_flash_attention
  from bigdl.llm.transformers.models.llama import get_ipex_version
label_desc: Use image node_id 3 for calling a global function with example usage: chatglm_rms_norm_forward(hidden_states) and returns: unknown, result