Forum Discussion
Altera_Forum
Honored Contributor
11 years agoThe compiler will probably finish eventually but I always end up killing it because if it takes that long to generate the logic then I Quartus will take a while to synthesize the logic.
I don't really have an answer for# 2 because it's very kernel specific and each way you tackle the problem is different. If you can share kernel through a service request or FAE I'm sure Altera can take a look and make suggestions. One thing to look into is whether your kernel is sequential in nature. For example the vector_add kernel posted on the design examples page on www.altera.com (http://www.altera.com) could easily be written as a task kernel like this:__attribute ((task))
__kernel void vectorAdd(__global const float * restrict x,
__global const float * restrict y,
__global float * restrict z,
int N)
{
// iterate over elements of the arrays instead of indexing using work-item ID
for(int index = 0; index < N; index++)
{
// add the vector elements
z = x + y;
}
}
Since a task kernel only operates over a single work-item often the hardware footprint is much smaller. Without seeing your kernel I'm not sure if this would help or not though.