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

[BUG]: extra unnecessary cudaStreamSynchronize #261

Open
1 task done
gonzalobg opened this issue Jul 24, 2023 · 0 comments
Open
1 task done

[BUG]: extra unnecessary cudaStreamSynchronize #261

gonzalobg opened this issue Jul 24, 2023 · 0 comments

Comments

@gonzalobg
Copy link
Collaborator

Is this a duplicate?

Type of Bug

Performance

Component

Thrust

Describe the bug

thrust::transform_reduce(thrust::device, ... flow is the following:

  1. DeviceReduce kernel
  2. DeviceReduceSingleTile kernel
  3. cudaStreamSynchronize
  4. get_value: cudaMemcpyAsync + cudaStreamSynchronize

The cudaStreamSynchronize in step 3 is unnecessary when get_value is going to perform a stream-ordered operation and synchronize.

This was discovered in TeaLeaf and impacts std::transform_reduce performance.

How to Reproduce

Use the transform reduce algorithm on trivial types on device memory or unified memory.

Expected behavior

No unnecessary cudaStreamSynchronize.

Reproduction link

No response

Operating System

No response

nvidia-smi output

No response

NVCC version

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant