o
    i$                     @   s  d Z ddlmZ ddlZddlmZ defddZ	ej
ZejZe	eefZejejfZeeed ed	 eejd
Zejjdr-i dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddZdS dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd ZdS )!
    )SimpleNamespaceN   )Configtotal_memoryc                 C   s   d}| | t j S )Ni  k)r   zerogpu_cuda_reserved_memory)r   pytorch_base_memory r	   L/home/ubuntu/.local/lib/python3.10/site-packages/spaces/zero/torch/static.pycompute_base_free_memory   s   r      )namemajorminorr   multi_processor_countz12.num_alloc_retriesnum_oomsmax_split_sizenum_sync_all_streamsnum_device_allocnum_device_free
allocation)currentpeak	allocatedfreed)all
small_pool
large_poolsegmentactiveinactive_splitallocated_bytesreserved_bytesactive_bytesinactive_split_bytesrequested_bytesoversize_allocationsoversize_segments)r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   )__doc__typesr   _SimpleNamespacetorch_torchconfigr   intr   zerogpu_cuda_device_nameCUDA_DEVICE_NAMEzerogpu_cuda_total_memoryCUDA_TOTAL_MEMORYCUDA_MEM_GET_INFOzerogpu_cuda_capability_majorzerogpu_cuda_capability_minorCUDA_DEVICE_CAPABILITY"zerogpu_cuda_multi_processor_countCUDA_DEVICE_PROPERTIESversioncuda
startswith CUDA_MEMORY_STATS_AS_NESTED_DICTr	   r	   r	   r
   <module>   s   	 %*/459
