Repository navigation
[ROCm] Remove check for hip support for symmetric memory. - #3485
Conversation
|
Warning: Unknown label
Please add the new label to .github/pytorch-probot.yml |
|
@tianyu-l: The ROCm failure for Features test (loss number mismatch) seems to be unrelated with this PR's code change. Are we good for a merge? |
| or ( | ||
| torch.version.hip is None | ||
| and torch.cuda.get_device_capability() < (9, 0) | ||
| ) |
There was a problem hiding this comment.
I don't understand the change, why wouldn't we error out on RoCM?
There was a problem hiding this comment.
It'll not error for ROCm. But compute capability is not defined for AMD GPUs as they are for Nvidia GPUs. The condition may evaluate to True or False, so it's better to safeguard for ROCm.
There was a problem hiding this comment.
The condition may evaluate to True or False, so it's better to safeguard for ROCm.
This statement is ambiguous to me.
For me
- before the change: if rocm (
torch.version.hip is not None), it will error out. This sounds right to me. - after the change: rocm won't error out because
torch.version.hip is Noneevaluate to False. This sounds wrong to me.
Could you clarify what you think is the correct behavior?
There was a problem hiding this comment.
Since, ROCm now supports symmetric memory. Hence, we don't want it to error for ROCm.
For ROCm, torch.version.hip is None will be False, hence it will not evaluate torch.cuda.get_device_capability() which we want for ROCm. Overall, the condition will be evaluated as False for ROCm. Hence, it'll never error for ROCm.
For CUDA, torch.version.hip is None will be True, hence it will then evaluate torch.cuda.get_device_capability(). Depending on compute capability, it will error or not error for CUDA.
There was a problem hiding this comment.
oh I see. Are you saying
- symmetric memory is available for CUDA on sm>90
- symmetric memory is available for all ROCm versions (with
torch.version.hip is not None)
There was a problem hiding this comment.
Yes, I believe so. @yuxinwan-amd @pragupta will confirm if symmetric memory is available for all ROCm versions.
There was a problem hiding this comment.
Hi @tianyu-l we confirm that It's been supported since rocm 6.4.
## Summary Skip the `fsdp_symm_mem` flavor on the ROCm leg of the **8 GPU Integration Test on H100** workflow. The CUDA/H100 leg continues to run it unchanged. ## Why PyTorch's FSDP2 symmetric-memory path (`set_symm_mem_for_comm()` → `_SymmetricMemory.rendezvous`) selects the **NCCL symm-mem allocator**, which routes through RCCL on ROCm. I opened up a similar PR initially, but closed it because we have symmetric mem enabled through AMD, so we hoped to keep it enabled through #3485 . However, the test still fails at rendezvous: ``` NCCL host communicator for group 0 not found at nccl_devcomm_manager.hpp:106 ``` torchtitan's code is correct here; the fix belongs upstream in PyTorch (correct allocator selection on ROCm). Disabling the ROCm leg now keeps the workflow green pending that upstream fix. ## How Adds `skip_rocm_test=True` to the `fsdp_symm_mem` `OverrideDefinitions` in `tests/integration_tests/h100.py`. `run_tests.py` honors this when invoked with `--gpu_arch_type rocm`, which the `build-test-rocm` leg passes via `run_8xgpu_integration_tests.sh`. This is the same mechanism #3576 used to skip the hybridep flavor on ROCm. ## Test plan - [ ] CUDA/H100 leg still runs `fsdp_symm_mem` (unchanged). - [ ] ROCm `build-test-rocm` leg skips `fsdp_symm_mem`.
## Summary Skip the `fsdp_symm_mem` flavor on the ROCm leg of the **8 GPU Integration Test on H100** workflow. The CUDA/H100 leg continues to run it unchanged. ## Why PyTorch's FSDP2 symmetric-memory path (`set_symm_mem_for_comm()` → `_SymmetricMemory.rendezvous`) selects the **NCCL symm-mem allocator**, which routes through RCCL on ROCm. I opened up a similar PR initially, but closed it because we have symmetric mem enabled through AMD, so we hoped to keep it enabled through #3485 . However, the test still fails at rendezvous: ``` NCCL host communicator for group 0 not found at nccl_devcomm_manager.hpp:106 ``` torchtitan's code is correct here; the fix belongs upstream in PyTorch (correct allocator selection on ROCm). Disabling the ROCm leg now keeps the workflow green pending that upstream fix. ## How Adds `skip_rocm_test=True` to the `fsdp_symm_mem` `OverrideDefinitions` in `tests/integration_tests/h100.py`. `run_tests.py` honors this when invoked with `--gpu_arch_type rocm`, which the `build-test-rocm` leg passes via `run_8xgpu_integration_tests.sh`. This is the same mechanism #3576 used to skip the hybridep flavor on ROCm. ## Test plan - [ ] CUDA/H100 leg still runs `fsdp_symm_mem` (unchanged). - [ ] ROCm `build-test-rocm` leg skips `fsdp_symm_mem`.
## Summary Skip the `fsdp_symm_mem` flavor on the ROCm leg of the **8 GPU Integration Test on H100** workflow. The CUDA/H100 leg continues to run it unchanged. ## Why PyTorch's FSDP2 symmetric-memory path (`set_symm_mem_for_comm()` → `_SymmetricMemory.rendezvous`) selects the **NCCL symm-mem allocator**, which routes through RCCL on ROCm. I opened up a similar PR initially, but closed it because we have symmetric mem enabled through AMD, so we hoped to keep it enabled through pytorch#3485 . However, the test still fails at rendezvous: ``` NCCL host communicator for group 0 not found at nccl_devcomm_manager.hpp:106 ``` torchtitan's code is correct here; the fix belongs upstream in PyTorch (correct allocator selection on ROCm). Disabling the ROCm leg now keeps the workflow green pending that upstream fix. ## How Adds `skip_rocm_test=True` to the `fsdp_symm_mem` `OverrideDefinitions` in `tests/integration_tests/h100.py`. `run_tests.py` honors this when invoked with `--gpu_arch_type rocm`, which the `build-test-rocm` leg passes via `run_8xgpu_integration_tests.sh`. This is the same mechanism pytorch#3576 used to skip the hybridep flavor on ROCm. ## Test plan - [ ] CUDA/H100 leg still runs `fsdp_symm_mem` (unchanged). - [ ] ROCm `build-test-rocm` leg skips `fsdp_symm_mem`.
This PR removed check for hip support for symmetric memory because symmetric memory is now supported on ROCm.