{"id":31288978,"url":"https://github.com/jiegec/SPECCPU2017Harmony","last_synced_at":"2025-09-24T13:03:24.309Z","repository":{"id":268122166,"uuid":"903382280","full_name":"jiegec/SPECCPU2017Harmony","owner":"jiegec","description":"Run SPEC CPU 2017 benchmark on OpenHarmony/HarmonyOS NEXT","archived":false,"fork":false,"pushed_at":"2025-06-06T07:18:24.000Z","size":226,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-06T07:33:57.515Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jiegec.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,"zenodo":null}},"created_at":"2024-12-14T13:16:49.000Z","updated_at":"2025-06-06T07:18:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"95e82935-4c1e-4c35-8956-99d1720c7b6d","html_url":"https://github.com/jiegec/SPECCPU2017Harmony","commit_stats":null,"previous_names":["jiegec/speccpu2017harmony"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jiegec/SPECCPU2017Harmony","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiegec%2FSPECCPU2017Harmony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiegec%2FSPECCPU2017Harmony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiegec%2FSPECCPU2017Harmony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiegec%2FSPECCPU2017Harmony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jiegec","download_url":"https://codeload.github.com/jiegec/SPECCPU2017Harmony/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiegec%2FSPECCPU2017Harmony/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276754055,"owners_count":25698832,"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","status":"online","status_checked_at":"2025-09-24T02:00:09.776Z","response_time":97,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-09-24T13:01:54.055Z","updated_at":"2025-09-24T13:03:24.304Z","avatar_url":"https://github.com/jiegec.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# SPEC CPU 2017 Harmony\n\nRunning SPEC INT 2017 benchmark on HUAWEI MateBook Pro:\n\n![](./screenshot.jpg)\n\n## Overview\n\nRun SPEC CPU 2017 benchmark on OpenHarmony/HarmonyOS NEXT. Please update SPEC CPU 2017 to the latest version available, otherwise see [#2](https://github.com/jiegec/SPECCPU2017Harmony/issues/2) for possible workarounds.\n\nIt currently supports running SPEC CPU 2017 int rate-1 and fp rate-1.\n\n## Usage\n\nHow to build on macOS (missing support for benchmarks that use Fortran):\n\n1. Copy the whole benchspec folder from SPEC CPU 2017 installation to the root folder of this project\n2. Execute `perl generate.perl` under the root folder of this project\n3. Use DevEco Studio to open this project\n4. Setup code signing using DevEco Studio\n5. Execute `./build-macos.sh` under the root folder of this project\n\nHow to build on Linux (all benchmarks are working):\n\n1. Install lld-20 and flang-20 from [LLVM APT](https://apt.llvm.org/)\n2. Copy the whole benchspec folder from SPEC CPU 2017 installation to the root folder of this project\n3. Execute `perl generate.perl` under the root folder of this project\n4. Clone llvm-project to $HOME/llvm-project\n5. Execute `./build-flang.sh` under the root folder of this project\n6. Copy code signing config (including build-profile.json5 and ~/.ohos/config) from macOS/Windows\n7. Execute `./build-linux.sh` under the root folder of this project\n\nTo install the application to phone: either use DevEco Studio, or use `push.sh`.\n\n## Result\n\nIf you want to find existing benchmark results, please refer to [results](./results/README.md) folder. Tested devices:\n\n- Pura 70 Pro+\n- MateBook Pro\n\n## How does it work\n\nBecause HarmonyOS NEXT does not permit the execution of binaries in the data folder, each benchmark (including the input generator and output validator) is compiled into a shared library. To execute the benchmark, the shared library is loaded, and its main function is invoked with the appropriate arguments.\n\nTo prevent memory exhaustion caused by potential memory leaks, each benchmark is executed within a forked child process. Upon the child process's termination, the memory is automatically reclaimed. The execution time is measured from the parent process, which includes the minimal overhead of process startup and shutdown.\n\nCertain benchmarks require an exceptionally large stack size (on the order of hundreds of megabytes). However, setting the stack size limit using `setrlimit` does not function as intended. To address this, a manual switch implemented in assembly is used to run the benchmark on a heap-allocated 1GB stack.\n\nP.S. It seems that on MateBookPro, execve syscall is allowed, so it is possible to run statically linked SPEC CPU 2017 binaries instead of rebuilding it with Clang/Flang. Investigation is pending.\n\n## TODO\n\n- copies\u003e1 of rate tests\n- speed tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiegec%2FSPECCPU2017Harmony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjiegec%2FSPECCPU2017Harmony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiegec%2FSPECCPU2017Harmony/lists"}