Skip to content
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

Cupy13 workaround #107

Merged
merged 3 commits into from
Feb 14, 2024
Merged

Cupy13 workaround #107

merged 3 commits into from
Feb 14, 2024

Conversation

McHaillet
Copy link
Collaborator

Temporary workaround for ReductionKernel bug in cupy 13. Code checks if cupy version 13 is installed and switch to simple

def square_sum_kernel(x):
        return (x ** 2).sum()

, instead of custom kernel.

See issue #106 for more info. The custom kernel is still preferred as it provides a ~2 x speed up.

@McHaillet McHaillet requested a review from sroet February 14, 2024 13:08
Copy link
Collaborator

@sroet sroet left a comment

Choose a reason for hiding this comment

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

version doesn't need to increase, but this looks good otherwise.

Did you test it?

pyproject.toml Outdated Show resolved Hide resolved
Co-authored-by: Sander Roet <sanderroet@hotmail.com>
@McHaillet
Copy link
Collaborator Author

Yes, tested it with cupy 12.3 and cupy 13, both work 👍

Copy link
Collaborator

@sroet sroet left a comment

Choose a reason for hiding this comment

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

LGTM, feel free to merge

@McHaillet McHaillet merged commit 1580386 into SBC-Utrecht:main Feb 14, 2024
@McHaillet McHaillet deleted the cupy13-bug-fix branch February 14, 2024 14:41
sroet added a commit to sroet/pytom-template-matching-gpu that referenced this pull request May 7, 2024
@sroet sroet mentioned this pull request May 7, 2024
McHaillet pushed a commit that referenced this pull request May 7, 2024
* update cupy dependency version to exclude 13.0

* revert cupy workaround added in #107

* apperantly quotes around version numbers are not expected...
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.

None yet

2 participants