o
    پi                     @   s`   d dl Z 		dde jde jde jdedef
dd	Z	
dde jde jde jdede jf
ddZdS )    N   xscaleshiftblock_lblock_cc                 C   s   | d|  | S )N    )r   r   r   r   r   r	   r	   c/home/ubuntu/.local/lib/python3.10/site-packages/sglang/jit_kernel/diffusion/triton/npu_fallback.pyfuse_scale_shift_native   s   r   Fcossininterleavedreturnc                 C   s   | d| j}| d| j}| dd d df }| ddd df }|| ||  }|| ||  }tj||fdddS )N.   r   )dim)	unsqueezetodtypetorchstackflatten)r   r   r   r   x1x2o1o2r	   r	   r
   apply_rotary_embedding_native   s   r   )r   r   )F)r   Tensorintr   boolr   r	   r	   r	   r
   <module>   s4    
