Skip to content

Commit

Permalink
fix device issue of match_edge on isolated item
Browse files Browse the repository at this point in the history
  • Loading branch information
yhmtsai committed Aug 18, 2021
1 parent 9f3ef86 commit db86ecc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/cuda_hip/multigrid/amgx_pgm_kernels.hpp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ __global__ __launch_bounds__(default_block_size) void match_edge_kernel(
}
auto neighbor = strongest_neighbor_vals[tidx];
if (neighbor != -1 && strongest_neighbor_vals[neighbor] == tidx &&
tidx < neighbor) {
tidx <= neighbor) {
// Use the smaller index as agg point
agg_vals[tidx] = tidx;
agg_vals[neighbor] = tidx;
Expand Down
1 change: 0 additions & 1 deletion hip/preconditioner/jacobi_kernels.hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ constexpr int default_num_warps = 32;
// current GPUs have at most 84 SMs)
constexpr int default_grid_size = 32 * 32 * 128;

constexpr int default_block_size = 512;

#include "common/cuda_hip/preconditioner/jacobi_kernels.hpp.inc"

Expand Down
2 changes: 1 addition & 1 deletion omp/multigrid/amgx_pgm_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void match_edge(std::shared_ptr<const OmpExecutor> exec,
if (agg_vals[i] == -1) {
auto neighbor = strongest_neighbor_vals[i];
if (neighbor != -1 && strongest_neighbor_vals[neighbor] == i &&
i < neighbor) {
i <= neighbor) {
// Use the smaller index as agg point
agg_vals[i] = i;
agg_vals[neighbor] = i;
Expand Down

0 comments on commit db86ecc

Please sign in to comment.