# Async Cublas

**URL:** <https://forums.developer.nvidia.com/t/async-cublas/2837>\
**Category:** CUDA Programming and Performance\
**Created:** [March 1, 2008, 7:15am UTC](https://forums.developer.nvidia.com/t/async-cublas/2837 "2008-03-01T07:15:23Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![reza1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@reza1](https://forums.developer.nvidia.com/u/reza1)\
**Post date:** [March 1, 2008, 7:15am UTC](https://forums.developer.nvidia.com/t/async-cublas/2837/1 "2008-03-01T07:15:23Z")

</div>

Is it possbile to use cublasSgemm API in asycynchronus mode?

---

<div class="post-metadata">

**Author:** ![Manolo](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Manolo](https://forums.developer.nvidia.com/u/Manolo)\
**Post date:** [March 1, 2008, 10:46am UTC](https://forums.developer.nvidia.com/t/async-cublas/2837/2 "2008-03-01T10:46:04Z")

</div>

> [@](#):
>
> Is it possbile to use cublasSgemm API in asycynchronus mode?
> 
> [snapback]336025[/snapback]

Hello,

all cublas routines are executing asynchronously. That mean CUDA give back the control after the execution begins. You have to use

cudaThreadSynchronize();

for active waiting.

---

<div class="post-metadata">

**Author:** ![reza1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@reza1](https://forums.developer.nvidia.com/u/reza1)\
**Post date:** [March 1, 2008, 12:36pm UTC](https://forums.developer.nvidia.com/t/async-cublas/2837/3 "2008-03-01T12:36:10Z")

</div>

> [@](#):
>
> Hello,
> 
> all cublas routines are executing asynchronously. That mean CUDA give back the control after the execution begins. You have to use
> 
> cudaThreadSynchronize();
> 
> for active waiting.
> 
> [snapback]336095[/snapback]

But the cublas APIs do not have any stream as an input parameter.

---

<div class="post-metadata">

**Author:** ![Manolo](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Manolo](https://forums.developer.nvidia.com/u/Manolo)\
**Post date:** [March 1, 2008, 3:18pm UTC](https://forums.developer.nvidia.com/t/async-cublas/2837/4 "2008-03-01T15:18:46Z")

</div>

> [@](#):
>
> But the cublas APIs&nbsp; do not have any stream as an input parameter.
> 
> [snapback]336122[/snapback]

Maybe there is no data streaming, but instruction streaming? I don’t understand this feature of CUBLAS… It may be useful in some cases but in my case it where be better if CUBLAS has blocking execution…

Maybe someone from NVIDIA could explain it? Or we wait till the CUBLAS becomes open source. [External Media](http://hqnveipbwb20/public/style_emoticons/<#EMO_DIR#>/thumbup.gif "Media hosted on another site. Click to open in a new tab.")

---

<div class="post-metadata">

**Author:** ![mfatica](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@mfatica](https://forums.developer.nvidia.com/u/mfatica)\
**Post date:** [March 1, 2008, 4:38pm UTC](https://forums.developer.nvidia.com/t/async-cublas/2837/5 "2008-03-01T16:38:29Z")

</div>

Right now, CUBLAS could not be called with the asynchronous API. We are considering adding it.

The source code for CUBLAS is already available:  
[url=“[The Official NVIDIA Forums | NVIDIA](http://forums.nvidia.com/index.php?showtopic=59101)”][The Official NVIDIA Forums | NVIDIA](http://forums.nvidia.com/index.php?showtopic=59101%5B/url%5D)

---

<div class="post-metadata">

**Author:** ![vvotan](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@vvotan](https://forums.developer.nvidia.com/u/vvotan)\
**Post date:** [November 30, 2008, 2:51pm UTC](https://forums.developer.nvidia.com/t/async-cublas/2837/6 "2008-11-30T14:51:33Z")

</div>

Is there any progress in async cublas? Is it at least scheduled for inclusion in some next version?

---

<div class="post-metadata">

**Author:** ![ribbldibbl](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ribbldibbl](https://forums.developer.nvidia.com/u/ribbldibbl)\
**Post date:** [January 16, 2009, 12:40pm UTC](https://forums.developer.nvidia.com/t/async-cublas/2837/7 "2009-01-16T12:40:21Z")

</div>

Dito. Any news on CUBLAS streaming?

---

<div class="post-metadata">

**Author:** ![mfatica](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@mfatica](https://forums.developer.nvidia.com/u/mfatica)\
**Post date:** [January 16, 2009, 3:59pm UTC](https://forums.developer.nvidia.com/t/async-cublas/2837/8 "2009-01-16T15:59:08Z")

</div>

No,  
but the source code for CUBLAS 2.0 will be release ( this time you will be able to build it) and you could add streams to the functions you need.

---

<div class="post-metadata">

**Author:** ![hill\_matthew](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@hill\_matthew](https://forums.developer.nvidia.com/u/hill_matthew)\
**Post date:** [January 17, 2009, 1:27pm UTC](https://forums.developer.nvidia.com/t/async-cublas/2837/9 "2009-01-17T13:27:11Z")

</div>

Sorry to post hijack but since there were some good replies from nvidia, I have the same question with cufft, I don’t believe the stream can be specified and it seems the source that is available isn’t sufficient to build a version that I could easily change. Any plans to release this when the full cublas source is too?

---

<div class="post-metadata">

**Author:** ![jack](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jack/32/12069_2.png) [@jack](https://forums.developer.nvidia.com/u/jack)\
**Post date:** [January 19, 2009, 1:05am UTC](https://forums.developer.nvidia.com/t/async-cublas/2837/10 "2009-01-19T01:05:52Z")

</div>

> [@](#):
>
> No,
> 
> but the source code for CUBLAS 2.0 will be release ( this time you will be able to build it) and you could add streams to the functions you need.

Any idea as to when this will be made available?

---

<div class="post-metadata">

**Author:** ![mfatica](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@mfatica](https://forums.developer.nvidia.com/u/mfatica)\
**Post date:** [January 19, 2009, 1:09am UTC](https://forums.developer.nvidia.com/t/async-cublas/2837/11 "2009-01-19T01:09:35Z")

</div>

It should be soon, the package is ready to go, just the usual “green” tape…

---

<div class="post-metadata">

**Author:** ![cern\_freak](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/cern_freak/32/9781_2.png) [@cern\_freak](https://forums.developer.nvidia.com/u/cern_freak)\
**Post date:** [March 8, 2009, 12:12pm UTC](https://forums.developer.nvidia.com/t/async-cublas/2837/12 "2009-03-08T12:12:49Z")

</div>

> [@](#):
>
> It should be soon, the package is ready to go, just the usual “green” tape…

Well… any news about date of release? :unsure:

---

<div class="post-metadata">

**Author:** ![BlahCuda](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@BlahCuda](https://forums.developer.nvidia.com/u/BlahCuda)\
**Post date:** [February 26, 2010, 12:45am UTC](https://forums.developer.nvidia.com/t/async-cublas/2837/13 "2010-02-26T00:45:52Z")

</div>

> [@](#):
>
> Well… any news about date of release? :unsure:

Bumping this thread.

Any progress here? I want to concurrently run CudaMemcpyAsync and CublasDgemm. I’ve added a stream as an input parameter to cudaMemcpyAsync but don’t know how to do so in the cublasDgemm call. Any other alternatives besides using streams?

---

<div class="post-metadata">

**Author:** ![avidday](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/avidday/32/59219_2.png) [@avidday](https://forums.developer.nvidia.com/u/avidday)\
**Post date:** [February 26, 2010, 7:29am UTC](https://forums.developer.nvidia.com/t/async-cublas/2837/14 "2010-02-26T07:29:21Z")

</div>

Streams still hasn’t been exposed in CUBLAS, and neither has a driver API interface been made available (although I understood both were on the “to-do” list). If you want to use streams with GEMM, you best bet is to grab Volkov’s kernels and use that instead. If you want any other functions, you are out of luck at the moment.
