-
Notifications
You must be signed in to change notification settings - Fork 10
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
Vec * SparseMat & Mat * SparseMat support and other improvements #30
Conversation
I guess the macOS failure (it specifically fails in Matrix*SpMatrix tests) has something to do with MKL_jll version (judging by the file name it is a bit older than Win/Linux ones). |
@andreasnoack @KristofferC If you have time, could some of you please take a look at the PR? |
I haven't really kept up with the changes in LinearAlgebra so I am not super qualified to look at this. But overall it looks good. I'm happy to make you a collaborator on this repo. I am a bit confused about the error on macOS nightly though.
Aren't all builds running with MKL_jll v2022.0.0+0? I think it would be good to look into this a bit more. What difference is it with macOS nightly compared to the other builds? |
Thank you!
Yes, that's right. Also with the recent update to v2022.1 the error doesn't go away. |
@dmbates Unfortunately, I have discovered your dmb/matrix_sparse branch, which overlaps with this PR, too late. If you have any chance to review, please let me know your suggestions. |
8f1c5fa
to
5b0559a
Compare
Did you figure out what caused the previous mac error (considering CI is now green)? |
@KristofferC Oh no, unfortunately, it's still there for the new |
Mac is just officially unsupported now... @alyst Happy to give you commit access to upgrade this package (sorry I just noticed this now since I usually didn't pay attention to MKLSparse.jl). |
testset automatically does that
5b0559a
to
f152fd6
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #30 +/- ##
=========================================
Coverage ? 24.86%
=========================================
Files ? 7
Lines ? 1693
Branches ? 0
=========================================
Hits ? 421
Misses ? 1272
Partials ? 0 ☔ View full report in Codecov by Sentry. |
change char encoding to '0' and '1', use sparse_index_base_t as the default value
increase atol, as with random size matrices 100*eps is too stringent
like LowTri{T, Adjoint{T, SparseMtx{T}}}
37ed9c8
to
bec058f
Compare
@amontoison Could you please take a look? |
@alyst For the modification about:
It's what is used by many API, in particular GPU routines like CUDA toolkit, oneAPI or ROCm. To be the best of my knowledge, |
Where is the error for SparseMatrixCOO? Talking about it, we should do extensions for the packages that define sparse COO and CSR matrices instead a doing a copy of the types here. |
I can certainly revert it, if @enum sparse_index_base_t::UInt32 begin
SPARSE_INDEX_BASE_ZERO = 0
SPARSE_INDEX_BASE_ONE = 1
end which |
The previous CI run: https://github.com/JuliaSparse/MKLSparse.jl/actions/runs/10549759585/job/29225173875#step:6:218
Full support for COO & CSR is definitely not my goal. I've just added the bare minimum to enable testing + CSR is needed to implement Mat * SparseMatCSC. |
LGTM! |
This PR (rebased on top of #37)
simplifies a bit the w1 *rapper generation logicdescribe_and_unwrap()
for more adv. cases likeLowerTriangular{T, Adjoint{T, SparseMatrixCSC{T}}}
, some cleanups tomatrix_descr
codeZ
/O
to0
/1
as the latter is more straightforwardmul!()
are not redefined (this is Julia version-specific)streamlines testing, so that all 4 numeric types are covered@test_blas
macro replaced by conventional@test
macro in combination with@blas
macro that allows more fine-grained checks of whether Sparse BLAS MKL methods are being calledmkl_sparse_xxx
API calls and MKLSparseError exceptionMKLSparseMatrix
)ColMajorRes = ColMajorMtx*SparseMatrixCSC
is the same asRowMajorRes = SparseMatrixCSR*RowMajorMtx
.Unfortunately, the older Sparse BLAS API doesn't support the combination of one-based Sparse matrices and row-major storage, so I had to add some boilerplate code to leverage newermkl_sparse_xxx
API.