-
Notifications
You must be signed in to change notification settings - Fork 9
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
[bug]: issues with complex interval matrices multiplication #85
Comments
Hi @lucaferranti, I was thinking in looking into this. Do you still think the best approach would be to define an IntervalMatrix type? |
Moreover, there is another issue, since setrounding for Float64 was deprecated, which leaves us in uncharted seas... |
https://github.com/matsueushi/RoundingEmulator.jl replaces |
@dpsanders thank you, I will look into it. I am thinking to change the rounding modes from C, using ccall and Glibc (thus restricting the package to Linux): the main issue is that the implementation of the matrix product in the library is fast because it relies on LAPACK with directed rounding. I'm checking if some other work of the Waseda group if they have alternatives to this, but if we want to use the high performance matrix multiplication we need to change rounding mode on the processor. |
Ah I see. Unfortunately changing the rounding mode is complicated due to the way that LLVM works, which is why |
@dpsanders It seems like llvm now has an intrinsic for setting round modes, 12:21 - It was not too difficult to call the intrinsic, so, I have working code that changes the rounding modes, I'm writing some more tests and some macros |
I wrote some simple code calling the intrinsics and packaged it: https://github.com/orkolorko/SetRoundingLLVM.jl It is a workaround until setrounding is fixed in the main Julia codebase. @dpsanders I checked and using the llvm intrinsic directed rounding works also on Windows and Mac Os (I added some simple tests checking the directed rounding works) |
(sorry for the radio silence, I'll come back to this this (European time) evening) |
Hi @orkolorko thanks for the interest in the package!
As David pointed out above, The idea of Rump fast matrix multiplication relies on reducing it to floating point matrix multiplications. Using I am no an expert of LLVM, but I was also under the impression that in more recent versions changing rounding mode safely(?) should be possible. If you managed to implement it, that is absolutely fantastic!! Just a small notice, if what you are doing actually works, I think it would broadly affect all packages in JuliaIntervals, not just IntervalLinearAlgebra. I am very interested in following the development of that. Would be particularly interesting to see how that compares to 1) the current use of SetRounding.jl 2) the use of RoundingEmulator.jl . Those would be very valuable and your work could replace |
Hi @lucaferranti, I invited you to SetRoundingLLVM and opened an issue there.
I think converting to midpoint radius is a really good idea; I can start working on it on a refactor branch if we agree on it (I need complex matrix multiplication anyway for some other work I'm doing...) |
I have to confess, when I read the paper last year I was not super convinced by the results hence the algorithms didn't make it to my todo list. Still, I agree it would be valuable to have them available, at least for reproducing the results and benchmarking |
Bug description
At the moment, using complex interval matrices falls back to the "default" multiplication in LinearAlgebra.jl instead of using Rump fast multiplication, which should be added for complex interval matrices.
Minimum (non-)working example
Expected behavior
should use the multiplication algorithm defined in the package.
Related issues
Additional information
I am starting to think I should define a
IntervalMatrix
type here and define the operations on it, this would solve this, #72 and other possible issues that haven't noticed yet.The text was updated successfully, but these errors were encountered: