File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 17
17
nvshmem_finalize , nvshmem_get_unique_id ,
18
18
nvshmem_init )
19
19
has_pplx = False
20
- except ImportError as ex :
20
+ except ImportError :
21
21
has_pplx = False
22
22
23
23
from torch .multiprocessing import (
Original file line number Diff line number Diff line change @@ -922,16 +922,15 @@ def pplx_init(rank, world_size):
922
922
923
923
if has_pplx and world_size > 1 :
924
924
from pplx_kernels .nvshmem import (nvshmem_alloc_empty_unique_id ,
925
- nvshmem_get_unique_id ,
926
- nvshmem_init )
925
+ nvshmem_get_unique_id , nvshmem_init )
927
926
try :
928
927
global PPLX_DID_INIT
929
- logger .debug (f "PPLX_INIT { rank } { world_size } " )
928
+ logger .debug ("PPLX_INIT %s %d" , rank , world_size )
930
929
uid = nvshmem_get_unique_id (
931
930
) if rank == 0 else nvshmem_alloc_empty_unique_id ()
932
931
uid_gpu = uid .cuda ()
933
932
get_world_group ().broadcast (uid_gpu , src = 0 )
934
- logger .debug (f "PPLX_INIT UID= { uid_gpu } " )
933
+ logger .debug ("PPLX_INIT UID = %s" , uid_gpu )
935
934
uid = uid_gpu .to (device = 'cpu' )
936
935
nvshmem_init (uid , rank , world_size )
937
936
PPLX_DID_INIT = True
@@ -944,6 +943,7 @@ def pplx_finalize():
944
943
global PPLX_DID_INIT
945
944
if PPLX_DID_INIT :
946
945
from pplx_kernels .nvshmem import nvshmem_finalize
946
+ logger .debug ("PPLX finalize" )
947
947
nvshmem_finalize ()
948
948
949
949
You can’t perform that action at this time.
0 commit comments