import torch
from vllm.model_executor.layers.activation import QuickGELU
from vllm_mlu.mlu_hijack_utils import MluHijackObject
from vllm import _mlu_ops as mlu_ops

def vllm__model_executor__activation__QuickGELU__forward_mlu(self, x: torch.Tensor) -> torch.Tensor:
    '''
    =============================
    Modify by vllm_mlu
    =============================
    @brief: implement forward_mlu
    '''
    return mlu_ops.active(x, 'quick_gelu', False)
    '''
    ==================
    End of MLU Hijack
    ==================
    '''

MluHijackObject.apply_hijack(QuickGELU,
                             "forward_mlu",
                             vllm__model_executor__activation__QuickGELU__forward_mlu)
