Matrix multiplication not returning on certain matrix content (Intel)
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I have a certain matrix multiplication which is not returning on my Intel machine (Win11 Pro, Intel i7-8700). When I exchange the content of the matrices with random numbers I can obtain a result within seconds. I could reproduce this problem on several Intel machines (and different Matlab versions). I relate this problem to Intel MKL. One matrix contains a lot of entries close to zero (10^-322) which probably causes the problem.
To reproduce it, download the two matrices:
and run the command:
scc=At*scc;
Is this operation running through on your machine?
2 Kommentare
John D'Errico
am 10 Apr. 2024
It is generally a bad idea to force someone to download a file from off-site. We don't know if you are planting a trojan on our system. Honestly, I won't touch it to test your question as a download. Maybe others will be more willing to take a chance on an unknown person, posting a link to an unkown file. I hope they don't take the risk since you could have made this much simpler.
Just attach a .mat file that contains the matrices. Click on the paper clip icon on a comment.
Antworten (1)
Bruno Luong
am 10 Apr. 2024
Bearbeitet: Bruno Luong
am 10 Apr. 2024
The matrix contains many non normalized floating point numbers and operations on these numbers are very slow;
>> load('C:\Users\bruno\Downloads\test.mat')
>> size(At)
ans =
17534 17532
>> size(scc)
ans =
17532 8281
>> tic; B=At*scc(:,1); toc
Elapsed time is 1.105924 seconds.
>> tic; B=At*scc(:,1:10); toc
Elapsed time is 10.237435 seconds.
>> tic; B=At*scc(:,1:100); toc
Elapsed time is 108.484422 seconds.
On my machine it takes 1 sec by column of scc. So eventually I guess it will finish in less than 3h.
Note that for normalized numbers the operation is roughly 200 time faster.
So for now I think there is no bug. Just let the thing run over night (Sorry I won't do that).
13 Kommentare
Walter Roberson
am 11 Apr. 2024
Hmmm... I wonder if the hardware could convert the numbers to 80 bit floats, do the operation, and convert back?
Bruno Luong
am 11 Apr. 2024
Bearbeitet: Bruno Luong
am 11 Apr. 2024
Certainly a very nice idea. But one of the reasons: As the exponet has only 4 more bits, its is still not enough to convert all denormalized 64 bits numbers to normalized 80 bits. It needs +6 bits exponent since 2^6 >= 52 > 2^5 > 2^4
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!