필터 지우기
필터 지우기

Matrix multiplication not returning on certain matrix content (Intel)

조회 수: 2 (최근 30일)
Philipp
Philipp 2024년 4월 10일
편집: Bruno Luong 2024년 4월 11일
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
John D'Errico
John D'Errico 2024년 4월 10일
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.
Philipp
Philipp 2024년 4월 10일
It's about 4 GB and I don't know if I can reproduce it on any other size and I have no intent to invest any more time into this. The provided link directs to a German university (over https) with a download service for larger files. The university scans the files internally for viruses. It's the best I can do.

댓글을 달려면 로그인하십시오.

답변 (1개)

Bruno Luong
Bruno Luong 2024년 4월 10일
편집: Bruno Luong 2024년 4월 10일
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
Walter Roberson
Walter Roberson 2024년 4월 11일
Hmmm... I wonder if the hardware could convert the numbers to 80 bit floats, do the operation, and convert back?
Bruno Luong
Bruno Luong 2024년 4월 11일
편집: Bruno Luong 2024년 4월 11일
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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by