
    wi                     4    d dl mZ dZd Zdee         fdZdS )    )Listi   c                     | | dz
  z  dk    S )N   r    )xs    f/root/.openclaw/workspace/chatterbox_venv_py311/lib/python3.11/site-packages/triton/language/_utils.pyis_power_of_twor	      s    QKA    shapec           	      >   d}t          |           D ]d\  }}t          |t                    s#t          d| dt	          |           d          t          |          st          d| d          ||z  }e|t          k    rt          d| dt           d          |S )	Nr   zShape element z1 must have type `constexpr[int]`, got `constexpr[]z must be a power of 2znumel (z') exceeds triton maximum tensor numel ())	enumerate
isinstanceint	TypeErrortyper	   
ValueErrorTRITON_MAX_TENSOR_NUMEL)r   numelids       r   validate_block_shaper   
   s    E%    1!S!! 	mkQkkaefgahahkkklllq!! 	HFaFFFGGG
&&&k5kkQhkkklllLr
   N)typingr   r   r	   r   r   r   r
   r   <module>r      sU         !   S	      r
   