-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
MAINT Refactor the common logic for GEMM in wrapper #22719
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
Conversation
As we are going to introduce more and more concrete `PairwiseDistancesReduction`, this will help removing duplicated code logic. Moreover, this will also help with the upcast when templating implementations to support various dtypes.
PairwiseDistancesReduction
: factor the common logic for GEMM under a wrapper
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.
Thanks for the PR! Overall, I like the refactor.
PairwiseDistancesReduction
: factor the common logic for GEMM under a wrapperPairwiseDistancesReduction
: factor the common logic for GEMM in wrapper
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.
LGTM!
Just a renaming suggestion for the compo
attribute and some more doc to make the purpose of the new component more explicit.
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
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.
LGTM
PairwiseDistancesReduction
: factor the common logic for GEMM in wrapperCo-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Reference Issues/PRs
Follow-up of #22320.
Precedes #22590.
What does this implement/fix? Explain your changes.
As we are going to introduce more and more concrete
PairwiseDistancesReduction
, the logic for the GEMM calls for the specialization is going to duplicated again and again.A component is introduced here to help removing some of the duplicated code logic for GEMM.
Moreover, this introduction will also help with the upcasting when working on the support of new dtypes as the templating will only be done on this component.
This also convert the previous buffers to
std::vectors
for an eased memory management.