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

fix: better block/grid size determination #54

Merged
merged 14 commits into from
May 9, 2023
Merged

Conversation

steven-murray
Copy link
Contributor

This fixes the setting of block and grid sizes. The total block size has to be less or equal to the nthreads (usually 1024). This was failing when there were too many ants. I've now refactored it out to a function which does it properly (for the case where the first axis is fastest).

It may be useful to check out whether there's any preference in CUDA itself for which axis should be fastest.

@codecov
Copy link

codecov bot commented Nov 23, 2022

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (75bf09b) 100.00% compared to head (e4c5105) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #54   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          552       567   +15     
  Branches        86        88    +2     
=========================================
+ Hits           552       567   +15     
Flag Coverage Δ
unittests 99.29% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/vis_cpu/_utils.py 100.00% <100.00%> (ø)
src/vis_cpu/gpu.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@piyanatk piyanatk left a comment

Choose a reason for hiding this comment

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

Thanks @steven-murray . Look fine to me. A more proficient eye (than mine) on the GPU code will probably not hurt.

@steven-murray steven-murray merged commit 403d1c7 into main May 9, 2023
@steven-murray steven-murray deleted the fix-block-size branch May 9, 2023 17:25
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