From: Ralf J. <jue...@cs...> - 2009-11-11 19:36:46
|
Hi Carlos, I am not sure what function you were looking at, but blas-gemm takes only three arguments: ? ^Ablas-gemm Search Results for: blas-gemm 1. (blas-gemm! <alpha> <A> <B> <beta> <C>) 2. (blas-gemm <alpha> <A> <B>) choice> 2 ------------------------------------------------------------------------ (blas-gemm <alpha> <A> <B>) (packages/blas/blas.lsh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Return alpha * A . B . = () ? The m*m function is still there in the lush2 beta, it is just not documentated and might go away in a future version. If you care about the performance of matrix-vector operations you should definitely install BLAS and use those functions. Matlab uses them internally, Octave might do as well, I'm not sure. Thanks for the timing results. Let us know how it compares when you use the BLAS functions. Ralf PS: cc'ing to lush-users as it might be of interest to other people. On Wed, 11 Nov 2009, Car...@lo... wrote: > Hi Ralf, > > Thanks for your response. Yes, I found this possibility too but for > instance I have no BLAS installed in my system, and I was scared when I > saw the huge number of parameters for a simple matrix multiplication > operation !. In fact, I will certainly install it in order to try. But, > independently by the fact that m*m has for instance disappear in the lush2 > beta version, I always wonder about the no existence of a matrix > multiplication function in lush, I means written as a native DX function > and not a DE function like the current m*m function. > > Well, I say what intrigues to me, because I use frequently this operation > and is currently more and more faster in Matlab or Octave than it is in > Lush. I do a little bench multiplying two matrices matrices, both > [50000x150] size : > Lush (last version) ............ 35 seconds. Op: (m*m (transpose A) B) > Octave (3.0.5) ................. 0.53 s > Matlab (7.5.0.338 (R2007b)) ... 0.45 s > (executed on a iMac Intel 2.33 GHz Core 2 Duo, under MacOS X 10.5.8) > > It is near 80 times faster with Matlab !!! > > A Matrix-vector multiplication : [50000x150] transposed that multiplies a > [5000x1] vector, repeated ten times : > Lush (last version) ............ 1.22 s. Op: (idx-m2dotm1 (transpose A) v) > Octave (3.0.5) ................. 2.70 s > Matlab (7.5.0.338 (R2007b)) ... 0.164 s > That's better, here Lush uses (idx-m2dotm1), a DX function, and is faster > than Octave but Matlab steel the fastest (and I dont know why, maybe a > very well tuned atlas library ?) > > In all cases I find Lush a very good thing and I try to spread his usage > in my near scientific neighborhood. Good Look to you and thanks again. > > Carlos > > >> Hi Carlos, >> >> There is an alternative matrix multiply in the BLAS-package, >> blas-gemm. >> >> The sn28 package is currently broken in the beta, it needs to >> be updated. >> >> Ralf >> >> >> On Tue, 10 Nov 2009, SourceForge.net wrote: >> >>> >>> Read and respond to this message at: >>> https://sourceforge.net/projects/lush/forums/forum/106861/topic/3454849 >>> By: cermej >>> >>> Hi there ! I'm a former SN user (neural simulator). Using Lush, I >>> frequently >>> use deprecated functions between my old libraries. Those functions >>> sometimes >>> presented in lush as backward compatibility, like matrix multiplication >>> (m*m >>> ...), transpose and many others. Now, that I'm trying to "modernize" my >>> code >>> I see that with Lush2 some of those functions have disappeared. I'm >>> looking >>> for replacements, for instance, a matrix multiplication function, maybe >>> an IDX >>> function. Someone knows the good function ? This interest to me event >>> for lush, >>> if I can find a faster function than m*m. >>> >>> By the way, I have also problems loading "sn28/sn28itenew" package in >>> lush2. >>> The loading stops with an error message: >>> >>> *** new : not a class >>> >>> well, lush2 is a beta version, I will continue to use older lush for >>> that. >>> >>> Carlos >>> >>> >>> ______________________________________________________________________ >>> You are receiving this email because you elected to monitor this forum. >>> To stop monitoring this forum, login to SourceForge.net and visit: >>> https://sourceforge.net/projects/lush/forums/forum/106861/topic/3454849 >>> >> > > |