Unverified Commit 11a0b0e1 authored by Shangyan Zhou's avatar Shangyan Zhou Committed by GitHub
Browse files

Merge pull request #193 from fzyzcjy/feat/fix_mnnvl

Allow using MNNVL
parents c8dceba1 4cd95170
...@@ -32,7 +32,8 @@ class Buffer: ...@@ -32,7 +32,8 @@ class Buffer:
def __init__(self, group: dist.ProcessGroup, def __init__(self, group: dist.ProcessGroup,
num_nvl_bytes: int = 0, num_rdma_bytes: int = 0, num_nvl_bytes: int = 0, num_rdma_bytes: int = 0,
low_latency_mode: bool = False, num_qps_per_rank: int = 12, low_latency_mode: bool = False, num_qps_per_rank: int = 12,
allow_nvlink_for_low_latency_mode: bool = True) -> None: allow_nvlink_for_low_latency_mode: bool = True,
allow_mnnvl: bool = False) -> None:
""" """
Initialize the communication buffer. Initialize the communication buffer.
...@@ -47,6 +48,7 @@ class Buffer: ...@@ -47,6 +48,7 @@ class Buffer:
this is somehow incompatible with the hook-based overlapping. this is somehow incompatible with the hook-based overlapping.
Warning: PCIe connections may lead to errors due to memory ordering issues, Warning: PCIe connections may lead to errors due to memory ordering issues,
please make sure all connections are via NVLink. please make sure all connections are via NVLink.
allow_mnnvl: whether to allow MNNVL
""" """
# Initialize the CPP runtime # Initialize the CPP runtime
...@@ -88,6 +90,7 @@ class Buffer: ...@@ -88,6 +90,7 @@ class Buffer:
# NOTES: NVSHMEM initialization requires at least 256 MiB # NOTES: NVSHMEM initialization requires at least 256 MiB
os.environ['NVSHMEM_CUMEM_GRANULARITY'] = f'{2 ** 29}' os.environ['NVSHMEM_CUMEM_GRANULARITY'] = f'{2 ** 29}'
if not allow_mnnvl:
# Disable multi-node NVLink detection # Disable multi-node NVLink detection
os.environ['NVSHMEM_DISABLE_MNNVL'] = '1' os.environ['NVSHMEM_DISABLE_MNNVL'] = '1'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment