deepspeedai / deepspeedai/DeepSpeed
Do I need an AMD graphics card to compile the ROCM version of Deepspeed?
Open
@loadams is already working on this.
Since Sep 19, 2025.
rocm
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
I have successfully compiled the Linux CU129 version of DeepSpeed and have not used an Nvidia graphics card
Then I tried to build a deep speed version of the rocm, but it failed
I built it in GitHub Actions, so I'm not sure if it's a configuration issue or if an AMD graphics card is necessary
error
Attempting to remove deepspeed/git_version_info_installed.py
Attempting to remove dist
Attempting to remove build
Attempting to remove deepspeed.egg-info
No hostfile exists at /job/hostfile, installing locally
Building deepspeed wheel
* Getting build dependencies for wheel...
[2025-09-16 09:51:10,895] [INFO] [real_accelerator.py:260:get_accelerator] Setting ds_accelerator to cuda (override)
[2025-09-16 09:51:11,133] [INFO] [real_accelerator.py:260:get_accelerator] Setting ds_accelerator to cuda (override)
[2025-09-16 09:51:14,953] [INFO] [logging.py:107:log_dist] [Rank -1] [TorchCheckpointEngine] Initialized with serialization = False
Traceback (most recent call last):
DS_BUILD_OPS=1
File "/home/runner/work/actions-builder/actions-builder/.venv/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
main()
File "/home/runner/work/actions-builder/actions-builder/.venv/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
File "/home/runner/work/actions-builder/actions-builder/.venv/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
File "/home/runner/work/actions-builder/actions-builder/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File "/home/runner/work/actions-builder/actions-builder/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
self.run_setup()
File "/home/runner/work/actions-builder/actions-builder/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 522, in run_setup
super().run_setup(setup_script=setup_script)
File "/home/runner/work/actions-builder/actions-builder/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
File "<string>", line 201, in <module>
File "/home/runner/work/actions-builder/actions-builder/op_builder/builder.py", line 709, in builder
{'cxx': self.strip_empty_entries(self.cxx_args()), \
File "/home/runner/work/actions-builder/actions-builder/op_builder/builder.py", line 401, in strip_empty_entries
return [x for x in args if len(x) > 0]
File "/home/runner/work/actions-builder/actions-builder/op_builder/builder.py", line 401, in <listcomp>
return [x for x in args if len(x) > 0]
TypeError: object of type 'NoneType' has no len()
ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel
Error on line 155
Fail to install deepspeed
runner
- run: |
uname -m && cat /etc/*release
uname -srmv
wget https://repo.radeon.com/amdgpu-install/6.4.3/ubuntu/jammy/amdgpu-install_6.4.60403-1_all.deb
sudo apt install ./amdgpu-install_6.4.60403-1_all.deb
sudo apt update
sudo apt install python3-setuptools python3-wheel
sudo usermod -a -G render,video $LOGNAME # Add the current user to the render and video groups
sudo apt install rocm
printenv
clinfo
- name: install dep
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate ./.venv
pip install torch==${{env.TorchVersion}} torchaudio==${{env.TorchVersion}} --index-url https://download.pytorch.org/whl/rocm6.4
pip install wheel ninja packaging py-cpuinfo psutil
pip install tqdm pydantic msgpack hjson einops
pip install numpy build
pip install -r requirements/requirements-dev.txt
pip install -r requirements/requirements.txt
- name: build
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate ./.venv
echo "hello"
DS_ACCELERATOR=cuda LD_LIBRARY_PATH=/opt/rocm-6.4.3/lib PATH=$PATH:/opt/rocm-6.4.3/bin DS_BUILD_SPARSE_ATTN=0 NCCL_DEBUG=INFO DS_BUILD_OPS=1 DS_BUILD_STRING="+rocm" ./install.sh
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.