Skip to content

ENH: Add runtime CPU dispatching support for einsum #17107

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

Closed
wants to merge 1 commit into from

Conversation

seiko2plus
Copy link
Member

ENH: Add runtime CPU dispatching support for einsum

This patch doesn't cause any performance changes,
it just aims to simplify the review process for #17049,
according to #17049 (comment)

  This patch doesn't cause any performance changes,
  it just aims to simplify the review process for numpy#17049,
  according to numpy#17049 (comment)
@seiko2plus
Copy link
Member Author

/cc, @eric-wieser

@eric-wieser eric-wieser self-requested a review August 19, 2020 19:57
@eric-wieser
Copy link
Member

This is still a lot more than I was hoping for. I'll have a go myself, and if it proves too challenging then probably approve this.

@eric-wieser
Copy link
Member

Done in #17109. I think this should be easy to reapply over the top, assuming that PR passes CI (Local builds are having cython issues for me)

#include <numpy/halffloat.h>
#include <npy_pycompat.h>

#include <ctype.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes sense to fill this file with includes like this one. I've tried to address this in #17109.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, a private header shared between two sources, maybe I should rename it to einsum_private.h

@@ -853,6 +853,7 @@ def get_mathlib_info(*args):
join('src', 'multiarray', 'dragon4.c'),
join('src', 'multiarray', 'dtype_transfer.c'),
join('src', 'multiarray', 'einsum.c.src'),
join('src', 'multiarray', 'einsum.dispatch.c.src'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Headers need to be listed in this file too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since einsum_helpers.h is a private header only used by einsum.c.src and einsum.dispatch.c.src

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact it's private isn't relevant from what I remember: headers should be in the list above so that rebuilds can detect they've changed. See my PR for details.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for the clarification

@eric-wieser
Copy link
Member

Cancelled travis to save 2.5 hours of CI, can restart it if after closing or merging #17109

@seiko2plus
Copy link
Member Author

seiko2plus commented Aug 19, 2020

@eric-wieser,

This is still a lot more than I was hoping for. I'll have a go myself, and if it proves too challenging then probably approve this.
Done in #17109. I think this should be easy to reapply over the top, assuming that PR passes CI (Local builds are having cython issues for me)

It will not gonna make that difference, except for missing including the helper header into the dependencies. however, I don't mind to re-work this pr after merging #17109. After all, I just wanna speed up the process of merging #17049.

@seiko2plus
Copy link
Member Author

closed in favor of #17109

@seiko2plus seiko2plus closed this Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants