NVIDIA / NVIDIA/cccl

Thrust with tbb backend uses sequential versions for several algorithms

Open
#635 2 comments 0 reactions 1 assignee Claimed by @jrhemstad View on GitHub
needs triage
Dominant language
C++
Stars
2.5k
Forks
487
Avg merge
2d 7h
Merged PRs (30d)
296

Description

This extends what is reported in https://github.com/NVIDIA/cccl/issues/804

When compiled with tbb as the host backend, (at least) the following thrust algorithms use the _**sequential implementation**_ when `thruat::host`, or `thrust::tbb::par` execution policy is specified (in contradiction to the documentation), but use the correct tbb-based parallel implementation in overloads without the execution policy argument:

- thrust::copy_if
- thrust::remove_if
- thrust::transform_exclusive_scan
- thrurst::exclusive_scan (according to the previous report mentioned above)

I've been driven to create wrappers for all thrust algorithms I use in my library to redirect to the right version based on whether an algorithm belongs to this list of "buggy ones" or not. It is also fairly nontrivial to figure out which algorithms are buggy and until this is discovered for each buggy algorithm, considerable performance losses are accrued because of the incorrect behavior.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.