Skip to content

Commit

Permalink
use custom stream for thrust policy
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelKoch committed Aug 16, 2023
1 parent 5285e41 commit 09bfa7f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/cuda_hip/distributed/partition_helpers_kernels.hpp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ void sort_by_range_start(
range_start_ends.get_data() + 1, strided_indices);
auto zip_it = thrust::make_zip_iterator(
thrust::make_tuple(end_it, part_ids.get_data()));
thrust::stable_sort_by_key(thrust::device, start_it, start_it + num_ranges,
zip_it);
thrust::stable_sort_by_key(thrust_policy(exec), start_it,
start_it + num_ranges, zip_it);
}

GKO_INSTANTIATE_FOR_EACH_INDEX_TYPE(
Expand Down
3 changes: 3 additions & 0 deletions cuda/distributed/partition_helpers_kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <thrust/sort.h>


#include "cuda/base/thrust.cuh"


namespace gko {
namespace kernels {
namespace cuda {
Expand Down
3 changes: 3 additions & 0 deletions hip/distributed/partition_helpers_kernels.hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <thrust/sort.h>


#include "hip/base/thrust.hip.hpp"


namespace gko {
namespace kernels {
namespace hip {
Expand Down

0 comments on commit 09bfa7f

Please sign in to comment.