o
    پi
                     @  s`   d dl mZ d dlmZ d dlZd dlmZmZ er d dlm	Z	 dZ
edd	d
ZdddZdS )    )annotations)TYPE_CHECKINGN)
cache_onceload_jit)Module   returnr   c                   C  s   t ddgdgdS )Ngptq_marlin_repackz"gemm/marlin/gptq_marlin_repack.cuh)r	   r	   )
cuda_filescuda_wrappers)r    r   r   X/home/ubuntu/.local/lib/python3.10/site-packages/sglang/jit_kernel/gptq_marlin_repack.py_jit_gptq_marlin_repack_module   s
   r   
b_q_weighttorch.Tensorpermsize_kintsize_nnum_bitsc                 C  sJ   d| }t j|t |t | f| j| jd}t }|| ||||| |S )N    )dtypedevice)torchempty
_TILE_SIZEr   r   r   r	   )r   r   r   r   r   pack_factoroutmoduler   r   r   r	      s   r	   )r   r   )r   r   r   r   r   r   r   r   r   r   r   r   )
__future__r   typingr   r   sglang.jit_kernel.utilsr   r   tvm_ffi.moduler   r   r   r	   r   r   r   r   <module>   s    