
    vh\                     n   d dl Z d dlmZmZmZmZ d dlZd dlZd dl	m
Z
 d dl	mZ d dl	mZ d dlmZmZ d dlmZ d dlmZ d d	lmZ d d
lmZ d dlmZmZ d dlmZmZmZ d dlm Z m!Z!m"Z"  e!d      Z# G d dejH                  jJ                        Z&eddddejN                  ddde(deddde(e)z  e*e+e,df      z  dededz  dedef   defd       Z-eddddejN                  dddedee   deee   z  ddde(e)z  e*e+e,df      z  dededz  dedef   defd       Z-e#ddddejN                  ddddde(e)z  e*e+e,df      z  dededz  dedef   defd        Z-i Z.d! Z/edd"d#e(dede)e(z  e*e+e,df      z  de+e*e+e,df      ef   fd$       Z0edd"dedee   deee   z  de)e(z  e*e+e,df      z  de+e*e+e,df      ef   f
d%       Z0e#dd"de)e(z  e*e+e,df      z  de+e*e+e,df      ef   fd&       Z0d' Z1ejN                  dfde*e   d(ee+e+e,df   e2e(   e(f      fd)Z3ejh                  e.ejj                  <   y)*    N)overloadAnyCallableSequence)config)core)dtypes)jit
named_call)
shape_poly)lax)PrecisionLike)util)canonicalize_shardingNamedSharding)Array	ArrayLike	DTypeLike)partition_list
set_moduleunzip2z	jax.numpyc                       e Zd ZdZd Zy)UnoptimizedzUnoptimized path for einsum.c                 &    dgt        |      dz
  z  S )N)r      r   )len)selfinputsargskwargss       P/opt/face_recognition/venv/lib/python3.12/site-packages/jax/_src/numpy/einsum.py__call__zUnoptimized.__call__'   s    8s6{Q''    N)__name__
__module____qualname____doc__r"    r#   r!   r   r   %   s
    $(r#   r   auto)outoptimize	precisionpreferred_element_type_dot_generalout_sharding	subscriptoperandsr*   r+   .r,   r-   r.   returnc                    y Nr(   )r0   r*   r+   r,   r-   r.   r/   r1   s           r!   einsumr5   *   s     r#   arraxesc                    y r4   r(   )	r6   r7   r*   r+   r,   r-   r.   r/   r1   s	            r!   r5   r5   6   s     r#   c                  | g|}|t        d      t        |d   t              r|d   nd}|du rdn|du r
t               n|}	t	        d |D              }|D 
ch c]M  }
t        |
t              rt        j                  |
      D ]"  }t        j                  |      st        |      $ O }}
}|st        j                  }n.t        t        |            }t        j                  |t               } ||dd|	d\  }}t	        d	 |D              }t#        t$        d
d      }|t'        ||      }t)        t+        j,                  d|            } |||||||      S c c}}
w )aY  Einstein summation

  JAX implementation of :func:`numpy.einsum`.

  ``einsum`` is a powerful and generic API for computing various reductions,
  inner products, outer products, axis reorderings, and combinations thereof
  across one or more input arrays. It has a somewhat complicated overloaded API;
  the arguments below reflect the most common calling convention. The Examples
  section below demonstrates some of the alternative calling conventions.

  Args:
    subscripts: string containing axes names separated by commas.
    *operands: sequence of one or more arrays corresponding to the subscripts.
    optimize: specify how to optimize the order of computation. In JAX this defaults
      to ``"auto"`` which produces optimized expressions via the opt_einsum_
      package. Other options are ``True`` (same as ``"optimal"``), ``False``
      (unoptimized), or any string supported by ``opt_einsum``, which
      includes ``"optimal"``, ``"greedy"``, ``"eager"``, and others. It may also
      be a pre-computed path (see :func:`~jax.numpy.einsum_path`).
    precision: either ``None`` (default), which means the default precision for
      the backend, a :class:`~jax.lax.Precision` enum value (``Precision.DEFAULT``,
      ``Precision.HIGH`` or ``Precision.HIGHEST``).
    preferred_element_type: either ``None`` (default), which means the default
      accumulation type for the input types, or a datatype, indicating to
      accumulate results to and return a result with that datatype.
    out: unsupported by JAX
    _dot_general: optionally override the ``dot_general`` callable used by ``einsum``.
      This parameter is experimental, and may be removed without warning at any time.

  Returns:
    array containing the result of the einstein summation.

  See also:
    :func:`jax.numpy.einsum_path`

  Examples:
    The mechanics of ``einsum`` are perhaps best demonstrated by example. Here we
    show how to use ``einsum`` to compute a number of quantities from one or more
    arrays. For more discussion and examples of ``einsum``, see the documentation
    of :func:`numpy.einsum`.

    >>> M = jnp.arange(16).reshape(4, 4)
    >>> x = jnp.arange(4)
    >>> y = jnp.array([5, 4, 3, 2])

    **Vector product**

    >>> jnp.einsum('i,i', x, y)
    Array(16, dtype=int32)
    >>> jnp.vecdot(x, y)
    Array(16, dtype=int32)

    Here are some alternative ``einsum`` calling conventions to compute the same
    result:

    >>> jnp.einsum('i,i->', x, y)  # explicit form
    Array(16, dtype=int32)
    >>> jnp.einsum(x, (0,), y, (0,))  # implicit form via indices
    Array(16, dtype=int32)
    >>> jnp.einsum(x, (0,), y, (0,), ())  # explicit form via indices
    Array(16, dtype=int32)

    **Matrix product**

    >>> jnp.einsum('ij,j->i', M, x)  # explicit form
    Array([14, 38, 62, 86], dtype=int32)
    >>> jnp.matmul(M, x)
    Array([14, 38, 62, 86], dtype=int32)

    Here are some alternative ``einsum`` calling conventions to compute the same
    result:

    >>> jnp.einsum('ij,j', M, x) # implicit form
    Array([14, 38, 62, 86], dtype=int32)
    >>> jnp.einsum(M, (0, 1), x, (1,), (0,)) # explicit form via indices
    Array([14, 38, 62, 86], dtype=int32)
    >>> jnp.einsum(M, (0, 1), x, (1,))  # implicit form via indices
    Array([14, 38, 62, 86], dtype=int32)

    **Outer product**

    >>> jnp.einsum("i,j->ij", x, y)
    Array([[ 0,  0,  0,  0],
           [ 5,  4,  3,  2],
           [10,  8,  6,  4],
           [15, 12,  9,  6]], dtype=int32)
    >>> jnp.outer(x, y)
    Array([[ 0,  0,  0,  0],
           [ 5,  4,  3,  2],
           [10,  8,  6,  4],
           [15, 12,  9,  6]], dtype=int32)

    Some other ways of computing outer products:

    >>> jnp.einsum("i,j", x, y)  # implicit form
    Array([[ 0,  0,  0,  0],
           [ 5,  4,  3,  2],
           [10,  8,  6,  4],
           [15, 12,  9,  6]], dtype=int32)
    >>> jnp.einsum(x, (0,), y, (1,), (0, 1))  # explicit form via indices
    Array([[ 0,  0,  0,  0],
           [ 5,  4,  3,  2],
           [10,  8,  6,  4],
           [15, 12,  9,  6]], dtype=int32)
    >>> jnp.einsum(x, (0,), y, (1,))  # implicit form via indices
    Array([[ 0,  0,  0,  0],
           [ 5,  4,  3,  2],
           [10,  8,  6,  4],
           [15, 12,  9,  6]], dtype=int32)

    **1D array sum**

    >>> jnp.einsum("i->", x)  # requires explicit form
    Array(6, dtype=int32)
    >>> jnp.einsum(x, (0,), ())  # explicit form via indices
    Array(6, dtype=int32)
    >>> jnp.sum(x)
    Array(6, dtype=int32)

    **Sum along an axis**

    >>> jnp.einsum("...j->...", M)  # requires explicit form
    Array([ 6, 22, 38, 54], dtype=int32)
    >>> jnp.einsum(M, (..., 0), (...,))  # explicit form via indices
    Array([ 6, 22, 38, 54], dtype=int32)
    >>> M.sum(-1)
    Array([ 6, 22, 38, 54], dtype=int32)

    **Matrix transpose**

    >>> y = jnp.array([[1, 2, 3],
    ...                [4, 5, 6]])
    >>> jnp.einsum("ij->ji", y)  # explicit form
    Array([[1, 4],
           [2, 5],
           [3, 6]], dtype=int32)
    >>> jnp.einsum("ji", y)  # implicit form
    Array([[1, 4],
           [2, 5],
           [3, 6]], dtype=int32)
    >>> jnp.einsum(y, (1, 0))  # implicit form via indices
    Array([[1, 4],
           [2, 5],
           [3, 6]], dtype=int32)
    >>> jnp.einsum(y, (0, 1), (1, 0))  # explicit form via indices
    Array([[1, 4],
           [2, 5],
           [3, 6]], dtype=int32)
    >>> jnp.transpose(y)
    Array([[1, 4],
           [2, 5],
           [3, 6]], dtype=int32)

    **Matrix diagonal**

    >>> jnp.einsum("ii->i", M)
    Array([ 0,  5, 10, 15], dtype=int32)
    >>> jnp.diagonal(M)
    Array([ 0,  5, 10, 15], dtype=int32)

    **Matrix trace**

    >>> jnp.einsum("ii", M)
    Array(30, dtype=int32)
    >>> jnp.trace(M)
    Array(30, dtype=int32)

    **Tensor products**

    >>> x = jnp.arange(30).reshape(2, 3, 5)
    >>> y = jnp.arange(60).reshape(3, 4, 5)
    >>> jnp.einsum('ijk,jlk->il', x, y)  # explicit form
    Array([[ 3340,  3865,  4390,  4915],
           [ 8290,  9940, 11590, 13240]], dtype=int32)
    >>> jnp.tensordot(x, y, axes=[(1, 2), (0, 2)])
    Array([[ 3340,  3865,  4390,  4915],
           [ 8290,  9940, 11590, 13240]], dtype=int32)
    >>> jnp.einsum('ijk,jlk', x, y)  # implicit form
    Array([[ 3340,  3865,  4390,  4915],
           [ 8290,  9940, 11590, 13240]], dtype=int32)
    >>> jnp.einsum(x, (0, 1, 2), y, (1, 3, 2), (0, 3))  # explicit form via indices
    Array([[ 3340,  3865,  4390,  4915],
           [ 8290,  9940, 11590, 13240]], dtype=int32)
    >>> jnp.einsum(x, (0, 1, 2), y, (1, 3, 2))  # implicit form via indices
    Array([[ 3340,  3865,  4390,  4915],
           [ 8290,  9940, 11590, 13240]], dtype=int32)

    **Chained dot products**

    >>> w = jnp.arange(5, 9).reshape(2, 2)
    >>> x = jnp.arange(6).reshape(2, 3)
    >>> y = jnp.arange(-2, 4).reshape(3, 2)
    >>> z = jnp.array([[2, 4, 6], [3, 5, 7]])
    >>> jnp.einsum('ij,jk,kl,lm->im', w, x, y, z)
    Array([[ 481,  831, 1181],
           [ 651, 1125, 1599]], dtype=int32)
    >>> jnp.einsum(w, (0, 1), x, (1, 2), y, (2, 3), z, (3, 4))  # implicit, via indices
    Array([[ 481,  831, 1181],
           [ 651, 1125, 1599]], dtype=int32)
    >>> w @ x @ y @ z  # direct chain of matmuls
    Array([[ 481,  831, 1181],
           [ 651, 1125, 1599]], dtype=int32)
    >>> jnp.linalg.multi_dot([w, x, y, z])
    Array([[ 481,  831, 1181],
           [ 651, 1125, 1599]], dtype=int32)

  .. _opt_einsum: https://github.com/dgasmith/opt_einsum
  Nz2The 'out' argument to jnp.einsum is not supported.r   ToptimalFc              3   X   K   | ]"  }t        |d       r|j                         n| $ yw)__jax_array__N)hasattrr<   ).0ops     r!   	<genexpr>zeinsum.<locals>.<genexpr>%  s/      ' *1_)E2##%2M 's   (*)einsum_calluse_blasr+   c              3   @   K   | ]  ^}}}}|t        |      |f  y wr4   )	frozenset)r>   abc_s        r!   r@   zeinsum.<locals>.<genexpr>6  s#     L1a!9Q<+Ls   )r               )static_argnumsinline)namer5   )NotImplementedError
isinstancestrr   tuplenpshaper   is_constant_dimtype
opt_einsumcontract_pathnextiter_poly_einsum_handlersget_default_poly_einsum_handlerr
   _einsumr   listr   ensure_arraylike_tuple)
subscriptsr*   r+   r,   r-   r.   r/   r1   spec	path_typer?   dnon_constant_dim_typesrY   tycontractions
jit_einsumoperand_arrayss                     r!   r5   r5   C   sy   v $8$(_
R
SS"8A;4!$$#t+i(eBSYa)  '%' '(
 !
2s(;xx|
4#7#7#: 1g  
 ,,M	d)*	+B)--b2NOM(	tdYH(L L|LL,7?4H*	JT2J33HhGH.	NL)*L,
H H's   E1<Ec            	         t        j                  dddg      }| D cg c]=  }t        |d      r- |t        d |j                  D              |j
                        n|? }}t        |      D ci c]  \  }}t        |      | }}}t        j                  |i |\  }}	|D cg c]  }| |t        |             }
}|
|	fS c c}w c c}}w c c}w )NdummyrU   dtypec              3   F   K   | ]  }t        |      t        u r|nd   yw)   N)rW   int)r>   re   s     r!   r@   z/_default_poly_einsum_handler.<locals>.<genexpr>F  s     Ed1gn!3Es   !)
collections
namedtupler=   rS   rU   rm   	enumerateidrX   rY   )r1   r    rl   xdummiesire   mappingout_dummiesrh   contract_operandss              r!   r^   r^   D  s    

 
 7G*<
=%4<>/07# 5EQWWEEqwwO)*+ >' >"+G"45$!QRUAX5'5(66J6J+|9DEAx1/EE	L	((>5Es   AC/C$C)r+   rb   c                    y r4   r(   rb   r+   r1   s      r!   einsum_pathr}   M  s    
 ),r#   c                    y r4   r(   )r6   r7   r+   r1   s       r!   r}   r}   T  s     ),r#   c               ^    |du rd}n|du r
t               }t        j                  | g|d|iS )a  Evaluates the optimal contraction path without evaluating the einsum.

  JAX implementation of :func:`numpy.einsum_path`. This function calls into
  the opt_einsum_ package, and makes use of its optimization routines.

  Args:
    subscripts: string containing axes names separated by commas.
    *operands: sequence of one or more arrays corresponding to the subscripts.
    optimize: specify how to optimize the order of computation. In JAX this defaults
      to ``"auto"``. Other options are ``True`` (same as ``"optimize"``), ``False``
      (unoptimized), or any string supported by ``opt_einsum``, which
      includes ``"optimize"``,, ``"greedy"``, ``"eager"``, and others.

  Returns:
    A tuple containing the path that may be passed to :func:`~jax.numpy.einsum`, and a
    printable object representing this optimal path.

  Examples:
    >>> key1, key2, key3 = jax.random.split(jax.random.key(0), 3)
    >>> x = jax.random.randint(key1, minval=-5, maxval=5, shape=(2, 3))
    >>> y = jax.random.randint(key2, minval=-5, maxval=5, shape=(3, 100))
    >>> z = jax.random.randint(key3, minval=-5, maxval=5, shape=(100, 5))
    >>> path, path_info = jnp.einsum_path("ij,jk,kl", x, y, z, optimize="optimal")
    >>> print(path)
    [(1, 2), (0, 1)]
    >>> print(path_info)
          Complete contraction:  ij,jk,kl->il
                Naive scaling:  4
            Optimized scaling:  3
              Naive FLOP count:  9.000e+3
          Optimized FLOP count:  3.060e+3
          Theoretical speedup:  2.941e+0
          Largest intermediate:  1.500e+1 elements
        --------------------------------------------------------------------------------
        scaling        BLAS                current                             remaining
        --------------------------------------------------------------------------------
          3           GEMM              kl,jk->lj                             ij,lj->il
          3           GEMM              lj,ij->il                                il->il

    Use the computed path in :func:`~jax.numpy.einsum`:

    >>> jnp.einsum("ij,jk,kl", x, y, z, optimize=path)
    Array([[-754,  324, -142,   82,   50],
           [ 408,  -50,   87,  -29,    7]], dtype=int32)

  .. _opt_einsum: https://github.com/dgasmith/opt_einsum
  Tr:   Fr+   )r   rX   rY   r|   s      r!   r}   r}   \  s<    j H5}H		!	!*	Kx	K(	KKr#   c                 p    | j                  t        j                  t        j	                  |                  S r4   )	translaterR   	maketransdictfromkeys)scharss     r!   _removecharsr     s#    	
S]]4==#78	99r#   rh   c           
      h
  +,-./012 t        |d      }|t        |t              st        d      t	        j
                  d       t	        j                  | ddi\  }nd}fd22fd}2fd}d	 }	t        |      D ]z  \  }
\  }}}|
t        |      d
z
  k(  }t        |      }|j                  d      \  }.|j                  d      }t        |      d
k(  rb| j                  |d         }|\  -t        j                  -      }|D cg c]  }||   d
k(  s| }} ||-|      \  }- ||-|.      \  }-n2t        |      dk(  rt        | j                  |      \  +/|\  ,0 |	+,t        j                   /      0      \  +, |	/0t        j                   +      ,      \  /0t        j                  ,      }t        j                  0      }|D cg c]  }||   d
k(  r
||   dk(  r| }} |+,|      \  +,|D cg c]  }||   d
k(  r
||   dk(  r| }} |/0|      \  /0 |+,|.0z         \  +, |/0|.,z         \  /0t#        ,      t#        0      z  }|D cg c]	  }||v s| }}t#        ,      t#        0      z  }.D cg c]	  }||v s| }}t%        ,0fd|D              \  }}t&        j(                  j*                  s>t-        +,/0fd|D              s'J d+j                    d, d/j                    d0        dj/                  |      } t%        ,0fd|D              \  }!}"| dj/                  |      z   }#t1        ,|#      }$t1        0|#      }%| |%z   |$z   --.k(  r|"|!f||ff}&|i nd|i}' |/+|&|fdi|'}n| |$z   |%z   -|sd }(n|-.k7  rt        .      t        |j2                        kD  r4|j5                  |j2                  j7                  t        .                  }|j2                  1t9        .1fd-D              })t        |j:                  1j5                  |)            }(n|}(|!|"f||ff}&|(i nd|(i}( |+/|&|fdi|(}nt        t        -      t        .      cxk(  rt        t#        -            k(  sJ  J t#        -      t#        .      k(  sJ -.k7  r*t9        -fd.D              }*t=        j>                  ||*      }| jA                  |       } t=        jB                  | d   |      S c c}w c c}w c c}w c c}w c c}w )Nr5   z`out_sharding` argument of `einsum` only supports NamedSharding instances. Please file a bug if this is not enough for your use case.return_weak_type_flagTFc                 D   t        j                  |       | j                  k7  r| j                        } t	        j
                  | t        j                  d| j                        | j                  t        k7  rt        j                  |      S t        j                  |      S )Nr   )r	   result_typerm   astyper   reducerT   arraybooladd
bitwise_or)ru   r7   r-   s     r!   sumz_einsum.<locals>.sum  sz    !34?
(()
*a::a!QWW-!"DcggdL L69nndL Lr#   c                     |r3|D cg c]  }|j                  |       }} | |      } t        ||      }| |fS c c}w r4   )indexr   )operandnamesuniquesrO   r7   r   s        r!   sum_uniquesz_einsum.<locals>.sum_uniques  sI    ,34Dekk$4d4GT"g5'*eE> 5s   ;c           	         |j                         D ]  \  }}|dkD  st        |      D cg c]  \  }}||k(  s| }}}t        j                  t	        j
                  d      | j                  |      }	t        j                  |	| t        j                  | d            } ||vr 
| |      } |j                  |d      } 
| |d d       } |j                  |d|dz
        } | |fS c c}}w )Nr   r   r    )
itemsrs   r   _deltarT   rm   rU   select	full_likereplace)r   r   counts
keep_namesrO   countrw   nr7   eyer   s             r!   sum_repeatsz_einsum.<locals>.sum_repeats  s    ||~ 
5e	'.<da!t)<<jj&)7==$?**S'3==!+DEz!&'--b)%cr+'--b%!)4%
5 E> =s
   C(C(c                    t         j                  }t        t        |j                              D cg c]1  \  }} || j
                  |   d       xs |dk(  xs  |||   d      3 }}}t        |t        t        | j                                    \  }}	t        j                  | |      dj                  fd|	D              fS c c}}w )Nr   r   r   c              3   (   K   | ]	  }|     y wr4   r(   )r>   rw   r   s     r!   r@   z9_einsum.<locals>.filter_singleton_dims.<locals>.<genexpr>  s     3PE!H3Ps   )r   definitely_equalrs   mapfindrU   r   r`   rangendimr   squeezejoin)
r   r   other_shapeother_nameseqrw   jkeep	sqez_axes	keep_axess
    `        r!   filter_singleton_dimsz&_einsum.<locals>.filter_singleton_dims  s    			B!#k&6&6">?A1 7==#Q''K17KbQ6KK AD A)$U7<<5H0IJIy;;w	*BGG3Pi3P,PPPAs   6Cr   z->,r   rI   c              3   b   K   | ]&  }j                  |      j                  |      f ( y wr4   )r   r>   r   	lhs_names	rhs_namess     r!   r@   z_einsum.<locals>.<genexpr>  s0      $:() &/^^A%6	q8I$J $:   ,/c              3      K   | ]M  }|v xrC |v xr= j                   j                  |         j                   j                  |         k(   O y wr4   )rU   r   )r>   rO   lhsr   rhsr   s     r!   r@   z_einsum.<locals>.<genexpr>  se      0&  		 	Mdi/ 	M		)//$'(CIIiood6K,LL	M0&s   AAz-Incompatible reduction dimensions: lhs.shape=z lhs_names=z rhs.shape=z rhs_names=r   c              3   b   K   | ]&  }j                  |      j                  |      f ( y wr4   r   r   s     r!   r@   z_einsum.<locals>.<genexpr>  s0      "=&' $-??1#5yq7I"J "=r   r/   r-   )rc   c              3   F   K   | ]  }j                  |           y wr4   r   )r>   rO   result_namesrc   s     r!   r@   z_einsum.<locals>.<genexpr>0  s!     P$tL$6$6t$<=Ps   !)
partitionsc              3   @   K   | ]  }j                  |        y wr4   r   )r>   rO   r   s     r!   r@   z_einsum.<locals>.<genexpr>C  s     >5;;t$>s   )"r   rQ   r   rP   r	   check_user_dtype_supportedr   rs   r   sortedsplitpoprq   Counterr   rT   rU   setr   r   dynamic_shapesvalueallr   r   rc   update_normalized_spec_for_avalrS   meshr   	transposeappend_convert_element_type)3r1   rh   r,   r-   r.   r/   output_weak_typer   r   r   rw   operand_indicescontracted_names_seteinstrlast_contractioncontracted_names	input_strinput_namesr   r   rO   r   
lhs_counts
rhs_countslhs_uniquesrhs_uniqueslhs_or_rhs_namesru   lhs_and_rhs_namesbatch_names	lhs_batch	rhs_batchbatch_names_strlhs_contrhs_contdeleted_namesremaining_lhs_namesremaining_rhs_namesdimension_numbersk_out_shardingdot_general_out_shardinginverse_specpermr   r   r   r   r   r   rc   r   s3      `                                       @@@@@@@@r!   r_   r_     s6    '|X>,j}&M
	QR R 	##$:HE#/5/A/A	0/)-0/,, LQ =Fl<S t8a	8//C-1123$ll40I|//#&K ?q _Q/0gfe""5)f #3H$fTla6GHgH"7E7;ngu #7E6<Hngu	_		"X\\?3hc3(i -S)RXXc]-68nc9,S)RXXc]-68nc9 &&y1j&&y1j '7 Id"4(A-*T2Ba2G  Ik I"3	;?nc9&6 Id"4(A-*T2Ba2G  Ik I"3	;?nc9 #3	:#/)#;=nc9"3	:#/)#;=nc9 Y#i.8%5O>N9N!OOi.3y>9 ,G15F0FQGkG# $:-8$: :i
 ""((C 0& %0& -& :yykYK 8yykYK9	: & ,o! "=+;"= =h%0@(AAm(MB(MB
  336IIe	,	&1Iy3IJ , 4")<8 	sC):I 16L1!/1  "558KK%)
"%%<*?\%6%6!77'..!!;;C<MN / PL""$P%PP,%2!E&G
" &2
"&1Iy3IJ*B*JB%35M$N 	!sC):I ;6L;!9;   u:\*=c#e*o=====u:\****>>>dgt,gOOGitl 
	"	"8A;0F#3
5 5Q I*II PGs0   TTT T%-	T*7T*	T/"T/)6rq   typingr   r   r   r   numpyrT   rX   jax._srcr   r   r	   jax._src.apir
   r   jax._src.exportr   jax._src.laxr   jax._src.lax.laxr   jax._src.numpyr   jax._src.sharding_implsr   r   jax._src.typingr   r   r   jax._src.utilr   r   r   exportpathsPathOptimizerr   dot_generalrR   r   r`   rS   rp   r5   r\   r^   r}   r   rD   r_   _einsum_contract_path_DimExprr(   r#   r!   <module>r     s    4 4      ( &  *  H 7 7 < < 
K	 (*""00 (
 
 39#/3),			 
	 Dj4c3h00		
 	 &,	 3:&	 	 
	 

 39#/3),
	

3-
 8C=(
 
	

 Dj4c3h00
 
 &,
 3:&
 
 

  39#/3),yH 
yH Dj4c3h00	yH
 yH &,yH 3:&yH yH yH|  ) 
 58,,, Sj4c3h00, 4c3h #%&	, 
, 

 58	,	,
3-, 8C=(, Sj4c3h00	,
 4c3h #%&, 
,  4:8L Sj4c3h008L T%S/"C'(	8L 8Lt: m55km55sCx)C.#!EFGm5^ .8-M-M j)) *r#   