Skip to content

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

Merged
maleadt merged 12 commits into
JuliaGPU:tb/cuda_12from
amontoison:cusparse_issue
Feb 23, 2023
Merged

maleadt merged 12 commits into
JuliaGPU:tb/cuda_12from
amontoison:cusparse_issue

Conversation

@amontoison

@amontoison amontoison commented Feb 15, 2023 •

Copy link
Copy Markdown
Member

Let's see if it solves the conversion issue.

@amontoison

Copy link
Copy Markdown
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

amontoison commented Feb 23, 2023 •

Copy link
Copy Markdown
Member Author

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

2 participants