Skip to content

Conversation

@k-artem
Copy link
Contributor

@k-artem k-artem commented Jul 24, 2025

The patch delivers several fixes for building issues for CUDA part of DeepSpeed library.
Percentage of passed unit tests improved(tested on RDNA hardware, gfx110x and gfx12x) Before:
collected 5298 items / 15 skipped
2773 failed, 862 passed, 1665 skipped, 13 errors
After:
collected 5851 items / 11 skipped
4187 failed, 1373 passed, 292 skipped, 10 errors

Regarding testing of fp_quantizer(DS_BUILD_FP_QUANTIZER) via tests/unit/ops/fp_quantizer/test_fp_quant.py, this test depends on QPyTorch which should be patched before run on AMD, please apply Tiiiger/QPyTorch#71

@k-artem k-artem requested a review from hwchen2017 July 25, 2025 16:01
@k-artem k-artem force-pushed the improve_support_of_amd_hardware branch from 5851003 to 1dc6bb7 Compare July 31, 2025 10:25
@k-artem
Copy link
Contributor Author

k-artem commented Jul 31, 2025

@hwchen2017 kindly ask for review after fixed your comments.

@hwchen2017 hwchen2017 marked this pull request as draft August 1, 2025 23:21
@k-artem k-artem force-pushed the improve_support_of_amd_hardware branch from 09b1953 to f2dbbb7 Compare August 3, 2025 15:11
k-artem added 3 commits August 3, 2025 15:15
The patch delivers several fixes for building issues for CUDA part
of DeepSpeed library.
Percentage of passed unit tests improved(tested on RDNA hardware, gfx110x and gfx12x)
Before:
collected 5298 items / 15 skipped
2773 failed, 862 passed, 1665 skipped, 13 errors
After:
collected 5851 items / 11 skipped
4187 failed, 1373 passed, 292 skipped, 10 errors

Signed-off-by: Artem Kuzmitckii <artem.kuzmitckii@amd.com>
Signed-off-by: Artem Kuzmitckii <artem.kuzmitckii@amd.com>
part  2

Signed-off-by: Artem Kuzmitckii <artem.kuzmitckii@amd.com>
@k-artem k-artem force-pushed the improve_support_of_amd_hardware branch from f2dbbb7 to 77a7e06 Compare August 3, 2025 15:18
@k-artem k-artem marked this pull request as ready for review August 3, 2025 15:19
@k-artem k-artem requested a review from hwchen2017 August 3, 2025 15:19
Signed-off-by: Artem Kuzmitckii <artem.kuzmitckii@amd.com>
@k-artem k-artem force-pushed the improve_support_of_amd_hardware branch from 45a01df to 0946828 Compare August 18, 2025 17:22
@loadams
Copy link
Collaborator

loadams commented Sep 2, 2025

@k-artem - is this ready for final review? @hwchen2017 - any remaining review requests?

@k-artem
Copy link
Contributor Author

k-artem commented Nov 12, 2025

@loadams could you please help with continue review?

@jithunnair-amd
Copy link
Contributor

jithunnair-amd commented Dec 1, 2025

@tjruwase @loadams Can you please help move this PR forward? I believe we have addressed all review comments. This PR significantly improves DeepSpeed functionality on AMD hardware.

Also, we discussed this a while ago, but I don't think we moved forward on it: how do we remove the DeepSpeed dependency on this inactive repo?:

Regarding testing of fp_quantizer(DS_BUILD_FP_QUANTIZER) via tests/unit/ops/fp_quantizer/test_fp_quant.py, this test depends on QPyTorch which should be patched before run on AMD, please apply Tiiiger/QPyTorch#71

Related issue: #7216

@sfc-gh-truwase
Copy link
Collaborator

@tjruwase @loadams Can you please help move this PR forward? I believe we have addressed all review comments. This PR significantly improves DeepSpeed functionality on AMD hardware.

@jithunnair-amd, yes I will focus on this PR.

@sfc-gh-truwase
Copy link
Collaborator

Also, we discussed this a while ago, but I don't think we moved forward on it: how do we remove the DeepSpeed dependency on this inactive repo?:

Apologies for this question hanging for so long. Since so much has changed over the past months, I think it might be worth having a chat on this.

@jithunnair-amd
Copy link
Contributor

Also, we discussed this a while ago, but I don't think we moved forward on it: how do we remove the DeepSpeed dependency on this inactive repo?:

Apologies for this question hanging for so long. Since so much has changed over the past months, I think it might be worth having a chat on this.

Sure, would you like to discuss here, or on a different platform eg. email? The gist of it is that we aren't aware of any alternatives for QPyTorch, so creating a deepspeed fork is the next best option to make updates to it. Currently, this lib is only used in unit tests (test_quantized_linear_module.py and test_fp_quant.py).

@sfc-gh-truwase
Copy link
Collaborator

alternatives for QPyTorch, so creating a deepspeed fork is the next best option to make updates to it. Currently, this lib is only used in unit tests (test_quantized_linear_module.py and test_fp_quant.py).

Got it. Unfortunately, we lack bandwidth to maintain QPyTorch fork. Moreover, our roadmap is to streamline by deprecating features subject to bandwidth and community interests. Are you interested in maintaining such a fork?

@sfc-gh-truwase sfc-gh-truwase enabled auto-merge (squash) December 10, 2025 00:47
@sfc-gh-truwase
Copy link
Collaborator

@k-artem can you please address the formatting issues?

@k-artem
Copy link
Contributor Author

k-artem commented Dec 10, 2025

@k-artem can you please address the formatting issues?

hi @sfc-gh-truwase , I checked it, actually it looks like a CI issue

yapf.....................................................................Failed
- hook id: yapf
- exit code: 1

Traceback (most recent call last):
  File "/home/runner/.cache/pre-commit/repoi51ipx2f/py_env-python3.10/bin/yapf", line 3, in <module>
    from yapf import run_main
  File "/home/runner/.cache/pre-commit/repoi51ipx2f/py_env-python3.10/lib/python3.10/site-packages/yapf/__init__.py", line 41, in <module>
    from yapf.yapflib import yapf_api
  File "/home/runner/.cache/pre-commit/repoi51ipx2f/py_env-python3.10/lib/python3.10/site-packages/yapf/yapflib/yapf_api.py", line 39, in <module>
    from yapf.pyparser import pyparser
  File "/home/runner/.cache/pre-commit/repoi51ipx2f/py_env-python3.10/lib/python3.10/site-packages/yapf/pyparser/pyparser.py", line 44, in <module>
    from yapf.yapflib import format_token
  File "/home/runner/.cache/pre-commit/repoi51ipx2f/py_env-python3.10/lib/python3.10/site-packages/yapf/yapflib/format_token.py", line 23, in <module>
    from yapf.pytree import pytree_utils
  File "/home/runner/.cache/pre-commit/repoi51ipx2f/py_env-python3.10/lib/python3.10/site-packages/yapf/pytree/pytree_utils.py", line 30, in <module>
    from yapf_third_party._ylib2to3 import pygram
  File "/home/runner/.cache/pre-commit/repoi51ipx2f/py_env-python3.10/lib/python3.10/site-packages/yapf_third_party/_ylib2to3/pygram.py", line 39, in <module>
    pattern_grammar = driver.load_grammar(_PATTERN_GRAMMAR_FILE)
  File "/home/runner/.cache/pre-commit/repoi51ipx2f/py_env-python3.10/lib/python3.10/site-packages/yapf_third_party/_ylib2to3/pgen2/driver.py", line 252, in load_grammar
    g.load(gp)
  File "/home/runner/.cache/pre-commit/repoi51ipx2f/py_env-python3.10/lib/python3.10/site-packages/yapf_third_party/_ylib2to3/pgen2/grammar.py", line 95, in load
    d = pickle.load(f)
EOFError: Ran out of input

@sfc-gh-truwase sfc-gh-truwase merged commit b00b75f into deepspeedai:master Dec 10, 2025
12 of 13 checks passed
k-artem added a commit to k-artem/DeepSpeed that referenced this pull request Dec 16, 2025
…extensioni

Details deepspeedai#7448 (comment)

Signed-off-by: Artem Kuzmitckii <artem.kuzmitckii@amd.com>
@k-artem k-artem deleted the improve_support_of_amd_hardware branch December 22, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants