Skip to content

Commit bb29c6b

Browse files
authored
Match "libnccl" instead of "nccl" in the library check (#640)
This commit changes the library matching, so that it avoids accidentally matching "/dev/shm/nccl-XXXXXX" shared memory mappings that might be present in /proc/self/map.
1 parent a1b3af3 commit bb29c6b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

deep_ep/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def check_nccl_so():
5454
# PyTorch may load another NCCL library, which is different to the linked one
5555
with open('/proc/self/maps', 'r') as f:
5656
loaded_nccl_so = None
57-
for so in [line.strip().split(' ')[-1] for line in f if 'nccl' in line]:
57+
for so in [line.strip().split(' ')[-1] for line in f if 'libnccl' in line]:
5858
loaded_nccl_so = so if loaded_nccl_so is None else loaded_nccl_so
5959
assert so == loaded_nccl_so, f'Duplicate NCCL runtime found in the current system: {so} and {loaded_nccl_so}'
6060
linked_nccl_so_candidates = sorted(glob.glob(f'{find_nccl_root()}/lib/libnccl.so*'))

0 commit comments

Comments
 (0)