
    `i                         d dl Z d dlZddZdS )    Nc                    | t          j                    j        }|j        } g }i }t	          |                                           D ]}t          | |         t          j                  r| |         }t          |          }||                                v rd
                    |||                   }d}n	|||<   |}d}d                    t          t          |j                            }	t          |j                  }
|                    ||	|
|j        j        |g           d}d}d}d}t'          t)          |                    D ]}||         }|t)          |d                   k     rt)          |d                   }|t)          |d                   k     rt)          |d                   }|t)          |d                   k     rt)          |d                   }|d         r|t+          |d                   z  }t)          |          dk    rt-          d|          }t-          d|          }t-          d|          }d	
                    |d
z  |d
z  |d
z            }t/          d
                    |dt)          |          dz   z                       t'          t)          |                    D ]}||         }t/          d
                    |d         d
|t)          |d                   z
  dz   z  |d         d
|t)          |d                   z
  dz   z  |d         d
|t)          |d                   z
  dz   z  |d                              t/          d
                    |                     dS )a  Print the CuPy arrays in the given dictionary.

    Prints out the name, shape, bytes and type of all of the ndarrays
    present in `vardict`.

    If there is no dictionary passed in or `vardict` is None then returns
    CuPy arrays in the globals() dictionary (all CuPy arrays in the
    namespace).

    Args:
        vardict : (None or dict)  A dictionary possibly containing ndarrays.
                  Default is globals() if `None` specified


    .. admonition:: Example

        >>> a = cupy.arange(10)
        >>> b = cupy.ones(20)
        >>> cupy.who()
        Name            Shape            Bytes            Type
        ===========================================================
        <BLANKLINE>
        a               10               80               int64
        b               20               160              float64
        <BLANKLINE>
        Upper bound on total bytes  =       240
        >>> d = {'x': cupy.arange(2.0),
        ... 'y': cupy.arange(3.0), 'txt': 'Some str',
        ... 'idx':5}
        >>> cupy.who(d)
        Name            Shape            Bytes            Type
        ===========================================================
        <BLANKLINE>
        x               2                16               float64
        y               3                24               float64
        <BLANKLINE>
        Upper bound on total bytes  =       40

    Nz{} ({})r      z x       
   zName {} Shape {} Bytes {} Type z{}
{}
=   z{} {} {} {} {} {} {}   z'
Upper bound on total bytes  =       {})sys	_getframef_back	f_globalssortedkeys
isinstancecupyndarrayidformatjoinmapstrshapenbytesappenddtypenamerangelenintmaxprint)vardictframestacacher   varidvnamestroriginalshapestrbytestrmaxnamemaxshapemaxbyte
totalbyteskvalsp1sp2sp3prvals                        b/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/cupy/_misc/who.pywhor9      sJ   T &/
CEw||~~&&  gdmT\22 	$-CS''Cejjll""#**4s<<!c
zz#c39"5"566H#*ooGJJ(GSY^XF   GHGJ3s88__ 	& 	&!fSQ[[  #a&kkGc#a&kk!!3q6{{HSQ[[  #a&kkGq6 	&#c!f++%J
3xx!||"g"h"g077#IsSy#)
 
 	jsc%jj1n'=>>???3s88__ 
 
!f"))AsSQ[[(1,-AsSQ[[(1,-AsSQ[[(1,-A 
	
 
	
 
	
 
	
 

4
;
;J
G
GHHHHH    )N)r   r   r9    r:   r8   <module>r<      sA    



 eI eI eI eI eI eIr:   