Forum Discussion

DongWang-BJTU's avatar
DongWang-BJTU
Icon for Occasional Contributor rankOccasional Contributor
6 years ago

Emulator v19.3 is much slower than v19.1/18.1

I have currently upgraded to OpenCLSDK v19.3 and found that the legacy emulator is much slower than previous versions. I am using the same OpenCL code with the same compilation configurations.

Is there any new changes in this new version ?

14 Replies

  • MEIYAN_L_Intel's avatar
    MEIYAN_L_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,

    I had compare the both version in getting start guide. I saw that the memory requirement and RAM requirement are the same.

    Sometimes with newer versions, it might requires higher computer specs.

    Compilation to the same design files with slower time, there might be some computer spec performance issues. Firewall / antivirus might also affect the performance.

    You may need to monitor the memory usage while run compilation to check the consumption by the tool.

    Soft reminder: Changes of OpenCL SDK v19.3 can be found here:

    https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/rn/archives/rn_aocl-19-3.pdf

    Thanks

    • DongWang-BJTU's avatar
      DongWang-BJTU
      Icon for Occasional Contributor rankOccasional Contributor

      Hi thanks for the reply.

      I just releaized that I am using the lagecy emulator for SDK v18.1 and v19.1 and the new "fast" emulator for v19.3. Because they have changed the compilation options for v19.3 (you have to explicitly specify -legacy-emulator to use the old legacy emulator). So my observation is that the new emulator is running much slower during emulation (not during compilation) than the old legacy one.

  • MEIYAN_L_Intel's avatar
    MEIYAN_L_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,

    May I know after used the compilation options for OpenCL compiler v19.3, does the compilation time become faster?

    Thanks

    • DongWang-BJTU's avatar
      DongWang-BJTU
      Icon for Occasional Contributor rankOccasional Contributor

      Hi, I still could not make the legacy emulator work for v19.3 SDK. After I added the "-legacy-emulator" option and recompiled the kernel file, the host executable returns an error showing that "incorrect aocx files", I am not sure what I have missed in order to launch the legacy emulator for v19.3 ?

      PS. It is all about execution time of the simulation rather than compilation time.

  • MEIYAN_L_Intel's avatar
    MEIYAN_L_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,

    Could you give me the full compilation command you had type and which design example you have compile?

    I would like to try it on my side.

    Thanks

    • DongWang-BJTU's avatar
      DongWang-BJTU
      Icon for Occasional Contributor rankOccasional Contributor

      Thx for your reply again. I can not share with you the code publicly, but I could invite you to our private repo on github to access all the code. Do you mind sending me your github acount ID so I could send you an invitation link.

  • MEIYAN_L_Intel's avatar
    MEIYAN_L_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,

    May I know the information as below for confirmation:

    1. Does the compile boardtest.cl for emulation pass?
    2. Does the emulator work for the example provided by developer eg: vector_add / hello_world?
    3. There is a change for OpenCL SDK v19.3 which is "Changed CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA to CL_CONFIG_CPU_EMULATE_DEVICES". Do you used "CL_CONFIG_CPU_EMULATE_DEVICES" as a command to run emulation?
    4. what is the command you have used for emulation?

    eg: aoc march=emulator-legacy-emulator

    Thanks

    • DongWang-BJTU's avatar
      DongWang-BJTU
      Icon for Occasional Contributor rankOccasional Contributor

      Hi, I can confirm the boardtest.cl and the example works fine for the emulator as the following log shows:

      ---------------------------

      Initializing OpenCL

      Platform: Intel(R) FPGA Emulation Platform for OpenCL(TM)

      Using 1 device(s)

      Intel(R) FPGA Emulation Device

      Using AOCX: vector_add.aocx

      Launching for device 0 (1000000 elements)

      Time: 4.284 ms

      Kernel time (device 0): 1.197 ms

      Verification: PASS

      --------------------------

      I am fully aware of the new ENV for v19.3 and the variable was correctly set.

      The official examples provided are too small that only execute for a few seconds that makes the performance difference between the two emulators unnoticable.

      You could use our opensource project PipeCNN (https://github.com/doonny/PipeCNN) to test the emulator, please try to run VGG16/ResNet-50 benchmarks and you will see the difference in emulator execution time between v19.1 and v19.3.

      Our inhourse project has a much bigger longer runtime when using the new emulator. The project uses several autorun kernels, I susbect the autorun kernels caused this problem. I have captured the CPU utilization as follow. You can clear see there is a big difference: the legacy emualtor uses more threads compared to the new one.

      1. emulaor v19.3 (new emulator)

      2. emulator v19.1 (lagecy one)

      I am using Ubuntu 16.04.6 (Linux fpga-z390 4.15.0-72-generic #81~16.04.1-Ubuntu SMP Tue Nov 26 16:34:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

      )

      on a i9-9900K CPU with 64GB memory.

  • MEIYAN_L_Intel's avatar
    MEIYAN_L_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,

    I had download the file and looking into the file.

    I saw many .cl file in project/device file.

    May I know which file you want to compile at my side? Or do I need to compile all the file?

    Thanks

  • MEIYAN_L_Intel's avatar
    MEIYAN_L_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,

    I had followed the instruction but there is an error occurred as below:

    host/main.cpp:25:22: fatal error: ocl_util.h: No such file or directory

    #[include "ocl_util.h"

    I had recheck back the the script of makefile in root folder, there is include two file:

    1. ./common/ocl_util.cpp
    2. ./common/timer.cpp

    I did not found the "common" folder.

    Thanks

  • PVeli's avatar
    PVeli
    Icon for New Contributor rankNew Contributor

    Using AOCX: traffic_stn.aocx
    Context callback: clCreateProgramWithBinary failed
    ERROR: CL_INVALID_BINARY
    Location: ../common/src/AOCLUtils/opencl.cpp:392
    Failed to create program with binary

    I am getting this error with -legacy emulator , please help me