parameters: (prog)
docstring: Identify the pattern that corresponds to the tanh approximate version of gelu, and replace it with a single
      gelu layer with mode=TANH_APPROXIMATION
  
      y = ( tanh((.0447)x^3 + x ) * (sqrt(2/pi)) + 1 ) * 0.5 * x
  
      [...] -----> pow (3) ----> mul (.044715) ---> add -----> mul (sqrt(2/pi)) ---> tanh ----> add (1) ----> mul (0.5) -----> mul ---> [...]
        |                                            ^                                                                          ^
        |                                            |                                                                          |
        |------------------------------------------------------------------------------------------------------------------------
docstring_summary: Identify the pattern that corresponds to the tanh approximate version of gelu, and replace it with a single
      gelu layer with mode=TANH_APPROXIMATION
docstring_tokens: Identify the pattern that corresponds to the tanh approximate version of gelu and replace it with a single gelu layer with mode = TANH_APPROXIMATION
function: def fuse_gelu_tanh_approximation(prog):
      """
      Identify the pattern that corresponds to the tanh approximate version of gelu, and replace it with a single
      gelu layer with mode=TANH_APPROXIMATION
  
      y = ( tanh((.0447)x^3 + x ) * (sqrt(2/pi)) + 1 ) * 0.5 * x
  
      [...] -----> pow (3) ----> mul (.044715) ---> add -----> mul (sqrt(2/pi)) ---> tanh ----> add (1) ----> mul (0.5) -----> mul ---> [...]
        |                                            ^                                                                          ^
        |                                            |                                                                          |
        |------------------------------------------------------------------------------------------------------------------------
  
  
      """
      for f_name, f in prog.functions.items():
          block_changed = True
          while block_changed:
              block_changed = fuse_gelu_tanh_block(f)
function_tokens: def fuse_gelu_tanh_approximation ( prog ) : for f_name , f in prog . functions . items ( ) : block_changed = True while block_changed : block_changed = fuse_gelu_tanh_block ( f )