Problem with using Pipe Logic in CUDA


I’m using pipe logic in my CUDA C++ program to input stream data and operate upon it in kernel functions.

It works well with the kernel functions I use while reading inside the pipe logic.

But after the execution of the pipe logic, it doesn’t seem to go inside any kernel function.

Any known issues?

A high level design of what I’m trying to do :

PipeLogic do{

abc<<<>>>();  // works

}while(data stream doesn't end)

xyz<<<>>>(); //doesn't work

P.S. : I have tried every Combination/s of cudaThreadSynchronize() in my code.

I’m probably stupid since what you are referring to might be very obvious (and silly me not to know it), but I’m also curious, so I’d like to get more infos about this…
What is “PipeLogic”? Are you really coding something that somehow looks like your pseudo-code?
Just a side remark: since kernel calls are non-blocking, if you have such a do loop with no explicit synchronisation inside, you’ll pile up tons of calls that might take a (loooong) while before to get processed by the cuda run time. Thereafter, your subsequent kernel calls (outside of the loop) might just be queued up, patiently waiting for their turn to access the GPU to come. But it’s just a blind thought that is probably super irrelevant.

Thanks for the reply.
I apologize for my careless use of ‘PipeLogic’.

What I mean is that I’m using Pipes for communication between processes to generate stream data.
So I’ve say two Visual Basic projects - Project 1 and Project 2.
Project 1 creates a Pipe. When an appropriate call in Project 2 is made, it starts receiving data via the “pipe” created, from Project 1.
And when the do-while loop in my above pseudo-code ends, I close the pipe and continue the processing normally.
Hope my explanation is not too confusing. :|

Pondered over your thought that it might me loads of kernel functions piling up, but i don’t think that’s what is happening. Because in my output, I’m able to print the outputs of all the kernel functions being called repeatedly within the loop. (and i’ve used cudaThreadSynchronize() at the end of the loop too.)

But after the loop ends,no kernel function seems to get executed. :/

Ok, thx for the explanation. I certainly know what a pipe is (they are widely use in the Unix/Linux world), but I’ve never used it in a windows context. So TBH, I have no idea of what’s going wrong with your code. Have you try not to close the pipe? Have you check your code for errors?

Yeah, tried to close the pipe (and at various places in my code too, like at the end of main, just after the do-while etc. ), but to no avail.
And the same code without the use of pipes is working fine. But the behavior is inexplicable( atleast to a CUDA noob like me).

Anyways, thanks for your help.