HERA-Team / matvis

Fast matrix-based visibility simulator
MIT License
2 stars 3 forks source link

fix: better block/grid size determination #54

Closed steven-murray closed 1 year ago

steven-murray commented 1 year ago

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[bot] commented 1 year ago

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 ```diff @@ 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%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://app.codecov.io/gh/HERA-Team/vis_cpu/pull/54?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team) | Coverage Δ | | |---|---|---| | [src/vis\_cpu/\_utils.py](https://app.codecov.io/gh/HERA-Team/vis_cpu/pull/54?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-c3JjL3Zpc19jcHUvX3V0aWxzLnB5) | `100.00% <100.00%> (ø)` | | | [src/vis\_cpu/gpu.py](https://app.codecov.io/gh/HERA-Team/vis_cpu/pull/54?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-c3JjL3Zpc19jcHUvZ3B1LnB5) | `100.00% <100.00%> (ø)` | |

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