Skip to content

[rocm7.0_internal_testing] fix enabling sparse tests fp16/bf16 for rocm7.0/7.1 #2239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: rocm7.0_internal_testing
Choose a base branch
from

Conversation

dnikolaev-amd
Copy link

@dnikolaev-amd dnikolaev-amd commented Jun 4, 2025

Revamped version of #2108

PR to:

  • enable complex data types for sparse matmul on ROCm
  • fix sparse addmm/baddbmm on ROCm
  • fix sparse hipification for ROCm
  • fix/enable sparse tests on ROCm (~50 tests total for non-fp16/bf16):
  • enable fp16/bf16 sparse path for rocm7.0
  • enable fp16/bf16 sparse tests for rocm7.0/7.1
test_sparse_csr.py::TestSparseCSRCUDA::test_bmm_cuda_*
test_sparse.py::TestSparseCUDA::test_sparse_matmul_cuda_*
test_sparse_csr.py::TestSparseCSRCUDA::test_mm_cuda_float64
test_sparse_csr.py::TestSparseCSRCUDA::test_addmm_all_sparse_csr_SparseCS*
test_sparse_csr.py::TestSparseCSRCUDA::test_addmm_sizes_all_sparse_csr_*
test_sparse_csr.py::TestSparseCSRCUDA::test_sparse_addmm_cuda_float16

@dnikolaev-amd dnikolaev-amd force-pushed the dnikolaev/fix_sparse_tests_rocm6.5 branch from 429e404 to 065ce05 Compare June 4, 2025 21:09
@dnikolaev-amd dnikolaev-amd requested a review from jeffdaily as a code owner June 4, 2025 21:09
@dnikolaev-amd dnikolaev-amd force-pushed the dnikolaev/fix_sparse_tests_rocm6.5 branch from 065ce05 to a7d0ac5 Compare June 4, 2025 21:23
@jithunnair-amd jithunnair-amd marked this pull request as draft June 4, 2025 21:26
@dnikolaev-amd dnikolaev-amd force-pushed the dnikolaev/fix_sparse_tests_rocm6.5 branch from a7d0ac5 to c5ca23a Compare June 4, 2025 21:27
Copy link
Collaborator

@jithunnair-amd jithunnair-amd left a comment

Choose a reason for hiding this comment

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

Please address comments and test with ROCm7.0 mainline builds. We can refine the ROCm6.3/6.4 conditions in a follow-up PR , if needed

@dnikolaev-amd dnikolaev-amd force-pushed the dnikolaev/fix_sparse_tests_rocm6.5 branch from c5ca23a to 3ffc57b Compare June 4, 2025 23:53
@rocm-repo-management-api
Copy link

rocm-repo-management-api bot commented Jun 6, 2025

Jenkins build for 3ffc57bf5a5a60fcde0312bdff062ee156c07d9d commit finished as FAILURE
Links: Blue Ocean view / Build artifacts

@dnikolaev-amd dnikolaev-amd force-pushed the dnikolaev/fix_sparse_tests_rocm6.5 branch from 3ffc57b to 5b40cac Compare June 10, 2025 15:57
@rocm-repo-management-api
Copy link

rocm-repo-management-api bot commented Jun 10, 2025

Jenkins build for 96c8fddcca90df3c6530b607a591ffced37cad7c commit finished as FAILURE
Links: Blue Ocean view / Build artifacts

fix enabling sparse tests fp16/bf16 for rocm7.0/7.1
@dnikolaev-amd dnikolaev-amd force-pushed the dnikolaev/fix_sparse_tests_rocm6.5 branch from 5b40cac to 96c8fdd Compare June 10, 2025 18:00
@rocm-repo-management-api
Copy link

rocm-repo-management-api bot commented Jun 10, 2025

Jenkins build for 96c8fddcca90df3c6530b607a591ffced37cad7c commit finished as FAILURE
Links: Blue Ocean view / Build artifacts

@dnikolaev-amd dnikolaev-amd marked this pull request as ready for review June 11, 2025 09:25
@dnikolaev-amd dnikolaev-amd marked this pull request as draft June 12, 2025 16:14
@dnikolaev-amd dnikolaev-amd changed the base branch from rocm6.5_internal_testing to rocm7.0_internal_testing June 12, 2025 16:20
@dnikolaev-amd dnikolaev-amd marked this pull request as ready for review June 12, 2025 16:24
@rocm-repo-management-api
Copy link

rocm-repo-management-api bot commented Jun 12, 2025

Jenkins build for 96c8fddcca90df3c6530b607a591ffced37cad7c commit finished as FAILURE
Links: Blue Ocean view / Build artifacts

@dnikolaev-amd dnikolaev-amd changed the title fix enabling sparse tests fp16/bf16 for rocm7.0/7.1 [rocm7.0_internal_testing] fix enabling sparse tests fp16/bf16 for rocm7.0/7.1 Jun 12, 2025
@@ -68,6 +68,12 @@ def _op_supports_any_sparse(op):
) or (not IS_WINDOWS and not TEST_WITH_ROCM)

HIPSPARSE_SPMM_COMPLEX128_SUPPORTED = torch.version.hip and version.parse(torch.version.hip.split("-")[0]) >= version.parse("6.0")
HIPSPARSE_FP16_SUPPORTED = torch.version.hip and version.parse(torch.version.hip.split("-")[0]) >= version.parse("7.0")
HIPSPARSE_BF16_SUPPORTED = torch.version.hip and version.parse(torch.version.hip.split("-")[0]) >= version.parse("7.1")
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is not yet tested, but hipsparse will support this in 7.1

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.

3 participants