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

Cupy implementation of eq_hist #1129

Merged
merged 1 commit into from
Oct 7, 2022
Merged

Cupy implementation of eq_hist #1129

merged 1 commit into from
Oct 7, 2022

Conversation

ianthomas23
Copy link
Member

Fixes #1128.

Solution is to replace all numpy calls in eq_hist() with equivalent cupy calls so that the data remains on the GPU.

There are already tests that cover this but they do not occur in github CI so I have tested them locally. One cupy test produces slightly different results (red component changed by 1) than numpy due to different numerics in cupy.

After this, the following passes locally:

$ DATASHADER_TEST_GPU=1 pytest datashader/tests/test_transfer_functions.py

@codecov
Copy link

codecov bot commented Oct 5, 2022

Codecov Report

Merging #1129 (2df3e34) into master (a1de2d5) will decrease coverage by 0.00%.
The diff coverage is 90.00%.

@@            Coverage Diff             @@
##           master    #1129      +/-   ##
==========================================
- Coverage   85.00%   84.99%   -0.01%     
==========================================
  Files          33       33              
  Lines        7515     7517       +2     
==========================================
+ Hits         6388     6389       +1     
- Misses       1127     1128       +1     
Impacted Files Coverage Δ
datashader/transfer_functions/__init__.py 86.76% <90.00%> (-0.14%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ianthomas23
Copy link
Member Author

Codecov failures will be common for changes like this as the CI does not touch GPU-specific code.

@ianthomas23 ianthomas23 merged commit 3817f88 into holoviz:master Oct 7, 2022
@ianthomas23 ianthomas23 deleted the cupy_eq_hist branch October 19, 2022 10:46
@ianthomas23 ianthomas23 added this to the v0.14.3 milestone Nov 3, 2022
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.

Cupy test failures using eq_hist
1 participant