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

rcb: gpu acceleration #167

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

rcb: gpu acceleration #167

wants to merge 6 commits into from

Conversation

hhirtz
Copy link
Member

@hhirtz hhirtz commented Jun 9, 2022

Trying things out with wgpu and wgsl to compute the split position at each iteration

Right now there is a new main.rs file that compute the sum of [1..128], the matching shader file in src/algorithms/recursive_bisection.wgsl and a useless src/gpu.rs that would hold utilities as they are needed.

refs

@codecov
Copy link

codecov bot commented Jun 9, 2022

Codecov Report

Merging #167 (92f1f5f) into master (0c996e0) will decrease coverage by 0.88%.
The diff coverage is 0.72%.

@@            Coverage Diff             @@
##           master     #167      +/-   ##
==========================================
- Coverage   50.25%   49.37%   -0.89%     
==========================================
  Files          42       44       +2     
  Lines        7223     7360     +137     
==========================================
+ Hits         3630     3634       +4     
- Misses       3593     3726     +133     
Impacted Files Coverage Δ
src/gpu.rs 0.00% <0.00%> (ø)
src/lib.rs 100.00% <ø> (ø)
src/main.rs 0.91% <0.91%> (ø)
src/algorithms/vn/first.rs 72.50% <0.00%> (+1.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c996e0...92f1f5f. Read the comment docs.

works only for arrays of size BLOCK_SIZE^n, n > 0
it seems that all the invocation of a shader that lie in the same
wave-front on opencl advance at the same time so we can use
multiplication instead of if/else.

not sure if webgpu uphold this property though
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.

1 participant