{"id":25247136,"url":"https://github.com/gem5/gem5-resources","last_synced_at":"2025-04-06T13:09:02.757Z","repository":{"id":54774408,"uuid":"255395506","full_name":"gem5/gem5-resources","owner":"gem5","description":"The official repository for the gem5 resources sources.","archived":false,"fork":false,"pushed_at":"2025-02-14T21:57:40.000Z","size":49262,"stargazers_count":65,"open_issues_count":13,"forks_count":52,"subscribers_count":12,"default_branch":"stable","last_synced_at":"2025-03-30T12:06:37.097Z","etag":null,"topics":["architecture","gem5","modeling","resources","simulation"],"latest_commit_sha":null,"homepage":"https://resources.gem5.org","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gem5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-04-13T17:24:55.000Z","updated_at":"2025-03-15T20:58:02.000Z","dependencies_parsed_at":"2023-02-08T19:30:40.328Z","dependency_job_id":"973e5811-661b-4250-b360-40bb07be5dac","html_url":"https://github.com/gem5/gem5-resources","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gem5%2Fgem5-resources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gem5%2Fgem5-resources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gem5%2Fgem5-resources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gem5%2Fgem5-resources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gem5","download_url":"https://codeload.github.com/gem5/gem5-resources/tar.gz/refs/heads/stable","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485287,"owners_count":20946398,"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":["architecture","gem5","modeling","resources","simulation"],"created_at":"2025-02-12T02:57:11.980Z","updated_at":"2025-04-06T13:09:02.733Z","avatar_url":"https://github.com/gem5.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\nlayout: default\n---\n\n# gem5 Resources\n\nThis repository contains the sources needed to compile the gem5 resources.\nThe compiled resources are found in the gem5 resources bucket,\nhttp://dist.gem5.org/dist. Though these resources are not needed to compile or\nrun gem5, they may be required to execute some gem5 tests or may be useful\nwhen carrying out specific simulations.\n\nThe following sections outline our versioning policy, how to make changes\nto this repository, and describe each resource and how they may be built.\n\n## Versioning\n\nWe ensure that for each version of the [gem5 source](\nhttps://gem5.googlesource.com/public/gem5/) there is a corresponding version of\nthe gem5-resources, with the assumption that version X of the gem5 source will\nbe used with version X of the gem5-resources. The gem5-resources repository\ncontains two branches, develop and stable. The stable branch's HEAD points\ntowards the latest gem5 resources release, which will be the same version id\nas the that of the latest gem5 source. E.g., if the latest release of gem5 is\nv20.2.0.0, then the latest release of gem5-resources will be v20.2.0.0, with\nthe HEAD of its stable branch tagged as v20.2.0.0. Previous versions will be\ntagged within the stable branch. Past versions gem5-resources can thereby be\nchecked out with `git checkout \u003cVERSION\u003e`. A complete list of versions can be\nfound with `git tag`. The develop branch contains code under development and\nwill be merged into the stable branch, then tagged, as part of the next release\nof gem5. More information on gem5 release procedures can be found [here](\nhttps://gem5.googlesource.com/public/gem5/+/refs/heads/stable/CONTRIBUTING.md#releases).\nAny release procedures related to the gem5 source can be assumed to be\napplicable to gem5-resources.\n\nThe compiled resources for gem5 can be found under\nhttp://dist.gem5.org/dist/{VERSION}. E.g. compiled resources for gem5 v20.2\nare under http://dist.gem5.org/dist/v20-2 and are compiled from\ngem5-resources v20.2. http://dist.gem5.org/dist/develop is kept in sync\nwith the develop branch, and therefore should not be depended upon for stable,\nregular usage.\n\n**Note: Resource files for gem5 v19.0.0.0, our legacy release, can be found\nunder http://dist.gem5.org/dist/current**.\n\n## Submitting a contribution\n\nWe utilize GitHub to review changes made to the gem5-resources. To make changes, \nfollow the steps below.\n\n1. Fork the gem5 repository on GitHub from https://github.com/gem5/gem5-resources/.\n2. Create a new branch in your forked repository for your changes.\n3. Commit your changes to the new branch.\n4. Push the branch to your forked repository.\n5. Open a pull request from your branch in your forked repository to the main gem5 \nresources repository.\n\n\nIf you have not signed up for an account on the github\n(https://github.com/), you first have to create an account.\n\n 1. Go to https://github.com/\n 2. Click \"Sign up\" in the upper right corner.\n\nChanges are required to have a `Change-ID`, which can be added using the \npre-commit hook. This can be installed via the following:\n\n``` bash\npip install pre-commit\npre-commit install\n```\n\n### Stable vs. Develop branch\n\nThe rule for when to work on the stable vs. develop branch is as follows:\n\n* If the change applies to the current gem5 stable, then the change should be \non the stable branch of gem5-resources.\n\n* If the change cannot work on gem5 stable and requires updates to gem5 that \nare only found on gem5 develop, then the change should be on the develop branch \nof gem5-resources.\n\nWhen a new version of gem5 is released, the develop branch is merged into the \nstable branch. When gem5-resources's stable and develop branches diverge, we \nmerge stable into develop.\n\n### Code Review\n\nOnce a change has been submitted to GitHub, you may view the change at\n\u003chttps://github.com/gem5/gem5-resources/pulls\u003e.\n\nThrough the GitHub pull request we strongly advise you add reviewers to your \nchange. GitHub will automatically notify those you assign. We recommend you add \nboth **Bobby R. Bruce \u003cbbruce@ucdavis.edu\u003e** (@BobbyRBruce) and \n**Jason Lowe-Power \u003cjason@lowepower.com\u003e** (@powerjg) as reviewers.\n\nReviewers will review the change. For non-trivial edits, it is not unusual for \na change to receive feedback from reviewers that they want incorporated before \nflagging as acceptable for merging into the gem5-resources repository. \n**All communications between reviewers and contributors should be done in a \npolite manner. Rude and/or dismissive remarks will not be tolerated.**\n\nOnce your change has been accepted by reviewers a maintainer will squash and \nmerge your pull request into the gem5-resources repository. \n\n## Resource: RISCV Tests\n\nThe RISCV Tests source can be found in the `src/riscv-tests` directory. More\ninformation about these tests can be found in `src/riscv-tests/README.md`.\n\n### RISCV Tests Origins\n\nThe RISCV Tests in this repository were obtained from\n\u003chttps://github.com/riscv-software-src/riscv-tests.git\u003e, revision\ne65ecdf941a5484af27f9be223fb655ebcb0398b.\n\n### RISCV Tests Compilation\n\nTo compile the RISCV Tests the [RISCV GNU Compiler](\nhttps://github.com/riscv/riscv-gnu-toolchain) must be installed.\n\nThen, to compile:\n\n```\ncd src/riscv-tests\nautoconf\n./configure --prefix=/opt/riscv/target\nRISCV_PREFIX=\u003cCOMPILER_PREFIX\u003e make\n```\nAs an example for `make`, if the binary name for the RISCV compiler is\n`riscv64-linux-gnu-gcc`, then the make command is the following:\n```\nRISCV_PREFIX=riscv64-linux-gnu- make\n```\nThis RISCV binaries can then be found within the `src/riscv-tests/benchmarks`\ndirectory.\n\n### RISCV Tests Pre-built binaries\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/riscv-tests/dhrystone.riscv\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/riscv-tests/median.riscv\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/riscv-tests/mm.riscv\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/riscv-tests/mt-matmul.riscv\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/riscv-tests/mt-vvadd.riscv\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/riscv-tests/multiply.riscv\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/riscv-tests/pmp.riscv\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/riscv-tests/qsort.riscv\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/riscv-tests/rsort.riscv\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/riscv-tests/spmv.riscv\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/riscv-tests/towers.riscv\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/riscv-tests/vvadd.riscv\u003e\n\n## Resource: simple\n\nThe simple resources are small binaries, often used to run quick tests and\nchecks in gem5. They are baremetal.\n\n### simple Compilation\n\nSimple single source file per executable userland or baremetal examples.\n\nThe toplevel executables under `src/simple` can be built for any ISA that we\nhave a cross compiler for. The current cross compilers supported are :\n\n- `x86_64` (as installed via APT with `sudo apt install build-essential`)\n- [`aarch64-linux-gnu-gcc/arch64-linux-gnu-g++`](\nhttps://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/)\n- [`arm-linux-gnueabihf-gcc/arm-linux-gnueabihf-g++`](\nhttps://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/)\n- [`riscv64-linux-gnu-gcc/riscv64-linux-gnu-g++`](\nhttps://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/)\n\nExamples that build only for some ISAs specific ones are present under\n`src/simple/\u003cISA\u003e` subdirs, e.g. `src/simple/aarch64/`,\n\nThe ISA names are meant to match `uname -m`, e.g.:\n\n- `aarch64`\n- `arm`\n- `riscv`\n- `x86_64`\n- `sparc64`\n\nYou have to specify the path to the gem5 source code with `GEM5_ROOT` variable \nso that `m5ops` can be used from there. For example for a native build:\n\n    cd src/simple\n    make -j`nproc` GEM5_ROOT=../../../\n\nThe default of that variable is such that if you place this repository and the \ngem5 repository in the same directory:\n\n    ./gem5/\n    ./gem5-resources/\n\nyou can omit that variable and build just with:\n\n    make\n\nAfter the building, the generated files are located under:\n\n    ./out/\u003cISA\u003e/\n\nFor example, some of the userland executables built on x86 are:\n\n    ./out/x86_64/user/hello.out\n    ./out/x86_64/user/x86_64/mwait.out\n\nOr if you build for a different ISA:\n\n    make ISA=aarch64\n\nsome of the executables would be:\n\n    ./out/aarch64/user/hello.out\n    ./out/aarch64/user/aarch64/futex_ldxr_stxr.out\n\nBy default, only userland executables are built. You can build just the baremetal\nones instead with:\n\n    make ISA=aarch64 bare\n\nor both userland and baremetal with:\n\n    make ISA=aarch64 all\n\nA sample baremetal executable generated by this is:\n\n    out/aarch64/bare/m5_exit.out\n\nOnly ISAs that have a corresponding `src/simple/bootloader/` file can build for\nbaremetal, e.g. `src/simple/bootloader/aarch64.S`.\n\nNote that some C source files can produce both a baremetal and an userland.\nFor example `m5_exit.c` produces both:\n\n    out/aarch64/bare/m5_exit.out\n    out/aarch64/user/m5_exit.out\n\nHowever, since the regular userland toolchain is used rather than a more\nspecialized baremetal toolchain, the C standard library is not available.\nTherefore, only very few C examples can build for baremetal, notably the ones\nthat use `m5ops`.\n\nThere are also examples that can only build for baremetal, e.g.\n`aarch64/semihost_exit` only builds for baremetal, as semihosting is not\navailable on userland.\n\nThe `simple` directory is also able to generate squashfs images containing\nonly a single userland executable at `/sbin/init` for any of the userland\nexecutables. This can be done with a command of type:\n\n    make ISA=aarch64 out/aarch64/squashfs/m5_exit.squashfs\n\nSquashfs is a filesystem type that the Linux kernel understands natively,\nexactly like ext4, except that it is a bit more convenient to create, and\nwrite-only.\n\nYou can therefore give those squashfs images to gem5 exactly as you\nwould give a normal ext4 raw image, by pointing to it for example with\n`fs.py --disk-image=m5_exit.squashfs` as shown at:\nhttps://www.gem5.org/documentation/general_docs/fullsystem/building_arm_kernel\nLinux will then run the given userland executable after Linux boots as the\ninit program.\n\nThe initial motivation for this was to generate simple test images for\nLinux boot.\n\nSince this is a less common use case, squashfs images are not currently\ngenerated by any single phony target all at once.\n\n### simple Pre-built binaries\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/x86/test_pthread_create_seq\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/x86/test_pthread_create_para\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/x86/test_pthread_mutex\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/x86/test_atomic\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/x86/test_pthread_cond\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/x86/test_std_thread\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/x86/test_std_mutex\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/x86/test_std_condition_variable\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch32/test_pthread_create_seq\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch32/test_pthread_create_para\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch32/test_pthread_mutex\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch32/test_atomic\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch32/test_pthread_cond\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch32/test_std_thread\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch32/test_std_mutex\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch32/test_std_condition_variable\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch64/test_pthread_create_seq\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch64/test_pthread_create_para\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch64/test_pthread_mutex\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch64/test_atomic\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch64/test_pthread_cond\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch64/test_std_thread\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch64/test_std_mutex\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/aarch64/test_std_condition_variable\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/riscv64/test_pthread_create_seq\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/riscv64/test_pthread_create_para\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/riscv64/test_pthread_mutex\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/riscv64/test_atomic\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/riscv64/test_pthread_cond\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/riscv64/test_std_thread\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/riscv64/test_std_mutex\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/riscv64/test_std_condition_variable\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/sparc64/test_pthread_create_seq\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/sparc64/test_pthread_create_para\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/sparc64/test_pthread_mutex\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/sparc64/test_atomic\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/sparc64/test_pthread_cond\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/sparc64/test_std_thread\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/sparc64/test_std_mutex\u003e\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/pthreads/sparc64/test_std_condition_variable\u003e\n\n## Resource: Square\n\n### Square Compilation\n\nTo compile:\n\n**Note**: Make sure you are in gem5-resources directory (resources like square \nare not present in the gem5 repository). To clone the gem5-resources repository, \nrun the following command:\n\n```\ngit clone https://github.com/gem5/gem5-resources.git\n```\n\n\n```\ncd src/gpu/square\ndocker run --rm -v ${PWD}:${PWD} -w ${PWD} -u $UID:$GID ghcr.io/gem5/gcn-gpu make gfx9-apu\n```\n\nThe compiled binary can be found in `src/gpu/square/bin`\n\n### Square Pre-built binary\n\n\u003chttps://storage.googleapis.com/dist.gem5.org/dist/v24-0/test-progs/square/square\u003e\n\n# Resource: HIP Sample Applications\n\nThe [HIP sample apps](https://github.com/ROCm/HIP/tree/rocm-4.0.x/samples)\ncontain applications that introduce various GPU programming concepts that are\nusable in HIP.\n\nThe samples cover topics such as using and accessing different parts of GPU\nmemory, running multiple GPU streams, and optimization techniques for GPU code.\n\nCertain apps aren't included due to complexities with either ROCm or Docker\n(hipEvent, profiler), or due to lack of feature support in gem5 (peer2peer)\n\n## Compilation\n\n```\ncd src/gpu/hip-samples\ndocker run --rm -v ${PWD}:${PWD} -w ${PWD} -u $UID:$GID ghcr.io/gem5/gcn-gpu make\n```\n\nIndividual programs can be made by specifying the name of the program\n\nBy default, this code builds for gfx902, a VEGA-based APU. This can be\noverridden by specifying `-e HCC_AMDGPU_TARGET=\u003ctarget\u003e` in the build command.\n\n## Pre-built binary\n\n\u003chttps://storage.googleapis.com/dist.gem5.org/dist/v24-0/test-progs/hip-samples/2dshfl\u003e\n\n\u003chttps://storage.googleapis.com/dist.gem5.org/dist/v24-0/test-progs/hip-samples/dynamic_shared\u003e\n\n\u003chttps://storage.googleapis.com/dist.gem5.org/dist/v24-0/test-progs/hip-samples/inline_asm\u003e\n\n\u003chttps://storage.googleapis.com/dist.gem5.org/dist/v24-0/test-progs/hip-samples/MatrixTranspose\u003e\n\n\u003chttps://storage.googleapis.com/dist.gem5.org/dist/v24-0/test-progs/hip-samples/sharedMemory\u003e\n\n\u003chttps://storage.googleapis.com/dist.gem5.org/dist/v24-0/test-progs/hip-samples/shfl\u003e\n\n\u003chttps://storage.googleapis.com/dist.gem5.org/dist/v24-0/test-progs/hip-samples/stream\u003e\n\n\u003chttps://storage.googleapis.com/dist.gem5.org/dist/v24-0/test-progs/hip-samples/unroll\u003e\n\n# Resource: Heterosync\n\n[Heterosync](https://github.com/mattsinc/heterosync) is a benchmark suite used\nto test the performance of various types of fine-grained synchronization on\ntightly-coupled GPUs. The version in gem5-resources contains only the HIP code.\n\nThe README in the heterosync folder details the various synchronization primitives\nand the other command-line arguments for use with heterosync.\n\n## Compilation\n```\ncd src/gpu/heterosync\ndocker run --rm -v ${PWD}:${PWD} -w ${PWD} -u $UID:$GID ghcr.io/gem5/gcn-gpu make release-gfx9\n```\n\nThe release-gfx9 target builds for gfx902, a VEGA-based APU, and gfx900, a\nVEGA-based dGPU. There are other targets (release) that build for GPU types\nthat are currently unsupported in gem5.\n\n## Pre-built binary\n\n\u003chttps://storage.googleapis.com/dist.gem5.org/dist/v24-0/test-progs/heterosync/allSyncPrims-1kernel\u003e\n\n# Resource: lulesh\n\n[lulesh](https://computing.llnl.gov/projects/co-design/lulesh) is a DOE proxy\napplication that is used as an example of hydrodynamics modeling. The version\nprovided is for use with the gpu-compute model of gem5.\n\n## Compilation and Running\n```\ncd src/gpu/lulesh\ndocker run --rm -v ${PWD}:${PWD} -w ${PWD} -u $UID:$GID ghcr.io/gem5/gcn-gpu make\n```\n\nBy default, the Makefile builds for gfx902, and is placed in the `src/gpu/lulesh/bin` folder.\n\nlulesh is a GPU application, which requires that gem5 is built with the VEGA_X86 architecture.\nTo build VEGA_X86:\n\n```\n# Working directory is your gem5 directory\ndocker run --rm -v ${PWD}:${PWD} -w ${PWD} -u $UID:$GID ghcr.io/gem5/gcn-gpu scons -sQ -j$(nproc) build/VEGA_X86/gem5.opt\n```\n\nThe following command shows how to run lulesh\n\nNote: lulesh has two optional command-line arguments, to specify the stop time \nand number of iterations. To set the arguments, add \n`--options=\"\u003cstop_time\u003e \u003cnum_iters\u003e` to the run command. The default arguments \nare equivalent to `--options=\"1.0e-2 10\"`.\n\n\n```\n# Assuming gem5 and gem5-resources are in your working directory\ndocker run --rm -v ${PWD}:${PWD} -w ${PWD} -u $UID:$GID ghcr.io/gem5/gcn-gpu gem5/build/VEGA_X86/gem5.opt gem5/configs/example/apu_se.py -n3 --mem-size=8GB --benchmark-root=gem5-resources/src/gpu/lulesh/bin -clulesh\n```\n\n## Pre-built binary\n\n\u003chttps://storage.googleapis.com/dist.gem5.org/dist/v24-0/test-progs/lulesh/lulesh\u003e\n\n# Resource: halo-finder (HACC)\n\n[HACC](https://asc.llnl.gov/coral-2-benchmarks) is a DoE application designed \nto simulate the evolution of the universe by simulating the formation of \nstructure in collisionless fluids under the influence of gravity. The halo-finder \ncode can be GPU accelerated by using the code in RCBForceTree.cxx.\n\n`src/gpu/halo-finder/src` contains the code required to build and run \nForceTreeTest from `src/halo_finder` in the main HACC codebase.\n`src/gpu/halo-finder/src/dfft` contains the dfft code from `src/dfft` in the \nmain HACC codebase.\n\n## Compilation and Running\n\nhalo-finder requires that certain libraries that aren't installed by default in the\nVEGA docker container provided by gem5, and that the environment is configured properly\nin order to build. We provide a Dockerfile that installs those libraries and\nsets the environment.\n\nIn order to test the GPU code in halo-finder, we compile and run ForceTreeTest.\n\nTo build the Docker image and the benchmark:\n```\ncd src/gpu/halo-finder\ndocker build -t \u003cimage_name\u003e .\ndocker run --rm -v ${PWD}:${PWD} -w ${PWD}/src -u $UID:$GID \u003cimage_name\u003e make hip/ForceTreeTest\n```\n\nThe binary is built for gfx902 by default and is placed at `src/gpu/halo-finder/src/hip/ForceTreeTest`\n\nForceTreeTest is a GPU application, which requires that gem5 is built with the VEGA_X86 architecture.\nTo build VEGA_X86:\n```\n# Working directory is your gem5 directory\ndocker run --rm -v ${PWD}:${PWD} -w ${PWD} -u $UID:$GID \u003cimage_name\u003e scons -sQ -j$(nproc) build/VEGA_X86/gem5.opt\n```\n\nTo run ForceTreeTest:\n```\n# Assuming gem5 and gem5-resources are in the working directory\ndocker run --rm -v $PWD:$PWD -w $PWD -u $UID:$GID \u003cimage_name\u003e gem5/build/VEGA_X86/gem5.opt gem5/configs/example/apu_se.py -n3 --benchmark-root=gem5-resources/src/gpu/halo-finder/src/hip -cForceTreeTest --options=\"0.5 0.1 64 0.1 1 N 12 rcb\"\n```\n\n## Pre-built binary\n\n\u003chttps://storage.googleapis.com/dist.gem5.org/dist/v24-0/test-progs/halo-finder/ForceTreeTest\u003e\n\n# Resource: DNNMark\n\n[DNNMark](https://github.com/shidong-ai/DNNMark) is a benchmark framework used\nto characterize the performance of deep neural network (DNN) primitive workloads.\n\n## Compilation and Running\n\nTo build DNNMark:\n**NOTE**: Due to DNNMark building a library, it's important to mount gem5-resources\nto the same directory within the docker container when building and running, as \notherwise the benchmarks won't be able to link against the library. The example \ncommands do this by using `-v ${PWD}:${PWD}` in the docker run commands\n\n```\ncd src/gpu/DNNMark\ndocker run --rm -v ${PWD}:${PWD} -w ${PWD} -u $UID:$GID ghcr.io/gem5/gcn-gpu ./setup.sh HIP\ndocker run --rm -v ${PWD}:${PWD} -w ${PWD}/build -u $UID:$GID ghcr.io/gem5/gcn-gpu make\n```\n\nDNNMark uses MIOpen kernels, which are unable to be compiled on-the-fly in gem5.\nWe have provided a python script to generate these kernels for a subset of the\nbenchmarks for a gfx902 GPU with 4 CUs by default\n\nTo generate the MIOpen kernels:\n```\ncd src/gpu/DNNMark\ndocker run --rm -v ${PWD}:${PWD} -v${PWD}/cachefiles:/root/.cache/miopen/2.9.0 -w ${PWD} ghcr.io/gem5/gcn-gpu python3 generate_cachefiles.py cachefiles.csv [--gfx-version={gfx902,gfx900}] [--num-cus=N]\n```\n\nDue to the large amounts of memory that need to be set up for DNNMark, we have\nadded in the ability to MMAP a file to reduce setup time, as well as added a\nprogram that can generate a 2GB file of floats.\n\nTo make the MMAP file:\n```\ncd src/gpu/DNNMark\ng++ -std=c++0x generate_rand_data.cpp -o generate_rand_data\n./generate_rand_data\n```\n\nDNNMark is a GPU application, which requires that gem5 is built with the VEGA_X86 architecture.\nTo build VEGA_X86:\n```\n# Working directory is your gem5 directory\ndocker run --rm -v ${PWD}:${PWD} -w ${PWD} -u $UID:$GID ghcr.io/gem5/gcn-gpu scons -sQ -j$(nproc) build/VEGA_X86/gem5.opt\n```\n\nTo run one of the benchmarks (fwd softmax) in gem5:\n```\n# Assuming gem5 and gem5-resources are sub-directories of the current directory\ndocker run --rm -v ${PWD}:${PWD} -v ${PWD}/gem5-resources/src/gpu/DNNMark/cachefiles:/root/.cache/miopen/2.9.0 -w ${PWD} ghcr.io/gem5/gcn-gpu gem5/build/VEGA_X86/gem5.opt gem5/configs/example/apu_se.py -n3 --benchmark-root=gem5-resources/src/gpu/DNNMark/build/benchmarks/test_fwd_softmax -cdnnmark_test_fwd_softmax --options=\"-config gem5-resources/src/gpu/DNNMark/config_example/softmax_config.dnnmark -mmap gem5-resources/src/gpu/DNNMark/mmap.bin\"\n```\n\n\n# Resource: pennant\n\npennant is an unstructured mesh physics mini-app designed for advanced\narchitecture research.  It contains mesh data structures and a few\nphysics algorithms adapted from the LANL rad-hydro code FLAG, and gives\na sample of the typical memory access patterns of FLAG.\n\n## Compiling and Running\n\n```\ncd src/gpu/pennant\ndocker run --rm -v ${PWD}:${PWD} -w ${PWD} -u $UID:$GID ghcr.io/gem5/gcn-gpu make\n```\n\nBy default, the binary is built for gfx902 and is placed in `src/gpu/pennant/build`\n\npennant is a GPU application, which requires that gem5 is built with the VEGA_X86 architecture.\n\npennant has sample input files located at `src/gpu/pennant/test`. The following \ncommand shows how to run the sample `noh`:\n\n```\n# Assuming gem5 and gem5-resources are in your working directory\ndocker run --rm -v ${PWD}:${PWD} -w ${PWD} -u $UID:$GID ghcr.io/gem5/gcn-gpu gem5/build/VEGA_X86/gem5.opt gem5/configs/example/apu_se.py -n3 --benchmark-root=gem5-resources/src/gpu/pennant/build -cpennant --options=\"gem5-resources/src/gpu/pennant/test/noh/noh.pnt\"\n```\n\nThe output gets placed in `src/gpu/pennant/test/noh/`, and the file `noh.xy`\nagainst the `noh.xy.std` file. \n\nNote: Only some tests have `.xy.std` files to\ncompare against, and there may be slight differences due to floating-point \nrounding.\n\n## Pre-built binary\n\n\u003chttps://storage.googleapis.com/dist.gem5.org/dist/v24-0/test-progs/pennant/pennant\u003e\n\n## Resource: SPEC 2006\n\nThe [Standard Performance Evaluation Corporation](\nhttps://www.spec.org/benchmarks.html) (SPEC) CPU 2006 benchmarks are designed\nto provide performance measurements that can be used to compare\ncompute-intensive workloads on different computer systems. SPEC CPU 2006\ncontains 12 different benchmark tests.\n\n`src/spec-2006` provides resources on creating a SPEC 2006 disk image, and\nnecessary scripts to run the SPEC 2006 benchmarks within X86 gem5 simulations.\nPlease consult the `src/spec-2006/README.md` for more information.\n\n**Please note, due to licensing issues, the SPEC 2006 iso cannot be provided\nas part of this repository.**\n\n## Resource: SPEC 2017\n\nThe [Standard Performance Evaluation Corporation](\nhttps://www.spec.org/benchmarks.html) (SPEC) CPU 2017 benchmarks are designed\nto provide performance measurements that can be used to compare\ncompute-intensive workloads on different computer systems. SPEC CPU 2017\ncontains 43 benchmarks organized into four suites: SPECspeed 2017 Integer,\nSPECspeed 2017 Floating Point, SPECrate 2017 Integer, and SPECrate 2017\nFloating Point.\n\n`src/spec-2017` provides resources on creating a SPEC 2017 disk image, and\nnecessary scripts to run the SPEC 2017 benchmarks within X86 gem5 simulations.\nPlease consult the `src/spec-2017/README.md` for more information.\n\n**Please note, due to licensing issues, the SPEC 2017 iso cannot be provided\nas part of this repository.**\n\n## Resource: GAP Benchmark Suite (GAPBS) tests\n\n[GAPBS](http://gap.cs.berkeley.edu/benchmark.html) is a graph processing \nbenchmark suite and it contains 6 kernels: Breadth-First Search, PageRank, \nConnected Components, Betweenness Centrality, Single-Source Shortest Paths, \nand Triangle Counting.\n\n### GAPBS Origin\n\nWe obtained the GAPBS benchmark suite from \n\u003chttp://gap.cs.berkeley.edu/benchmark.html\u003e\n\n### Building the GAPBS image\n\n`src/gapbs` contains resources to build a GAPBS disk image which may be used to \nrun the benchmark on gem5 X86 simulations.\n`src/gapbs/README.md` contains build and usage instructions.\n\n### GAPBS Pre-built disk image\n\n\u003chttp://dist.gem5.org/dist/v22-0/images/x86/ubuntu-18-04/gapbs.img.gz\u003e\n\n## Resource: PARSEC Benchmark Suite\n\nThe [Princeton Application Repository for Shared-Memory Computers (PARSEC)](\nhttps://parsec.cs.princeton.edu/) is a benchmark suite composed of\nmultithreaded programs.\n\n### PARSEC Origins\n\nWe used PARSEC 3.0, available from \u003chttps://parsec.cs.princeton.edu\u003e.\n\n### Building the PARSEC image\n\nIn `src/parsec` we provide the source to build a disk\nimage which may be used, alongside configuration files, to run the PARSEC\nBenchmark Suite on gem5 architectural simulations. Please consult\n`src/parsec/README.md` for build and execution information.\n\n### GAPBS Pre-built disk image\n\n\u003chttp://dist.gem5.org/dist/v22-0/images/x86/ubuntu-18-04/parsec.img.gz\u003e.\n\n## Resource: NAS Parallel Benchmarks (NPB) Tests\n\nThe NAS Parallel Benchmarks (NPB) are a small set of programs designed to\nhelp evaluate the performance of parallel supercomputers. The set consists of\nfive Linux Kernels and three pseudo-applications. gem5 resources provides a\ndisk image, and scripts allowing for the NPB image to be run within gem5 X86\nsimulations.\n\n### NPB Origins\n\nWe use NPB 3.4.1, available from\n\u003chttps://www.nas.nasa.gov/publications/npb.html\u003e.\n\n### NPB Building\n\nThe npb resources can be found in `src/npb`. It consists of:\n- npb disk image resources\n- gem5 run scripts to execute these tests\n\nThe instructions to build the npb disk image, a Linux kernel binary, and how to\nuse gem5 run scripts to run npb are available in the [README](\nsrc/npb-tests/README.md) file.\n\n### NPB Pre-built disk image\n\n\u003chttp://dist.gem5.org/dist/v22-0/images/x86/ubuntu-18-04/npb.img.gz\u003e\n\n\n## Resource: Linux Boot Tests\n\nThe Linux boot tests refer to the tests performed with different gem5 \nconfigurations to check its ability to boot a Linux kernel.\nMore information on Linux boot tests can be found \n[here](https://www.gem5.org/project/2020/03/09/boot-tests.html).\n\nThe boot-tests resources consist of three main components:\n- x86-ubuntu disk image\n- gem5 run scripts to execute boot tests\n- linux kernel configuration files\n\nThe instructions to build the x86-ubuntu disk image, the Linux binaries, and \nhow to use gem5 run scripts to run boot-tests are available in this \n[README](src/x86-ubuntu/README.md) file.\n\n## Resource: RISCV Full System\n\nThe RISCV Full System resource includes a RISCV boot loader \n(`berkeley bootloader (bbl)`) to boot the Linux 5.10 kernel on a RISCV system, \nand an image which includes the BusyBox software suite.\nThe resource also contains simple gem5 run/config scripts to run Linux full \nsystem simulations in which a user may telnet into.\n\nFurther information on building a riscv disk image, a riscv boot loader, and \nhow to use gem5 scripts to run riscv Linux full system simulations, is \navailable in the [README](src/riscv-fs/README.md) file.\n\n### RISCV Full System pre-built disk image\n\n\u003chttp://dist.gem5.org/dist/v22-0/images/riscv/busybox/riscv-disk.img.gz\u003e\n\n### RISCV Full System pre-built Linux bootloader\n\n\u003chttp://dist.gem5.org/dist/v22-0/kernels/riscv/static/bootloader-vmlinux-5.10\u003e\n\n\n## Resource: RISCV Full System with Disk Image\n\nThe RISCV Full System resource includes a RISCV bootloader \n(`berkeley bootloader (bbl)`) to boot the Linux 5.10 kernel on a RISCV system.\nThe workload and the Linux utils (provided by BusyBox) are also included in \nthe bootloader.\nThe resource also contains simple gem5 run/config scripts to run Linux full \nsystem simulations in which a user may telnet into.\n\nMore details on building such a RISCV bootloader and hwo does it work are \navailable in the [README.md](src/riscv-boot-exit-nodisk/README.md) file.\n\n### RISCV Full System pre-built Linux bootloader with embedded workload\n\n\u003chttp://dist.gem5.org/dist/v22-0/misc/riscv/bbl-busybox-boot-exit\u003e\n\n\n## Resource: Insttest\n\n\nThe Insttests test SPARC instructions.\n\nCreating the SPARC Insttest binary requires a SPARC cross compile. Instructions\non creating a cross compiler can be found [here](\nhttps://preshing.com/20141119/how-to-build-a-gcc-cross-compiler).\n\n### Insttest Compilation\n\nTo compile:\n\n```\ncd src/insttest\nmake\n```\n\nWe provide a docker image with a pre-loaded SPARC cross compiler. To use:\n\n```\ncd src/insttest\ndocker run --volume $(pwd):$(pwd) -w $(pwd) --rm ghcr.io/gem5/sparc64-gnu-cross:latest make\n```\n\nThe compiled binary can be found in `src/insttest/bin`.\n\n### Insttest Pre-built binary\n\n\u003chttp://dist.gem5.org/dist/v22-0/test-progs/insttest/bin/sparc/linux/insttest\u003e\n\n## Resource: Linux Kernel Binary\n\nContains scripts to create a Linux kernel binary.\n\n### Linux Kernel Compilation\n\nInstructions on how to use the scripts can be found here\n`src/linux-kernel/README.md`.\n\n### Linux Kernel Pre-built binaries\n\n\u003chttp://dist.gem5.org/dist/v22-0/kernels/x86/static/vmlinux-4.4.186\u003e\n\u003chttp://dist.gem5.org/dist/v22-0/kernels/x86/static/vmlinux-4.9.186\u003e\n\u003chttp://dist.gem5.org/dist/v22-0/kernels/x86/static/vmlinux-4.14.134\u003e\n\u003chttp://dist.gem5.org/dist/v22-0/kernels/x86/static/vmlinux-4.19.83\u003e\n\n## Resource: LupV Disk image and Kernel/boot loader\n\n[gem5 supports LupIO](https://www.gem5.org/project/2022/02/07/lupio.html).\nAn example of using gem5 with LupIO can be found in [`configs/example/lupv`](https://gem5.googlesource.com/public/gem5/+/refs/tags/v22.0.0.0/configs/example/lupv/).\n\nThe sources to build a LupV (LupIO with RISC-V) disk image (based on busybox) \nand a LupV bootloader/kernel can be found in `src/lupv`.\n\n### LupV Pre-built disk image\n\n\u003chttp://dist.gem5.org/dist/v22-0/images/riscv/busybox/riscv-lupio-busybox.img.gz\u003e\n\n### LupV Pre-built bootloader/kernel\n\n\u003chttp://dist.gem5.org/dist/v22-0/kernels/riscv/static/lupio-linux\u003e\n\n## Licensing\n\nThere is no universal license encompassing all this repository's contents.\nThe licences covering the individual gem5 resources are therefore highlighted\nbelow.\n\n* **asmtest** : [`src/asmtest/LICENSE`](\nhttps://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/asmtest/LICENSE).\n* **riscv-tests** : [`src/riscv-tests/LICENSE`](\nhttps://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/riscv-tests/LICENSE).\n* **square**: Consult individual copyright notices of source files in\n`src/gpu/square`.\n* **hsa-agent-pkt**: `src/gpu/hsa-agent-pkt/square.cpp` is licensed under the\nsame licence as 'src/gpu/square/square.cpp'.\n`src/gpu/hsa-agent-pkt/HSA_Interface.[h|.cpp]` are licensed under a BSD Lisense\n(A University of Maryland copyright).\n* **hip-samples**: Consult individual copyright notices of the source file in\n'src/gpu/hip-samples/src'\n* **heterosync**: Consult `src/gpu/heterosync/LICENSE.txt`\n* **lulesh**: Consult the copyright notice in `src/gpu/lulesh/src/gpu/lulesh.hip.cc`\n* **halo-finder**: halo-finder is a subcomponent of HACC, which is licensed under\na BSD license.\n* **DNNMark**: DNNMark is licensed under an MIT license, see `src/gpu/DNNMark/LICENSE`\n* **pennant**: pennant is licensed under a BSD license, see `src/gpu/pennant/LICENSE`\n[src/gpu/square](\nhttps://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/gpu/square).\n* **spec 2006**: SPEC CPU 2006 requires purchase of benchmark suite from\n[SPEC](https://www.spec.org/cpu2006/) thus, it cannot be freely distributed.\nConsult individual copyright notices of source files in [`src/spec-2006`](\nhttps://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/spec-2006).\n* **spec 2017**: SPEC CPU 2017 requires purchase of benchmark suite from\n[SPEC](https://www.spec.org/cpu2017/) thus, it cannot be freely distributed.\nConsult individual copyright notices of source files in [`src/spec-2017`](\nhttps://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/spec-2017).\n* **gapbs**: Consult individual copyright notices of source files in\n[`src/gapbs`](\nhttps://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/gapbs).\n* **parsec**: The code of the [PARSEC project](\nhttps://parsec.cs.princeton.edu/)\nis covered by a 3-Clause BSD License (\n[`src/parsec/disk-image/parsec/parsec-benchmark/LICENSE`](\nhttps://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/parsec/disk-image/parsec/parsec-benchmark/LICENSE)).\nFor the remaining files, please consult copyright notices in individual source\nfiles.\n* **npb-tests**: Consult individual copyright notices of source files in\n[`src/npb`](\nhttps://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/npb).\nThe NAS Parallel Benchmarks utilize a permissive BSD-style license.\n* **x86-ubuntu**: Consult individual copyright notices of source files in\n[`src/x86-ubuntu`](\nhttps://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/x86-ubuntu).\n* **insttest**: Consult individual copyright notices of source files in\n[`src/insttest`](\nhttps://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/insttest).\n* **linux-kernel**: Consult individual copyright notices of source files in\n[`src/linux-kernel`](\nhttps://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/linux-kernel).\n* **hack-back**: Consult individual copyright notices of source files in\n[`src/hack-back`](\nhttps://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/hack-back).\n* **simple**: Consult individual copyright notices of the source files in\n[`src/simple`](\nhttps://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/simple).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgem5%2Fgem5-resources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgem5%2Fgem5-resources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgem5%2Fgem5-resources/lists"}