This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran,patch] New option to use BLAS routines for matrix multiplication


Hi Steven,

It looks like a cool improvement -- but must this be in GCC 4.2?
Don't take this as discouragement, I really like the idea of using
BLAS more when it's available (rationale: why invent the matmul
wheel twice? ;-)

It does not have to be in GCC 4.2. If the general opinion is that 4.3 would be better, I'd be happy to have this patch approved now and commit it after branching. I do think it's better for it to be in 4.2, perhaps marked as an experimental feature (as is the allocatable components stuff, though in a different way). After all, it's not the default behaviour.


Does the driver know how to link in the BLAS library itself, or is
it up to the user to provide the extra -lblas (or whatever) option?

It's up to the user to provide the needed libraries at link time. After all, no two BLAS implementations have the same way to be linked in :)


Where is the documentation of the new options and this new feature?

I'm currently writing it, and will post it ASAP. I should have stated that in my patch submission.


Oh, and how does it handle the MATMUL(TRANSPOSE()) optimization?

It handles it well. In fact, the codepath for BLAS calls is the same as for regular MATMUL, except at the very end (when the multiplication is actually performed), so that this optimization is preserved whether we make a BLAS call or not. I expect it to be the same for every future such optimization.


FX


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]