I have a function as follows, but it hangs when running on zcu102.
#pragma SDS data copy(D1[0:width*height])
#pragma SDS data copy(disparity_grid[0:(DISPARITY_MAX+1)*GRID_WIDTH*GRID_HEIGHT]);
#pragma SDS data copy(I1_desc[0:16*width*height], I2_desc[0:16*width*height])
#pragma SDS data copy(tri[0:num_tri])
#pragma SDS data access_pattern(D1:SEQUENTIAL);
#pragma SDS data access_pattern(disparity_grid:SEQUENTIAL);
#pragma SDS data access_pattern(I1_desc:SEQUENTIAL, I2_desc:SEQUENTIAL);
#pragma SDS data access_pattern(tri:SEQUENTIAL);
#pragma SDS data mem_attribute(D1:PHYSICAL_CONTIGUOUS)
#pragma SDS data mem_attribute(disparity_grid:PHYSICAL_CONTIGUOUS)
#pragma SDS data mem_attribute(I1_desc:PHYSICAL_CONTIGUOUS,I2_desc:PHYSICAL_CONTIGUOUS)
#pragma SDS data mem_attribute(tri:PHYSICAL_CONTIGUOUS)
void foo (__cd_output *D1, int32_t* len,
triangle* tri, uint32_t num_tri,
int32_t* disparity_grid, st_grid_dims gd,
__sm128i* I1_desc, __sm128i* I2_desc, int32_t width, int32_t height,
parameters param, bool right_image);
The calculation of the data size for every transfering for buffer "disparity_grid", "I1_desc" and "I2_desc" is so complicated that I can't provide the sizes in the pragma exactly, instead, I designate the length as the maximum size of that buffer. Is that the reason that caused my function hang? And I must use "copy" instead of "zero_copy" for effiency. How can I resove my problem?
Sorry for my poor English.
Thanks!!