Forum Discussion

JJaco16's avatar
JJaco16
Icon for New Contributor rankNew Contributor
5 years ago
Solved

opencl for intel fpga Local memories merging on compilation

Hi,

I'm trying to implement a piece of code on an arria10 soc development board using openCL. The kernel code has declarations of two local memories as follows

local float __attribute__((memory, numbanks(8),bankwidth(4))) lmemA[1024][8];

local float __attribute__((memory, numbanks(2),bankwidth(4))) lmemB[1024][2];

The whole idea is to get a cumulative memory of size [1024][10]. since the compiler allows <numbanks> property to be in the powers of 2, (I don't want to use a numbank value of 16, when i only need 10 banks for 10 parallel accesses on the lowest dimension), I am declaring two different local memory instantiations such that overall my size requirement is satisfied as well as the compiler's need for power of 2 numbanks value.

Correspondingly the rest of the code was modified so as to accommodate two local memories instead of just the one of size [1024][10].

However, on compilation the compiler throws an error

"Compiler Error : Attempted to merge local memories but found conflicting memory attributes"

I don't want the compiler to merge the local memories, and there seems to be not much documentation regarding this problem.

Is there any other work around for this compilation to succeed?

5 Replies