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.

MCSDK-HPC blas ECPY_example

Hi, all

After I install the version of MCSDK-HPC_03_00_00_18, and run the project example(ECPY_example) located in .../ti/blas_03_11_00_00/blas/example/Setup_ECPY/app/build/ccs, It can run correctly, but I have a question about the ECPY_example.map file: why the section .far occupy so big memory size?

the example matrix size is 2×3 and 3×2.

my hardware is EVM6678L, and the 4188.blas-lib-3.11.0.pdf is about run instruction of ECPY_example provide by Ming Wei.

and if I want to accurate big matrix-matrix multiply(like matrix order is 1000 and element is float type), DDR3 there no more room for my original matrix, what should I do?

Thanks!

Mike

  • Mike,

    The large .far section is mainly occupied by fcConfig_pe66.oe66 as shown in the memory map file.


    The BIOS.heapSize (=0x1FFF0000) defined in the fcConfig.cfg (~/ti/blas_03_11_00_00/blas/example/Setup_ECPY/app/build) determines the memory size in .far for fcConfig_pe66.oe66.


    As the fcConfig.cfg comments, the large heap size doesn't indicate what the code the needs. So for a big matrix-matrix mutliplication, you should be able to 'just take the slice you need' - malloc the memory for it from the heap.

    ~/ti/blas_03_11_00_00/blas/example/Setup_ECPY/app/build
    fcConfig.cfg

    /* specify heap size for BIOS, this is where ATLAS malloc() */
    /* will come from. Ends up in '.far' section. The value is */
    /* just as large as I can make it and leave room for other */
    /* units to allocate their variables. It does not indicate */
    /* what ATLAS 'needs,' that depends on the sizes of matrices */
    /* being manipulated by the calling program. So if you need */
    /* reduce this to make room for something else, don't chop it,*/
    /* just take the slice you need. Tony C.*/

    BIOS.heapSize = 0x1FFF0000;

    Regards,
    Garrett

  • Garrett,

    Thanks for your reply, that's very helpful.

    But I have an doubt about the malloc function, here is my code:

    after run the function malloc(), the value of memory that pointer a, b, c point is 0.0, since correct.

    but when I code like following, something get wrong, 

    the value of memory that pointer a, b, c point is 2.369428e-38, like following:

    Can you tell me why?

    Regards,

    Mike

  • Mike,

    The value 2.369428e-38 you observed is not caused by malloc() funciton. Standard memset() function fills the block of memory using the unsigned char (not float as you expect) conversion of the 2nd argument - int value.

    If you view the memory as 'unsigned char' instead of '32 bit float', you will see it's filled by 0x01.

    Initilizing the memory with a for() loop will fix your problem.

    Regards,
    Garrett