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

League size off-by-one in some places #478

Open
brian-kelley opened this issue Oct 3, 2019 · 0 comments
Open

League size off-by-one in some places #478

brian-kelley opened this issue Oct 3, 2019 · 0 comments
Labels
Cleanup Code maintenance that isn't a bugfix or new feature

Comments

@brian-kelley
Copy link
Contributor

In many places, KokkosKernels calculates the league size as num_rows / rows_per_team + 1. In most cases this is exactly correct, but if rows_per_team divides num_rows evenly then the number of teams is 1 greater than needed. I'm sure the runtime overhead for one extra team that returns immediately is very small, but I propose that we fix this by changing these to (num_rows + rows_per_team - 1) / rows_per_team). That is equivalent to ceil((double) num_rows / rows_per_team).

brian-kelley added a commit to brian-kelley/kokkos-kernels that referenced this issue Mar 6, 2020
(an example of kokkos#478, which is incorrect integer
division with rounding up)
brian-kelley added a commit to brian-kelley/kokkos-kernels that referenced this issue Mar 9, 2020
(an example of kokkos#478, which is incorrect integer
division with rounding up)
@brian-kelley brian-kelley added the Cleanup Code maintenance that isn't a bugfix or new feature label Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup Code maintenance that isn't a bugfix or new feature
Projects
None yet
Development

No branches or pull requests

1 participant