Skip to content

[ROCm] Remove check for hip support for symmetric memory. - #3485

Merged
tianyu-l merged 2 commits into
pytorch:mainfrom
akashveramd:av_remove_hip_check
Jun 3, 2026
Merged

tianyu-l merged 2 commits into
pytorch:mainfrom
akashveramd:av_remove_hip_check

Conversation

@akashveramd

@akashveramd akashveramd commented Jun 2, 2026 •

Copy link
Copy Markdown
Collaborator

This PR removed check for hip support for symmetric memory because symmetric memory is now supported on ROCm.

@akashveramd akashveramd self-assigned this Jun 2, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 2, 2026
@pytorch-bot

pytorch-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

Warning: Unknown label ciflow/rocm.
Currently recognized labels are

  • ciflow/8gpu
  • ciflow/h100.8
  • ciflow/rl

Please add the new label to .github/pytorch-probot.yml

@akashveramd akashveramd changed the title [ROCm] Removed check for hip support for symmetric memory. [ROCm] Remove check for hip support for symmetric memory. Jun 2, 2026
@akashveramd
akashveramd marked this pull request as draft June 2, 2026 17:58
@akashveramd
akashveramd marked this pull request as ready for review June 2, 2026 18:26
@akashveramd

Copy link
Copy Markdown
Collaborator Author

@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?

Comment on lines +224 to +227
or (
torch.version.hip is None
and torch.cuda.get_device_capability() < (9, 0)
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the change, why wouldn't we error out on RoCM?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 None evaluate to False. This sounds wrong to me.

Could you clarify what you think is the correct behavior?

@akashveramd akashveramd Jun 3, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I believe so. @yuxinwan-amd @pragupta will confirm if symmetric memory is available for all ROCm versions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tianyu-l we confirm that It's been supported since rocm 6.4.

@tianyu-l tianyu-l added the ciflow/h100.8 Trigger H100.8 CI label Jun 3, 2026
@tianyu-l
tianyu-l merged commit 8ec585e into pytorch:main Jun 3, 2026
23 of 25 checks passed
@akashveramd
akashveramd deleted the av_remove_hip_check branch June 3, 2026 20:02
tianyu-l pushed a commit that referenced this pull request Jun 9, 2026
## 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`.
wwwjn pushed a commit that referenced this pull request Jun 10, 2026
## 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`.
saforem2 pushed a commit to saforem2/torchtitan that referenced this pull request Jun 10, 2026
## 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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/h100.8 Trigger H100.8 CI ciflow/rocm ciflow/8gpu CLA Signed This label is managed by the Meta Open Source bot. module: rocm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants