o
    ®Ÿ?e  ã                   @   s:   d Z ddlZddlZe d¡Ze dddg¡Zdd„ ZdS )	zContains GPU utility functions.é    Nz6name: ([^,]*), (?:.*compute capability: (\d+)\.(\d+))?Zgpu_infoÚnameZcompute_capabilityc                 C   sT   t  | j¡}|stddƒS | d¡r t| d¡ƒt| d¡ƒfnd}t| d¡|ƒS )zéReturns the GpuInfo given a DeviceAttributes proto.

  Args:
    device_attrs: A DeviceAttributes proto.

  Returns
    A gpu_info tuple. Both fields are None if `device_attrs` does not have a
    valid physical_device_desc field.
  Né   é   é   )Ú"_PHYSICAL_DEVICE_DESCRIPTION_REGEXÚsearchZphysical_device_descÚGpuInfoÚgroupÚint)Zdevice_attrsÚmatchÚcc© r   úe/home/www/facesmatcher.com/pyenv/lib/python3.10/site-packages/tensorflow/python/framework/gpu_util.pyÚ#compute_capability_from_device_desc   s   ÿ
*r   )Ú__doc__ÚcollectionsÚreÚcompiler   Ú
namedtupler   r   r   r   r   r   Ú<module>   s   ÿ