-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support for case where number of stored elements in one of the matrices is greater than the range of int32 #6
Comments
Yes, that's correct - the LP64 interface for MKL is The good news is that there's an ILP64 interface for MKL that uses If I get time I'll look into linking directly to the ilp64 libraries instead of trying to go through the main interface, but that's enough work that I haven't done it yet. Sorry. |
I looked into this a little more - the MKL that's distributed with anaconda doesn't appear to support the int64 interface and I don't know why. I installed the intel channel mkl and it worked fine.
I think this should resolve your problem. |
Just wanna throw a quick comment. If everything fails and you cannot override the 2^31-1 limit maximum elements, you could just breakup matrix multiplication into quadrants to kinda go around it. This was what I did with a 90000X90000 matrix. Clearly this would sacrifice runtime, but I think it's worth it. p.s.: This package is very useful so THANK YOU! |
I believe that this works now. I've tried the intel, conda-forge, and defaults channel and all seem to support 64 bit integers. |
It does not work. Don't use conda if you want to use MKL_INTERFACE_LAYER=ILP64. The env variable has no effect according to the code snippet @asistradition. |
I am also having difficulty with this issue. Is there a supported way of converting the indices of a csr array to int64 without using intel mkl? In particular, I try
The output is I ran into this issue because I am getting the following error: |
The MKL interface is only for the MKL libraries. It doesn't change anything about what scipy is doing. The int32 indices will get copied to promote them to int64 when you call a MKL function. You have to set the MKL_INTERFACE_LAYER environment variable before you import sparse_dot for the first time; it's runtime linked to the MKL library. If the int64 interface isn't available it should give you a runtime warning when you import it. |
I am indeed getting this runtime error. I however do not get it when installing mkl via |
This should print If you call |
Thanks for the help. However, if I use Extra question:
Is there a standard way of installing |
You can try installing mkl from pip as well ( Unfortunately, it looks like intel is no longer supporting an anadonda channel (likely due to the same licensing changes that have forced me to remove it from most of my work). I doubt I can give you any more help on that than intel can. |
Thanks so much for all you help! I really appreciate it! |
Hi, I want to do a dot product of two sparse matrices and one of the matrix has ~4bil stored elements. I get this error:
It seems to me it is because the number of stored elements are out of the range of int32. Am i correct? And if so, is there a way to do this using sparse_dot_mkl. TIA.
The text was updated successfully, but these errors were encountered: