Skip to content
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

[CUSPARSE] Improve conversion and tests between sparse matrices #1774

Merged
merged 12 commits into from
Feb 23, 2023

Conversation

amontoison
Copy link
Member

@amontoison amontoison commented Feb 15, 2023

Let's see if it solves the conversion issue.

@amontoison
Copy link
Member Author

Hum, I have other errors for the tests with small matrices...
With zero-based indexing we have different errors because all tests of cusparse/broadcast passed.

Test Summary:                                        | Pass  Fail  Total  Time
conversions between CuSparseMatrices                 |   23     9     32  2.1s
  conversion SparseMatrixCSC --> CuSparseMatrixCSC   |    1            1  0.1s
  conversion CuSparseMatrixCSC --> CuSparseMatrixCSR |    1            1  0.0s
  conversion CuSparseMatrixCSC --> CuSparseMatrixCOO |    1            1  1.0s
  conversion CuSparseMatrixCSC --> CuSparseMatrixBSR |    1            1  0.2s
  conversion SparseMatrixCSC --> CuSparseMatrixCSR   |    1            1  0.0s
  conversion CuSparseMatrixCSR --> CuSparseMatrixCSC |    1            1  0.0s
  conversion CuSparseMatrixCSR --> CuSparseMatrixCOO |    1            1  0.0s
  conversion CuSparseMatrixCSR --> CuSparseMatrixBSR |    1            1  0.0s
  conversion SparseMatrixCSC --> CuSparseMatrixCOO   |    1            1  0.0s
  conversion CuSparseMatrixCOO --> CuSparseMatrixCSC |    1            1  0.0s
  conversion CuSparseMatrixCOO --> CuSparseMatrixCSR |    1            1  0.0s
  conversion CuSparseMatrixCOO --> CuSparseMatrixBSR |    1            1  0.0s
  conversion SparseMatrixCSC --> CuSparseMatrixBSR   |    1            1  0.0s
  conversion CuSparseMatrixBSR --> CuSparseMatrixCSC |    1            1  0.0s
  conversion CuSparseMatrixBSR --> CuSparseMatrixCSR |    1            1  0.0s
  conversion CuSparseMatrixBSR --> CuSparseMatrixCOO |    1            1  0.0s

  conversion SparseMatrixCSC --> CuSparseMatrixCSC   |    1            1  0.0s
  conversion CuSparseMatrixCSC --> CuSparseMatrixCSR |          1      1  0.5s
  conversion CuSparseMatrixCSC --> CuSparseMatrixCOO |          1      1  0.0s
  conversion CuSparseMatrixCSC --> CuSparseMatrixBSR |          1      1  0.0s
  conversion SparseMatrixCSC --> CuSparseMatrixCSR   |          1      1  0.2s
  conversion CuSparseMatrixCSR --> CuSparseMatrixCSC |    1            1  0.0s
  conversion CuSparseMatrixCSR --> CuSparseMatrixCOO |    1            1  0.0s
  conversion CuSparseMatrixCSR --> CuSparseMatrixBSR |          1      1  0.0s
  conversion SparseMatrixCSC --> CuSparseMatrixCOO   |          1      1  0.0s
  conversion CuSparseMatrixCOO --> CuSparseMatrixCSC |          1      1  0.0s
  conversion CuSparseMatrixCOO --> CuSparseMatrixCSR |    1            1  0.0s
  conversion CuSparseMatrixCOO --> CuSparseMatrixBSR |          1      1  0.0s
  conversion SparseMatrixCSC --> CuSparseMatrixBSR   |          1      1  0.0s
  conversion CuSparseMatrixBSR --> CuSparseMatrixCSC |    1            1  0.0s
  conversion CuSparseMatrixBSR --> CuSparseMatrixCSR |    1            1  0.0s
  conversion CuSparseMatrixBSR --> CuSparseMatrixCOO |    1            1  0.0s
ERROR: LoadError: Some tests did not pass: 23 passed, 9 failed, 0 errored, 0 broken.
in expression starting at /home/montalex/git/CUDA.jl/test/cusparse/conversions.jl:77

@amontoison amontoison marked this pull request as draft February 15, 2023 22:07
@amontoison amontoison changed the title [CUSPARSE] hotfix for conversion between sparse matrices [CUSPARSE] Improve conversion and tests between sparse matrices Feb 22, 2023
@amontoison amontoison marked this pull request as ready for review February 23, 2023 05:38
@amontoison
Copy link
Member Author

amontoison commented Feb 23, 2023

@maleadt
All CUSPARSE tests should be fixed with this PR.
The conclusion is that we can't convert sparse matrices with CUDA "12.0" if the number of rows and columns are not both greater than 4.

Nvidia directly tested this branch with their development version (and the current broken tests) this morning and all tests passed. The problem is solved upstream.

@maleadt maleadt merged commit be18591 into JuliaGPU:tb/cuda_12 Feb 23, 2023
@amontoison amontoison deleted the cusparse_issue branch February 23, 2023 16:22
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.

None yet

2 participants