cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
662ldd
Observer
Observer
419 Views
Registered: ‎06-30-2019

Can multiple kernels share the same data?

I am developing a database accelerator using U200. I have a very large index (about 20G) that should be read by all of the kernels. I would like to put it in the DDRs of the card and my question is: 1. how to make all the kernels have access to this index? Should I just set the buffers of the index as their input respectively? If so, will the host write the index to the global memory only once or not? 2. The database query execution has multiple iterations. In each iteration the index remains unchanged but other input changes. How can I tell the host not to write the index to global memory again and again? BTW, I am using RTL kernels.
0 Kudos
3 Replies
yunl
Xilinx Employee
Xilinx Employee
390 Views
Registered: ‎06-17-2008

Multiple kernels can access to same buffer however single buffer size can not exceed 4GB.

In your case, the large dataset has to be split into several buffers.

0 Kudos
662ldd
Observer
Observer
379 Views
Registered: ‎06-30-2019

Thanks for your reply! I can split the index into multiple buffers easily but I still wonder:

Is there any example of multiple kernels sharing same buffers? 

Besides, in my case, I want the shared buffers stay in the global memory while other input buffers change in each iteration of my algorithm. Can this be done?

0 Kudos
yunl
Xilinx Employee
Xilinx Employee
347 Views
Registered: ‎06-17-2008

Here is an example of multiple kernels sharing one buffer: https://github.com/Xilinx/SDAccel_Examples/tree/master/getting_started/rtl_kernel/rtl_vadd_2kernels

Regarding your second question, the answer is yes. Say that you have buffer A and B on device ddr. At the begining, host writes data to both A and B. Then A may keep unchanged and host can re-write B as your wish. 

0 Kudos