
    uki&                     Z   d Z ddlZddlZddlmZ  ej
                  dddg      Zej                   G d dej                               Z	e	j                  Z
e	j                  Ze	j                  Z G d	 d
ej                        Zej                  Zeee   z  Z G d dej"                        Zy)zPython definitions for third_party.jax.jaxlib.mosaic.python.tpu

These definitions are needed internally by the tpu module.
TODO(tlongeri): Migrate definitions to tpu module
    N)LiteralTargetTuplesublaneslanesc                       e Zd ZdZdZdZd Zy)	Directionr   r   subelementsc                 6    | j                   j                         S N)namelowerselfs    [/home/cdr/jupyterlab/.venv/lib/python3.12/site-packages/jaxlib/mosaic/python/layout_defs.py__repr__zDirection.__repr__    s    99??    N)__name__
__module____qualname__SUBLANESLANESSUBELEMENTSr    r   r   r   r      s    (
%+r   r   c                        e Zd ZdZd ZeZd Zy)
Replicated*c                      y)Nr   r   r   s    r   r   zReplicated.__repr__*   s    r   c                      y)NFr   r   s    r   __bool__zReplicated.__bool__.   s    r   N)r   r   r   
REPLICATEDr   __str__r   r   r   r   r   r   '   s    *'r   r   c                   $    e Zd ZdZdZdZdefdZy)ImplicitDimreturnc                 *    t        t        |             S r   )strintr   s    r   r   zImplicitDim.__repr__9   s    s4y>r   N)r   r   r   MINORSECOND_MINORMINOR_AND_SECOND_MINORr)   r   r   r   r   r#   r#   4   s    
%, r   r#   )__doc__collectionsenumtypingr   
namedtupler   uniqueEnumr   r   r   r   r   r    r*   OffsetIntEnumr#   r   r   r   <module>r7      s   
   $k$$]Z4IJ		   ##  ""
	wz"	"$,, r   