Altera_Forum
Honored Contributor
10 years agoQuestions about resource usage
Hi,
I have a pretty simple kernel that stores the image pixels to output as follows:
int index = get_global_id(0);
for (int i=index; i<WIDTH*HEIGHT;i++)
{
output = input;
}
The FPGA is SoCKit board. If I set global item N=1(ndrange is 111), so single work-item kernel is created. (I know it doesn't make sense, just to test) If I set global item to N=8, so 8 work-items are created for the kernel. If I set N=32, 128, 480, just N work-items are created. However, the resource usage report always shows the same resource usage. I checked the FPGA resource usage report after synthesis, also the same. I tested the kernel speed. kernel time is becoming smaller if N is bigger generally. It seems the aoc compiler doesn't really know N value while compiling. Only kernel file is the input and N is not mentioned there. I just confused how the hardware generated. If I understanding correctly, if N is bigger and bigger, more work-items are created and the FPGA would become fully used. So why the resource usage is always the same? Did I misunderstand something? I checked the documents on AOC webpage, nothing is really explained. Only mentioned more work-item hardware are generated to accelerate blablabla. Thanks Shaodong