[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49940] The svd function takes very long time
From: |
Dmitri A. Sergatskov |
Subject: |
[Octave-bug-tracker] [bug #49940] The svd function takes very long time for big matrices |
Date: |
Fri, 25 Jan 2019 14:11:53 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0 |
Follow-up Comment #8, bug #49940 (project octave):
Re-running benchmark from Comment 3 on Xeon W3530 @ 2.80GHz 4c/8th with the
latest multithreaded openblas I got:
LD_PRELOAD=~dima/src/OpenBLAS/libopenblas.so OPENBLAS_NUM_THREADS=4
./run-octave -q -f
octave:1> a=randn(4000);
octave:2> tic; inv(a); toc
Elapsed time is 4.07135 seconds.
octave:3> x = rand (2e3);
octave:4>
octave:4> svd_driver ("gesvd");
octave:5> printf ("SVD_DRIVER: gesvd, Matrix Size: %s\n", mat2str (size (x)));
SVD_DRIVER: gesvd, Matrix Size: [2000 2000]
octave:6>
octave:6> tic; sv = svd (x); bm1 = toc
bm1 = 3.3586
octave:7> tic; [u,s,v] = svd (x); bm2 = toc
bm2 = 89.112
octave:8>
octave:8> svd_driver ("gesdd");
octave:9> printf ("SVD_DRIVER: gesdd, Matrix Size: %s\n", mat2str (size (x)));
SVD_DRIVER: gesdd, Matrix Size: [2000 2000]
octave:10>
octave:10> tic; sv2 = svd (x); bm21 = toc
bm21 = 3.3618
octave:11> tic; [u2,s2,v2] = svd (x); bm22 = toc
bm22 = 5.9142
3.3 sec / 89.112 sec seems to be much bigger difference than
what was reported in Comment 3. There are many things has
changed (newer blas/lapack, newer compiler, newer kernel, etc..)
and I just want to make sure it is not due to changes in octave code.
I also noticed that gesvd code runs essentially single-threaded.
Dmitri.
--
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?49940>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/