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.

AM5728: How can increase CPU performance using DSP and enable Required flags

Part Number: AM5728

Hello,

        I have using OpenCV application on AM5728 EVM board and we observe that CPU usage is more for that and it is very slow to process.So, i have some query regarding this as listed below:

1). How can enable NEON flag? Will it useful?

2). How can run application on DSP?

Thanks and Regards,

Kishan Patel.

  • Kishan,

    Thanks for your query.

    I believe you will find our OpenCV documentation very helpful for your questions:

    software-dl.ti.com/.../Foundational_Components_OpenCV.html

    I hope it helps you.
  • Hello RonB,

            I read that document but could not find regarding NEON.

    In system, we are knowing that how can enable NEON flag with opencv.(using cmake and recompile)

    But,we dont know that in which file we have to do modification to enable NEON and recompile opencv for AM5728 EVM board.

    Regards,

    Kishan Patel.

  • Hi, Kishan,

    1) Neon is one of the complier argument. Please check with compiler using --help argument.

    $ arm-linux-gnueabihf-gcc --help
    Usage: arm-linux-gnueabihf-gcc [options] file...
    Options:
    -pass-exit-codes Exit with highest error code from a phase.
    --help Display this information.
    --target-help Display target specific command line options.
    --help={common|optimizers|params|target|warnings|[^]{joined|separate|undocumented}}[,...].
    Display specific types of command line options.
    (Use '-v --help' to display command line options of sub-processes).
    --version Display compiler version information.
    -dumpspecs Display all of the built in spec strings.

    2) I am not sure if you are asking how to make OpenCV application to run on DSP. If this is your question, please refer to the link Ron pointed to on the section of "OpenCL offload". If you ask in gereral how the DSP application be run from Linux on ARM, please refer to this thread, e2e.ti.com/.../736935. I suggest to start with the IPC Quick Start Guide.


    Rex
  • Hello Rex,

    Do you know exact command by which we can check that NEON has enabled/disabled?

    Regards,

    Kishan Patel.

  • Kishan,

    I don't know any command to check if Neon is enabled or not, but what I used to do (not purposely) is to see if Neon instructions existed in the assembly code

    Rex

  • Hello Rex,
    So, suppose somehow we have enabled NEON on board then how can we confirm that it has enabled successfully?
    Regards,
    Kishan Patel.
  • Hi, Kishan,

    Neon is an ARM feature. Linaro developed the toolchain to compile for the ARM device. That question should be to the Linaro.
    It doesn't fall into TI support scope.

    Rex
  • Hello Rex,
    Okay. Actually i want to use NEON with OpenCV means i have cross-compiled OpenCV with NEON in ubuntu system. But how can do same with AM5728 EVM board?

    Regards,
    Kishan Patel.
  • Hi, Kishan,

    I am not sure I understand your question. The way I understand is OpenCV and Neon are 2 separate entities. Neon is a compiler option so it generates ARM Neon instructions. It has nothing to do with application being the OpenCV or not. If you cross-compiled your application on linux host, that binary can be used on EVM. If you want to compile natively on EVM, you use the same command to compile on EVM except the paths need to point to local file system.

    Rex
  • Hi, Kishan,

    If my last post answered your question, please click "Resolved". If you have other question, please submit a new thread.
    Thanks!

    Rex
  • Hello Rex,
    If i cross-compile OpenCV with enabling neon on system, then i can check that NEON has enabled/not.
    But on AM5728 EVM board, command not working("opencv_version -hw").

    So, i dont understand use of NEON on am5728.

    Regards,
    Kishan Patel.
  • Hi, Kishan,

    If i cross-compile OpenCV with enabling neon on system, then i can check that NEON has enabled/not.
    

    which system do you refer to? the linux PC? You can check NEON on the Linux PC?

    But on AM5728 EVM board, command not working("opencv_version -hw").

    Is this opencv_version TI software? Did you cross-compile it to be run on AM5728 EVM? If it is not TI software, I can't comment it. I don't know how it behaves and don't know what it does.

    Rex

  • Hello Rex,
    So, is there any other command or process by which we can check informations .(OpenCV version, neon_flag_status)?.

    Regards,
    Kishan Patel.
  • Hi, Kishon,

    Below was my post to the same question back on Oct 17:

    I don't know any command to check if Neon is enabled or not, but what I used to do (not purposely) is to see if Neon instructions existed in the assembly code
    
    

  • Hi, Kishan,

    If you don't have further questions, I'll close this thread. If you have new issue, please open a new one. Thanks!

    Rex
  • Hello Rex,

            Actually i dont understand the use of NEON here. I have asked to enable it with OpenCV.

    There is one NEON flag which can be enable when cross-compile OpenCV.

    Moreover, i have tested OpenCL examples on AM5728 which use DSP as per OpenCL documents.

    In documents, we can also see the performance of OpenCL when On and Off.

    But when i have tested those examples, i could not get any effect on Performance.

    Regards,

    Kishan Patel.

  • Hi, Kishan,

    This is what I understand about Neon. Neon is a hardware ARM feature . It can't be enabled or disabled, but ARM either supports or not. You can compile the code to generate Neon instruction which utilizes the Neon hardware. In TI SDK, the Neon flag is set. My guess is that you already at the best possible performance from Neon. Try to remove the Neon flag in compile option and see what numbers you get from it.

    Rex