This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OpenCL for K2H evm Memory Configurations

Hi,

I'm reading the documentation for OpenCL on K2H. I have 2 questions regarding the memory part:

1. Is 8GB mandatory to run OpenCL programs? My evm boards come with 2GB RAM and it did fail to run some demo applications of OpenCL saying cannot allocate memory space..

2. In the link above, it says "The remaining 6GB of DDR3 can be split between Linux and CMEM using boot time variables. " What boot variables are used here to split the memory partitions? I know there is a mem_reserve for reserved memory but don't know about others.

Thanks,

Shang

  • Moved this thread over High Performance Computing form for faster and appropriate response.
  • 1. No, 8GB is not mandatory to run OpenCL programs. For the examples that you see memory allocation failure, please go edit the program (usually main.cpp) and reduce the problem size. They should be self explanatory. After you reduce the problem size, recompile, and run the examples again. Which examples/apps are you seeing the memory allocation failure on EVM with 2GB memory?

    2. The "mem2_reserve" uboot environment variable applies to HP m800 K2H system only. "mem_reserve=1536M" is used to reserve 1.5GB for CMEM from the first 2GB of DDR, then "mem2_reserve=5120M" to reserve 5GB for CMEM from the next 6GB of DDR. In the end, you will end up with a static memory partition like the following: (512MB Linux) (1.5GB CMEM) (1GB Linux) (5GB CMEM). Note that "mem2_reserve" variable is not supported in uboot on the EVM yet.  EVM only has "mem_reserve".

    What is your cmem configuration on your EVM now? Can you show me the result of "cat /proc/iomem"?

  • Hi Yuan,

    Thanks for your reply!

    Actually I'm running a program that calls LINALG library functions, which I assume are implemented with OpenCL.

    I changed mem_reserve to 512M to facilitate my own program and that caused the issue. After changing mem_reserve back to 1536M that issue is gone.

    Again thank you for your help!
    Shang