tags:

views:

66

answers:

1
kernel1 <<< blocks1, threads1, 0, stream1 >>> ( args ... );
...
kernel2 <<< blocks2, threads2, 0, stream2 >>> ( args ... );
...

I have two kernels to run concurrently,
and the device is GTX460, so it's Fermi architecture.
The cuda toolkit and sdk are 3.2 rc.

Like codes above, two kernels are coded to be run concurrently,
but there are no responses from any kernel.

Is there any constraints on what kernels are doing? Two kernels share some data
and they have some part in common.
If I comment out most of one kernel function, then program halts.

Please give me any help.

A: 

the fact that are running on different streams does not imply they will run concurrently. If the amount of resources needed by the first kernel is such that allows to run the second kernel then it will be the case, otherwise they will run serially. Make sure to have a cudaSyncThreads() after the two kernel invocations, or sync on both threads. Remember that all the cuda invocations are async.

fabrizioM