How to free CPU after assigning task to GPU.

I want to know how can I free CPU after assigning tasks to GPU like when a network packet comes on the CPU, it will copy network packet on the GPU. After copying is done CPU will be free state and GPU will start process packet, and after processing packet, it will give it back result to the CPU.

How can I do this…??

When GPU did work at that time the CPU will be not in polling mode, it should be on free or release mode. When GPU is done its process it will give output to CPU at that time the CPU will be working.

But if you use CUDA , the kernel call is Asynchronous! This means that the CPU is free a can do something. But if you call the cudaMemcpy, this is Synchronuos this means that the CPU is in polling mode

Also, there is a difference between network packets handled under a hardware driver, versus user space. So the question has to be answered as to whether the packet on CPU work was called in a kernel hardware driver or via some other method, e.g., an application which opened a socket separate from the kernel.

@chintan - It sounds like you are interested in moving memory around, not explicit CPU and GPU compute tasks. On most desktop systems, the CPU and GPU have separate memory. On the Jetson, the CPU and GPU share the same memory (what is called a unified memory architecture). What this means is that you can use what is called ‘zero copy’ to allow the GPU access to in memory structures so that you do not have copy memory back and forth from CPU to GPU. You can read more about this at: