robin wrote:
> From [log in to unmask] Sat Nov 1 21:15:21 1997
> Just a test on a Sun system:
> PARAMETER (NL=1000, NC=1001)
> DOUBLE PRECISION A (NC, NL), B (NL, NC), C (NC, NC)
> C = MATMUL (A, B)
> 716 sec.
> CALL DGEMM ( 'N','N', NC, NC, NL, 1.0d0, A, NC, B, &
> NL, 0.0d0, C, NC )
> 255 sec. vanilla BLAS
> 53 sec. libsunperf (Sun optimized BLAS)
>
> What optimization level was used here?
That's exactly what I was speaking about. I've done a simple test
of a number of BLAS level 1 (level 1, the simplest BLAS functions
possible) vs. Sun Performance Library. Used -fast as optimization
option and wrote a single F90 program with both BLAS and intrinsic
calls. Even DCOPY (vector copy) was some 10% or 20% faster than
vector assignment. Other operations vere even more inefficient in
comparison to BLAS.
I posted the test program and the results in comp.lang.fortran some
time ago. If anyone's interested I might try to find it and repost
it here.
I didn't suspect BLAS 3 would make that much difference. But I'm
not really surprised. After all matrix multiplication has higher
complexity.
The suggestion I was making is (just as Michael was explaining):
a compiler should try to detect when an intrinsic call corresponds
to a BLAS call and substitute. Forget any more automatic
optimization unless you can prove that it produces more efficient
code than BLAS. Vendor provided BLAS is more or less a hand-made
product of an imaginative human being, and as such it is likely
to beat automatic optimization in the foreseeable future.
The details may depend on licensing (Sun Performance Library is
licensed), hardware (some hardware vendors make BLAS versions
optimized just for their hardware) and other factors. I guess
a compiler option that would tell what to do (connect to BLAS
or not; if so, then to which version etc.) will solve such issues.
Regards,
Artur Swietanowski
----------------------------------------------------------------------
Artur Swietanowski mailto:[log in to unmask]
Institut fuer Statistik, Operations Research und Computerverfahren,
Universitaet Wien, Universitaetsstr. 5, A-1010 Wien, Austria
tel. +43 (1) 407 63 55 - 120 fax +43 (1) 406 41 59
----------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|