Skip to content

Remove cudaMemcpys to the default streams in the CUDA backend #2362

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

Merged
merged 1 commit into from
Nov 30, 2018

Conversation

umar456
Copy link
Member

@umar456 umar456 commented Nov 29, 2018

There were some calls being made to the default CUDA stream. This is
problematic because the default cuda stream is blocks and blocks
all other streams when executing. We should only perform calls on
the current stream.

There were some calls being made to the default CUDA stream. This is
problematic because the default cuda stream is blocks and blocks
all other streams when executing. We should only perform calls on
the current stream.
Copy link
Contributor

@syurkevi syurkevi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cuda::getActiveStream() is inline in some of the functions and auto stream = cuda::getActiveStream() in others, not sure the consistency is important. Other than that much better variable names (and documentation)!

@umar456 umar456 merged commit 2cb2b7f into arrayfire:master Nov 30, 2018
@WilliamTambellini
Copy link
Contributor

Cool. Could we expect any significant speedup ?

@umar456
Copy link
Member Author

umar456 commented Nov 30, 2018

I don't think there would be a speedup in your application here. We are still synchronizing after the call to cudaMemcpy because its interacting with user code. If you were using other kernels in your application you could see a small speedup then

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

Successfully merging this pull request may close these issues.

3 participants