/usr/local/lib64/python3.6/site-packages/torch/cuda/__pycache__
NameSizeModeActions
comm.cpython-36.pyc3720644editdlrm
error.cpython-36.pyc1430644editdlrm
graphs.cpython-36.pyc158110644editdlrm
memory.cpython-36.pyc217170644editdlrm
nccl.cpython-36.pyc34440644editdlrm
nvtx.cpython-36.pyc19660644editdlrm
profiler.cpython-36.pyc16320644editdlrm
random.cpython-36.pyc55200644editdlrm
sparse.cpython-36.pyc1440644editdlrm
streams.cpython-36.pyc94850644editdlrm
_utils.cpython-36.pyc18920644editdlrm
__init__.cpython-36.pyc232100644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/cuda/__pycache__/nccl.cpython-36.pyc (3444B)
3 Egfã @sRddlZddlZddlZddlmZmZmZdddddgZdZ dd „Z d d „Z d d „Z dd„Z eejeejfddœdd„Zde ddfdd„Zdde ddfddœeejeeejeejfeeeeejjeeejddœdd„Zdeejeddœdd„Zdeejeejddœdd„Ze ddfeejeejeddœdd„ZdS)éN)ÚOptionalÚSequenceÚUnionÚ all_reduceÚreduceÚ broadcastÚ all_gatherÚreduce_scattercCspttjdƒstjdƒdStƒ}xJ|D]B}|jr4dS|jƒs@dS|jsJdS|j ƒ}||kr^dS|j |ƒq&WdS)NÚ_nccl_all_reducez)PyTorch is not compiled with NCCL supportFT) ÚhasattrÚtorchÚ_CÚwarningsÚwarnÚsetZ is_sparseZ is_contiguousZis_cudaZ get_deviceÚadd)ZtensorsZdevicesZtensorZdevice©rú;/usr/local/lib64/python3.6/site-packages/torch/cuda/nccl.pyÚ is_available s    rcCs0tjjƒ}|d?}|d?d@}|d@}|||fS)Né éiÿÿ)r r Z _nccl_version)ÚverÚmajorÚminorÚpatchrrrÚversion"s   rcCs tjjƒS)N)r r Z_nccl_unique_idrrrrÚ unique_id*srcCstjj|||ƒS)N)r r Z_nccl_init_rank)Z num_ranksÚuidZrankrrrÚ init_rank.sr)ÚinputsÚreturncCs&t|tjƒ st|tjƒr"tdƒ‚dS)Nz(Inputs should be a collection of tensors)Ú isinstanceÚ collectionsÚ Containerr ÚTensorÚ TypeError)rrrrÚ_check_sequence_type2sr&cCs4t|ƒ|dkr|}t|ƒtjj|||||ƒdS)N)r&r r r )rÚoutputsÚopÚstreamsÚcommsrrrr7s )r')rÚoutputÚrootr(r)r'r cCs”t|ƒ|dk r6|dk r"tdƒ‚qztjdƒ||}nDt|tjƒ rft|tjj ƒrftjdƒ||}n|dkrv||n|}tj j ||||||ƒdS)Nzä'output' and 'outputs' can not be both specified. 'outputs' is deprecated in favor of 'output', taking in a single output tensor. The signature of reduce is: reduce(inputs, output=None, root=0, op=SUM, streams=None, comms=None).zƒnccl.reduce with an output tensor list is deprecated. Please specify a single output tensor with argument 'output' instead instead.z\nccl.reduce with an output tensor list is deprecated. Please specify a single output tensor.) r&Ú ValueErrorrrr!r r$r"Úabcrr Z _nccl_reduce)rr+r,r(r)r*r'Ú_outputrrrrAs  )rr,r cCst|ƒtjj||||ƒdS)N)r&r r Z_nccl_broadcast)rr,r)r*rrrr`s)rr'r cCs&t|ƒt|ƒtjj||||ƒdS)N)r&r r Z_nccl_all_gather)rr'r)r*rrrres)rr'r(r cCs(t|ƒt|ƒtjj|||||ƒdS)N)r&r r Z_nccl_reduce_scatter)rr'r(r)r*rrrr ks)rNN)NN)r"rZ torch.cudar ÚtypingrrrÚ__all__ZSUMrrrrr$r&rÚintZcudaZStreamrrrr rrrrÚs*  P