Skip to content

Commit

Permalink
Remove unneeded function
Browse files Browse the repository at this point in the history
  • Loading branch information
kliegeois committed Sep 29, 2022
1 parent d4c2168 commit 5e013fe
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions perf_test/batched/sparse/KokkosBatched_Test_Sparse_Helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,43 +252,3 @@ void getInvDiagFromCRS(const VType &V, const IntType &r, const IntType &c,
myfile.close();
*/
}

template <class execution_space>
int launch_parameters(int numRows, int nnz, int rows_per_thread, int &team_size,
int vector_length) {
int rows_per_team;
int nnz_per_row = nnz / numRows;
if (nnz_per_row < 1) nnz_per_row = 1;

// Determine rows per thread
if (rows_per_thread < 1) {
#ifdef KOKKOS_ENABLE_CUDA
if (std::is_same<Kokkos::Cuda, execution_space>::value)
rows_per_thread = 1;
else
#endif
{
if (nnz_per_row < 20 && nnz > 5000000) {
rows_per_thread = 256;
} else
rows_per_thread = 64;
}
}

#ifdef KOKKOS_ENABLE_CUDA
if (team_size < 1) team_size = 256 / vector_length;
#endif

rows_per_team = rows_per_thread * team_size;

if (rows_per_team < 0) {
int nnz_per_team = 4096;
int conc = execution_space::concurrency();
while ((conc * nnz_per_team * 4 > nnz) && (nnz_per_team > 256))
nnz_per_team /= 2;
int tmp_nnz_per_row = nnz / numRows;
rows_per_team = (nnz_per_team + tmp_nnz_per_row - 1) / tmp_nnz_per_row;
}

return rows_per_team;
}

0 comments on commit 5e013fe

Please sign in to comment.