cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Participant
Participant
220 Views
Registered: ‎09-09-2019

Do I need do "Release" in C++

Jump to solution

Hi In some example C code at end of the program, some release routine is always necessary:

    clReleaseMemObject(d_axi00_ptr0);
    free(h_axi00_ptr0_output);
    free(h_data);
    clReleaseProgram(program);
    clReleaseKernel(kernel);
    clReleaseCommandQueue(commands);
    clReleaseContext(context);

In C++ code, there looks no any release stuff, likely object is simply destroyed after the program is finished

However, if I keep invoking the kernel many times each time feeding the different data, will that cause issue?

 

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
136 Views
Registered: ‎10-19-2015

Re: Do I need do "Release" in C++

Jump to solution

Hi @lmaxeniro 

Strictly speaking, you do not need to release the binary on the FPGA. It will live there until a new xclbin is loaded. 

Is this behavior preventing you from doing something?

Regards,

M

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

0 Kudos
3 Replies
Highlighted
Participant
Participant
207 Views
Registered: ‎09-09-2019

Re: Do I need do "Release" in C++

Jump to solution

Furthermore, I find before I launch up the program (i.e. after an xbutil reset), if I check by xbutil query, I get below result (no CU): 

Xclbin UUID
00000000-0000-0000-0000-000000000000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compute Unit Status
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
INFO: xbutil query succeeded.

 

after I run my application, after the test finished successfully, check by xbutil query, I find the below result--that means the kernel binary is still "reside" inside FPGA correct?

Do I need clear it by someway? if answer is yes, how?

Xclbin UUID
f9035cab-b0e6-4452-a89c-9ebaf29b3678
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compute Unit Status
CU[ 0]: rtl_kernel_wizard_0:rtl_kernel_wizard_0_1@0x1800000         (IDLE)
CU[ 1]: rtl_kernel_wizard_0:rtl_kernel_wizard_0_2@0x1810000         (IDLE)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
137 Views
Registered: ‎10-19-2015

Re: Do I need do "Release" in C++

Jump to solution

Hi @lmaxeniro 

Strictly speaking, you do not need to release the binary on the FPGA. It will live there until a new xclbin is loaded. 

Is this behavior preventing you from doing something?

Regards,

M

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

0 Kudos
Highlighted
Participant
Participant
90 Views
Registered: ‎09-09-2019

Re: Do I need do "Release" in C++

Jump to solution
I find that if I start from scratch my test program looks running more "stable"...
0 Kudos