{"id":20373480,"url":"https://github.com/megengine/megpeak","last_synced_at":"2025-04-07T13:10:25.672Z","repository":{"id":37301141,"uuid":"436845138","full_name":"MegEngine/MegPeak","owner":"MegEngine","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-15T06:12:31.000Z","size":163,"stargazers_count":245,"open_issues_count":5,"forks_count":38,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-31T12:07:19.545Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MegEngine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-10T04:04:23.000Z","updated_at":"2025-03-20T02:54:01.000Z","dependencies_parsed_at":"2024-11-05T00:31:35.324Z","dependency_job_id":"96ba50eb-893b-4dc1-95cd-9574e4b34709","html_url":"https://github.com/MegEngine/MegPeak","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2FMegPeak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2FMegPeak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2FMegPeak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2FMegPeak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MegEngine","download_url":"https://codeload.github.com/MegEngine/MegPeak/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657282,"owners_count":20974345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T01:18:40.677Z","updated_at":"2025-04-07T13:10:25.639Z","avatar_url":"https://github.com/MegEngine.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MegPeak\nMegpeak is a tool for testing processor peak computation, now support\narm, x86 and GPU driven by OpenCL processor.\n\n## MegPeak can do\nMegPeak can do:\n* Peak bandwidth of instruction\n* Instruction delay\n* Memory peak bandwidth\n* Peak bandwidth of arbitrary instruction combination\n\nAlthough some of the above information can be obtained by querying the data sheet of the chip, and with guidance the theoretical the peak performance\ncan be computed, but in many cases, the detail performance documents of the target processor cannot be obtained.\nIn addition, the result through megpeak is more direct and accurate, and it can test the peak bandwidth of arbitrary instruction combination\n\n## BUILD\nMegPeak only support [CMake](https://cmake.org/) build system and require CMake version upper than 3.15.2, you can compile the MegPeak follow the step:\n\n* clone or download the project\n* choose a test platform\n    - if you will test x86 processor in linux OS\n        - a gcc or clang compiler should find by cmake through `PATH` env\n    - if you will test arm processor in android OS\n        - a [ndk](https://developer.android.com/ndk) is required\n            - download the NDK and extract to the host machine\n            - set the `NDK_ROOT` env to the path of extracted NDK directory\n* if your target test OS is android，run the `android_build.sh` to build it\n    * build for armv7\n        ```bash\n        ./android_build.sh -m armeabi-v7a\n        ```\n    * build for arm64\n        ```bash\n        ./android_build.sh -m arm64-v8a\n        ```\n    * build with OpenCL\n        ```bash\n        ./android_build.sh -l -m [arm64-v8a, armeabi-v7a]\n        ```\n    * build with all benchmark\n        ```bash\n        ./android_build.sh -a -m [arm64-v8a, armeabi-v7a]\n        ```\n* if you target test OS is linux，if you want to enable OpenCL add `-DMEGPEAK_ENABLE_OPENCL=ON` to cmake command\n    ```bash\n    mkdir -p build \u0026\u0026 cd build\n    cmake .. [-DMEGPEAK_ENABLE_OPENCL=ON]\n    make\n    ```\n* after build, the executable file megpeak is stored in build directory\n\n### Run\nIf you compile the project and get the megpeak, next you can copy or set the megpeak executable file to the test machine，and run it and get the help message.\n    ```bash\n    ./megpeak -h\n     ```\n* test opencl\n    ```bash\n    ./megpeak -d opencl\n    ```\n* test CPU with cpu id\n    ```bash\n    ./megpeak -d cpu -i 0\n    ```\n\n### GFlops test results for different CPUs\n| Platform | CPU | Architecture | Frequence(GHz) | GFLOPS | FLOPS/Cycle |\n| :------: | :---: | :------------: | :--------------: | :------: | :----------------: |\n| / | Cortex-A7 | ARMV7 | 1.0 | 1.902002 | 1.9020 |\n| / | Cortex-A53 | ARM64 | 1.3 | 9.844987 | 7.5731 |\n| Xiaomi Mi 9 Core 0 | Cortex-A55 | ARM64 | 1.8 | 13.566583 | 7.537 |\n| raspberry-pi 4b | Cortex-A72 | ARM64 | 1.5 | 11.664233 | 7.776 |\n| Xiaomi Mi 9 Core 6 | Cortex-A76 | ARM64 | 2.42 | 38.691399 | 15.988 |\n| Realme X7 Pro Core 4 | Cortex-A77 | ARM64 | 2.6 | 41.318005 | 15.892 |\n| Xiaomi Mi 11 Core 6 | Cortex-A78 | ARM64 | 2.4 | 33.781448 | 14.076 |\n| Apple Mac | Apple M1 | ARM64 | 3.2 | 102.424 | 32.008 |\nMore details see [wiki](https://github.com/MegEngine/MegPeak/wiki/Common-Arm-processor-Peak-performance)\n\n### Acknowledgement\nOpenCL in MegPeak referenced the [clpeak](https://github.com/krrishnarraj/clpeak) project\n\n### License\n[Apache-2.0](https://github.com/MegEngine/MegPeak/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegengine%2Fmegpeak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmegengine%2Fmegpeak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegengine%2Fmegpeak/lists"}