Forum Discussion
Altera_Forum
Honored Contributor
8 years agopragma unroll breaks kernel
Hi, I'm trying to figure out why my kernel breaks when I try to use the #pragma unroll statement for a loop. I'm using the 16.1 SDK and the device I'm running on is an Arria 10/DE5a-net and co...
Altera_Forum
Honored Contributor
8 years agoUpdate: I made the steps variable an argument of the kernel so that I can choose not to run the main loop, i.e.
for(long k=0;k<steps;k++){ The output should just be a copy of the input if I set steps=0. However, some array elements are swapped in the output. Somehow the memory load/stores are not working as expected. The strange thing is that the issue only appears if I compile the kernel with the unrolled inner loop (which should never get executed anyway). This seems like a bug to me, but maybe I'm missing something important here.