Commit 6b49c021 authored by lishen's avatar lishen
Browse files

注释掉hca_mapping不必要的设置

parent 969e30f8
...@@ -162,12 +162,12 @@ class Buffer: ...@@ -162,12 +162,12 @@ class Buffer:
# Get current device and set appropriate HCA # Get current device and set appropriate HCA
current_device = torch.cuda.current_device() current_device = torch.cuda.current_device()
# Translate CUDA_VISIBLE_DEVICES # # Translate CUDA_VISIBLE_DEVICES
if 'CUDA_VISIBLE_DEVICES' in os.environ: # if 'CUDA_VISIBLE_DEVICES' in os.environ:
visible_devices = os.environ['CUDA_VISIBLE_DEVICES'].split(",") # visible_devices = os.environ['CUDA_VISIBLE_DEVICES'].split(",")
assert len(visible_devices) > current_device, f"CUDA_VISIBLE_DEVICES has {len(visible_devices)} entries which is fewer than the current device {current_device}" # assert len(visible_devices) > current_device, f"CUDA_VISIBLE_DEVICES has {len(visible_devices)} entries which is fewer than the current device {current_device}"
assert visible_devices[current_device].isdigit(), f"DEEP_EP_DEVICE_TO_HCA_MAPPING requires CUDA_VISIBLE_DEVICES to contain integer indices" # assert visible_devices[current_device].isdigit(), f"DEEP_EP_DEVICE_TO_HCA_MAPPING requires CUDA_VISIBLE_DEVICES to contain integer indices"
current_device = int(visible_devices[current_device]) # current_device = int(visible_devices[current_device])
assert current_device in device_mapping, f"Current CUDA device {current_device} not found in DEEP_EP_DEVICE_TO_HCA_MAPPING" assert current_device in device_mapping, f"Current CUDA device {current_device} not found in DEEP_EP_DEVICE_TO_HCA_MAPPING"
os.environ['NVSHMEM_ENABLE_PE_MAPPING'] = '1' os.environ['NVSHMEM_ENABLE_PE_MAPPING'] = '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