-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linalg: refactor blas/lapack modules #913
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @jalvesz, it is very very good already. I only have a few comments. To summarize:
implicit none(type, external)
->implicit none
, to satisfy implicit none(type,external) may not support by some fortran compiler #897- please remove the
legacy/
folder altogether: it would cause confusion to have some code duplication. (thanks for leaving it there for comparison) - please do not
use stdlib_blas_constants_*
in the interfaces, as that increases parsing complexity, but no constants are used there. - Something in the module/submodule structure can be slightly streamlined.
legacy/refactor_blaslapack_subm.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for providing the generating script.
Please delete it as it is not necessary to have it inside stdlib once the refactoring is merged.
Thanks for your reviews @perazz! I've tried to address your comments in the latest commits. Let me try to summarize:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @jalvesz for the review. I think it is almost ready.
I noticed the vast change in naming convention, and imho:
_subm_
should not be used: it does not conform with the submodule names everywhere else in the library. Also, we should try to stay away from names that become too long- For the same reason, a
submodule
would better not be used if there's only one (theauxiliary
case). I suggest to not sacrifice clarity and simplicity now for the sake of a potential and currently unplanned future expansion :)
I see your points @perazz, the That being said, I do think that module/submodule splitting by:
Should be the preferred structuring for stdlib. There was a discussion here #540 around this topic. Some ideas borrowed from @ivan-pi |
@jalvesz as you point out there is a prior specific discussion, I think it is a separate topic, that will find agreement for the whole library, which should not be part of the current PR which addresses the BLAS/LAPACK backends. So my suggestion would be to restore the names you proposed in the initial commits, and then you would propose the naming convention change as part of a separate PR where it can be properly addressed and discussed (separation of concerns). |
Major refactoring of the blas/lapack modules into submodules for improved build speed and potentially better organization of procedures. This PR follows #908
legacy
folder which should be removed before merging.blas
andlapack
to organize all required files within.legacy\refactor_blaslapack_subm.py
script which contains 3 dictionaries:blas_groups
,lapack_groups
,lapack_subgroups
. The first two list the procedures in groups following lapacks documentation with some extra arbitrary splitting in order to improve parallel build. Given that the use of submodules requires a header module to declare the procedures signature, putting all lapack procedures into a single header implies a stall in the build process while building this single header. The dictionarylapack_subgroups
proposes to split intomodules
which define macro-groups for thesubmodules
.