Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8392869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:38:02+00:00 2026-06-09T19:38:02+00:00

I use (CUDA C++) Thrust for GPU GeForce GTX 460SE with asyncEngineCount = 1.

  • 0

I use (CUDA C++) Thrust for GPU GeForce GTX 460SE with asyncEngineCount = 1.
As I know I can overlap transfer data one of way to/from GPU and executing single kernel. But when I use:

cudaStream_t Stream1, Stream2;
cudaStreamCreate(&Stream1);
cudaStreamCreate(&Stream2);
cudaMemcpyAsync(thrust::raw_pointer_cast(d_vec_src.data()), host_ptr1, test_size, cudaMemcpyHostToDevice, Stream1);
cudaMemcpyAsync(host_ptr2, thrust::raw_pointer_cast(d_vec_dst.data()), test_size, cudaMemcpyDeviceToHost, Stream2);
thrust::sort(d_vec_dst.begin(), d_vec_dst.end());
cudaThreadSynchronize();

and Thrust algorithms, it executes sequentially as I see in nVidia Visual Profiler: transfer from GPU, transfer to GPU, executing kernel. Maybe this is because Thrust algorithms executing in zero 0-stream which can’t overlap with anything? And how solve this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:38:03+00:00Added an answer on June 9, 2026 at 7:38 pm

    Thrust doesn’t presently have a mechanism for controlling the execution stream of its algorithms, so you can’t do what you are asking with the current code base. There have been reports of users modifying the thrust code base to accept a stream (for example this google groups thread) but that may or may not be viable depending on the complexity of the algorithm you use and its structure. Some algorithms also have internal data transfers and you would need to be very careful to not break things when moving from serial to asynchronous execution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As far as I know I can use C++ templates in CUDA device code.
If I use DMA for RAM <-> GPU on CUDA C++, How can I
How can I use thrust to return the indices of active array elements i.e.
I want to use interoperability between OpenGL and CUDA. I know, as some tutorials
Is there a #define compiler (nvcc) macro of CUDA which I can use? (Like
I read that one can use kernel launches to synchronize different blocks i.e., If
Is there any minimum compute capability to use CUDA-OpenGL interoperability? I did not find
use strict; use warnings; use Data::Dumper; my %h; my $undef = undef; $h{''}='test2'; $h{$undef}
I'm trying to use CUDA with cmake (v 2.8) on my Mac (OSX 10.6).
I have difficulties to use complex numbers in cuda,pycuda. I have this in C:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.