[gem5-dev] [XS] Change in gem5/gem5[release-staging-v23-0]: tests: Reducing json stat dump size.
Mahyar Samani has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/71402?usp=email ) Change subject: tests: Reducing json stat dump size. .. tests: Reducing json stat dump size. This change reduces the number of stats dumped as json in traffic_gen tests. Change-Id: I94becb2e6d5da6096271cf7893ff2b380314da06 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71402 Maintainer: Bobby Bruce Reviewed-by: Bobby Bruce Tested-by: kokoro --- M tests/gem5/traffic_gen/simple_traffic_run.py 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Bobby Bruce: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/tests/gem5/traffic_gen/simple_traffic_run.py b/tests/gem5/traffic_gen/simple_traffic_run.py index 7c0f188..3766d73 100644 --- a/tests/gem5/traffic_gen/simple_traffic_run.py +++ b/tests/gem5/traffic_gen/simple_traffic_run.py @@ -209,7 +209,9 @@ exit_event = m5.simulate() print(f"Exiting @ tick {m5.curTick()} because {exit_event.getCause()}.") -simstats = get_simstat(root, prepare_stats=True) +simstats = get_simstat( +[core.generator for core in generator.get_cores()], prepare_stats=True +) json_output = Path(m5.options.outdir) / "output.json" with open(json_output, "w") as stats_file: simstats.dump(stats_file, indent=2) -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71402?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: public/gem5 Gerrit-Branch: release-staging-v23-0 Gerrit-Change-Id: I94becb2e6d5da6096271cf7893ff2b380314da06 Gerrit-Change-Number: 71402 Gerrit-PatchSet: 3 Gerrit-Owner: Mahyar Samani Gerrit-Reviewer: Bobby Bruce Gerrit-Reviewer: Mahyar Samani Gerrit-Reviewer: kokoro Gerrit-CC: kokoro ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [M] Change in gem5/gem5[stable]: misc: Add weekly tests to Github workflows
Melissa Jost has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/71401?usp=email ) Change subject: misc: Add weekly tests to Github workflows .. misc: Add weekly tests to Github workflows This introduces the very-long tests from our weekly tests to be able to run within GitHub. Change-Id: I5f5b4c521b47272cb27640c572a869c26c04b95a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71401 Reviewed-by: Bobby Bruce Maintainer: Bobby Bruce Tested-by: kokoro --- A .github/workflows/weekly-tests.yaml 1 file changed, 178 insertions(+), 0 deletions(-) Approvals: Bobby Bruce: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/.github/workflows/weekly-tests.yaml b/.github/workflows/weekly-tests.yaml new file mode 100644 index 000..48fb79f --- /dev/null +++ b/.github/workflows/weekly-tests.yaml @@ -0,0 +1,178 @@ +# This workflow runs all of the very-long tests within main.py + +name: Running weekly main.py +run-name: ${{ github.actor }} is running the weekly tests + + +on: + # Runs every Sunday from 7AM UTC + schedule: +- cron: '00 7 * * 6' + # Allows us to manually start workflow for testing + workflow_dispatch: + +jobs: + build-gem5: +runs-on: [self-hosted, linux, x64, build] +container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest +outputs: + build-name: ${{ steps.artifact-name.outputs.name }} +steps: + - uses: actions/checkout@v3 +with: + # Scheduled workflows run on the default branch by default. We + # therefore need to explicitly checkout the develop branch. + ref: develop + - id: artifact-name +run: echo "name=$(date +"%Y-%m-%d_%H.%M.%S")-ALL" >> $GITHUB_OUTPUT + - name: Build gem5 +run: | + scons build/ALL/gem5.opt -j $(nproc) + - uses: actions/upload-artifact@v3 +with: + name: ${{ steps.artifact-name.outputs.name }} + path: build/ALL/gem5.opt + retention-days: 5 + - run: echo "This job's status is ${{ job.status }}." + +# start running the very-long tests + testlib-very-long-gem5_library_example_tests: +runs-on: [self-hosted, linux, x64, run] +container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest +needs: [build-gem5] +timeout-minutes: 1440 # 24 hours +steps: +- uses: actions/checkout@v3 + with: +# Scheduled workflows run on the default branch by default. We +# therefore need to explicitly checkout the develop branch. +ref: develop +- uses: actions/download-artifact@v3 + with: +name: ${{needs.build-gem5.outputs.build-name}} +path: build/ALL +- run: chmod u+x build/ALL/gem5.opt +- name: very-long gem5_library_example_tests + working-directory: ${{ github.workspace }}/tests + run: ./main.py run gem5/gem5_library_example_tests --length very-long --skip-build -vv -t $(nproc) +- name: create zip of results + if: success() || failure() + run: | +apt-get -y install zip +zip -r output.zip tests/testing-results +- name: upload zip + if: success() || failure() + uses: actions/upload-artifact@v3 + env: +MY_STEP_VAR: ${{github.job}}_COMMIT.${{github.sha}}_RUN.${{github.run_id}}_ATTEMPT.${{github.run_attempt}} + with: +name: ${{ env.MY_STEP_VAR }} +path: output.zip +retention-days: 7 +- run: echo "This job's status is ${{ job.status }}." + + + testlib-long-gem5-resources: +runs-on: [self-hosted, linux, x64, run] +container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest +needs: [build-gem5] +timeout-minutes: 1440 # 24 hours +steps: +- uses: actions/checkout@v3 + with: +# Scheduled workflows run on the default branch by default. We +# therefore need to explicitly checkout the develop branch. +ref: develop +- uses: actions/download-artifact@v3 + with: +name: ${{needs.build-gem5.outputs.build-name}} +path: build/ALL +- run: chmod u+x build/ALL/gem5.opt +- name: very-long gem5-resources tests + working-directory: ${{ github.workspace }}/tests + run: ./main.py run gem5/gem5-resources --length very-long --skip-build -vv -t $(nproc) +- name: create zip of results + if: success() || failure() + run: | +apt-get -y install zip +zip -r output.zip tests/testing-results +- name: upload zip + if: success() || failure() + uses: actions/upload-artifact@v3 + env: +MY_STEP_VAR: ${{github.job}}_COMMIT.${{github.sha}}_RUN.${{github.run_id}}_ATTEMPT.${{github.run_attempt}} + with: +name: ${{ env.MY_STEP_VAR }} +path: output.zip +retention-days: 7 +- run: echo "This job's status is ${{ job.status }}." + +
[gem5-dev] [S] Change in gem5/gem5[stable]: misc: Update GitHub yaml files
Melissa Jost has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/71400?usp=email ) Change subject: misc: Update GitHub yaml files .. misc: Update GitHub yaml files This introduces a few fixes to the yaml files, such as fixing the failing SystemC tests by removing an extra Docker container, declaring the Python version for our compiler tests, fixing typos in the GPU daily tests, and adjusting the timeout values for our compiler tests and unittests. Change-Id: I3b4f2220750138783717b3678b0d8676155cb2a1 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71400 Reviewed-by: Bobby Bruce Maintainer: Bobby Bruce Tested-by: kokoro Maintainer: Matt Sinclair Reviewed-by: Matt Sinclair --- M .github/workflows/ci-tests.yaml M .github/workflows/compiler-tests.yaml M .github/workflows/daily-tests.yaml 3 files changed, 26 insertions(+), 23 deletions(-) Approvals: Bobby Bruce: Looks good to me, approved; Looks good to me, approved Matt Sinclair: Looks good to me, but someone else must approve; Looks good to me, approved kokoro: Regressions pass diff --git a/.github/workflows/ci-tests.yaml b/.github/workflows/ci-tests.yaml index 309fefc..16c096d 100644 --- a/.github/workflows/ci-tests.yaml +++ b/.github/workflows/ci-tests.yaml @@ -8,9 +8,18 @@ types: [opened, reopened, edited] jobs: + pre-commit: +# runs on github hosted runner +runs-on: ubuntu-22.04 +steps: +- uses: actions/checkout@v3 +- uses: actions/setup-python@v3 +- uses: pre-commit/action@v3.0.0 + build-gem5: runs-on: [self-hosted, linux, x64, build] container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest +needs: pre-commit # only runs if pre-commit passes outputs: artifactname: ${{ steps.name.outputs.test }} steps: @@ -29,8 +38,8 @@ unittests-all-opt: runs-on: [self-hosted, linux, x64, run] -container: - image: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest +container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest +needs: pre-commit # only runs if pre-commit passes timeout-minutes: 60 steps: - uses: actions/checkout@v3 @@ -42,7 +51,7 @@ testlib-quick: runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest -needs: build-gem5 +needs: [pre-commit, build-gem5] timeout-minutes: 360 # 6 hours steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/compiler-tests.yaml b/.github/workflows/compiler-tests.yaml index 300f9eb..e7e9cd2 100644 --- a/.github/workflows/compiler-tests.yaml +++ b/.github/workflows/compiler-tests.yaml @@ -18,7 +18,7 @@ opts: [.opt, .fast] runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/${{ matrix.image }}:latest -timeout-minutes: 2880 # 48 hours +timeout-minutes: 240 # 4 hours steps: - uses: actions/checkout@v3 with: @@ -26,7 +26,7 @@ # therefore need to explicitly checkout the develop branch. ref: develop - name: Compile build/ALL/gem5${{ matrix.opts }} with ${{ matrix.image }} - run: scons build/ALL/gem5${{ matrix.opts }} + run: /usr/bin/env python3 /usr/bin/scons --ignore-style build/ALL/gem5${{ matrix.opts }} # Tests the two latest gcc and clang supported compilers against all gem5 compilations. latest-compilers-all-gem5-builds: @@ -37,7 +37,7 @@ opts: [.opt, .fast] runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/${{ matrix.image }}:latest -timeout-minutes: 2880 # 48 hours +timeout-minutes: 240 # 4 hours steps: - uses: actions/checkout@v3 with: @@ -45,4 +45,4 @@ # therefore need to explicitly checkout the develop branch. ref: develop - name: Compile build/${{ matrix.gem5-compilation }}/gem5${{ matrix.opts }} with ${{ matrix.image }} - run: scons build/${{ matrix.gem5-compilation }}/gem5${{ matrix.opts }} + run: /usr/bin/env python3 /usr/bin/scons --ignore-style build/${{ matrix.gem5-compilation }}/gem5${{ matrix.opts }} diff --git a/.github/workflows/daily-tests.yaml b/.github/workflows/daily-tests.yaml index 91bb7d6..97b4164 100644 --- a/.github/workflows/daily-tests.yaml +++ b/.github/workflows/daily-tests.yaml @@ -223,7 +223,7 @@ unittests-all-debug: runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest -timeout-minutes: 30 +timeout-minutes: 60 steps: - uses: actions/checkout@v3 @@ -240,7 +240,7 @@ unittests-all-fast: runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest -timeout-minutes: 30 +timeout-minutes: 60 steps: - uses: actions/checkout@v3 @@ -837,22 +837,16 @@ # therefore
[gem5-dev] [XS] Change in gem5/gem5[release-staging-v23-0]: stdlib: Add U74VecFU to U74CPU
Bobby Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/71399?usp=email ) Change subject: stdlib: Add U74VecFU to U74CPU .. stdlib: Add U74VecFU to U74CPU This change is to elimilate the warning message from U74CPU. Change-Id: I7a5d0cd0b2955e54ed14fc1ac6f7127bd7f0604b Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71238 Reviewed-by: Jason Lowe-Power Tested-by: kokoro Maintainer: Jason Lowe-Power Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71399 Maintainer: Bobby Bruce --- M src/python/gem5/prebuilt/riscvmatched/riscvmatched_core.py 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Bobby Bruce: Looks good to me, approved Jason Lowe-Power: Looks good to me, approved kokoro: Regressions pass diff --git a/src/python/gem5/prebuilt/riscvmatched/riscvmatched_core.py b/src/python/gem5/prebuilt/riscvmatched/riscvmatched_core.py index 48291bf..4b8d2c1 100644 --- a/src/python/gem5/prebuilt/riscvmatched/riscvmatched_core.py +++ b/src/python/gem5/prebuilt/riscvmatched/riscvmatched_core.py @@ -75,6 +75,10 @@ pass +class U74VecFU(MinorDefaultVecFU): +pass + + class U74FUPool(MinorFUPool): funcUnits = [ U74IntFU(), @@ -86,6 +90,7 @@ U74MemReadFU(), U74MemWriteFU(), U74MiscFU(), +U74VecFU(), ] -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71399?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: public/gem5 Gerrit-Branch: release-staging-v23-0 Gerrit-Change-Id: I7a5d0cd0b2955e54ed14fc1ac6f7127bd7f0604b Gerrit-Change-Number: 71399 Gerrit-PatchSet: 2 Gerrit-Owner: Bobby Bruce Gerrit-Reviewer: Bobby Bruce Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: kokoro Gerrit-CC: Roger Chang Gerrit-CC: kokoro ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[release-staging-v23-0]: arch-riscv,cpu-minor: Add MinorDefaultVecFU for risc-v v-ext
Bobby Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/71398?usp=email ) Change subject: arch-riscv,cpu-minor: Add MinorDefaultVecFU for risc-v v-ext .. arch-riscv,cpu-minor: Add MinorDefaultVecFU for risc-v v-ext Change-Id: Id5c5ae5fa1901154cadeb0a4958703f3f15d491f Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67295 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71398 Maintainer: Bobby Bruce --- M src/cpu/minor/BaseMinorCPU.py 1 file changed, 28 insertions(+), 0 deletions(-) Approvals: kokoro: Regressions pass Bobby Bruce: Looks good to me, approved Jason Lowe-Power: Looks good to me, approved diff --git a/src/cpu/minor/BaseMinorCPU.py b/src/cpu/minor/BaseMinorCPU.py index bd27b92..c20a310 100644 --- a/src/cpu/minor/BaseMinorCPU.py +++ b/src/cpu/minor/BaseMinorCPU.py @@ -250,6 +250,33 @@ opLat = 1 +class MinorDefaultVecFU(MinorFU): +opClasses = minorMakeOpClassSet( +[ +"VectorUnitStrideLoad", +"VectorUnitStrideStore", +"VectorUnitStrideMaskLoad", +"VectorUnitStrideMaskStore", +"VectorStridedLoad", +"VectorStridedStore", +"VectorIndexedLoad", +"VectorIndexedStore", +"VectorUnitStrideFaultOnlyFirstLoad", +"VectorWholeRegisterLoad", +"VectorWholeRegisterStore", +"VectorIntegerArith", +"VectorFloatArith", +"VectorFloatConvert", +"VectorIntegerReduce", +"VectorFloatReduce", +"VectorMisc", +"VectorIntegerExtension", +"VectorConfig", +] +) +opLat = 1 + + class MinorDefaultFUPool(MinorFUPool): funcUnits = [ MinorDefaultIntFU(), @@ -260,6 +287,7 @@ MinorDefaultPredFU(), MinorDefaultMemFU(), MinorDefaultMiscFU(), +MinorDefaultVecFU(), ] -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71398?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: public/gem5 Gerrit-Branch: release-staging-v23-0 Gerrit-Change-Id: Id5c5ae5fa1901154cadeb0a4958703f3f15d491f Gerrit-Change-Number: 71398 Gerrit-PatchSet: 2 Gerrit-Owner: Bobby Bruce Gerrit-Reviewer: Bobby Bruce Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Zhengrong Wang Gerrit-Reviewer: kokoro Gerrit-CC: kokoro Gerrit-CC: 轩胡 ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [L] Change in gem5/gem5[develop]: util: Add util for GitHub runner configuration
Bobby Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/71098?usp=email ) Change subject: util: Add util for GitHub runner configuration .. util: Add util for GitHub runner configuration This adds files that can be used to configure Vagrant machines that will be used to test running gem5 alongside Github Actions. Change-Id: I52b0f39b6e6044c22481f02163d5fc01eab76788 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71098 Reviewed-by: Bobby Bruce Maintainer: Bobby Bruce Tested-by: kokoro --- A util/github-runners-vagrant/README.md A util/github-runners-vagrant/Vagrantfile-builder A util/github-runners-vagrant/Vagrantfile-runner A util/github-runners-vagrant/provision_nonroot.sh A util/github-runners-vagrant/provision_root.sh A util/github-runners-vagrant/vm_manager.sh 6 files changed, 312 insertions(+), 0 deletions(-) Approvals: Bobby Bruce: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/util/github-runners-vagrant/README.md b/util/github-runners-vagrant/README.md new file mode 100644 index 000..86b9e1d --- /dev/null +++ b/util/github-runners-vagrant/README.md @@ -0,0 +1,118 @@ +# Setting up a Github Actions Runner with Vagrant + +This directory provides a way to setup a Github Actions runner using Vagrant to host the runner in a Virtual machine. + +This tutorial has been written with the assumption of running on a machine with Ubuntu 22.04. +Setting up a runner on a different OS may require some changes. + +Before anything else, copy this directory, "util/github-runners-vagrant", to the root of the location on your host system you wish to setup the VMs from. +The CWD is assumed to be this directory. + +## Install Dependencies + +```sh +sudo apt install vagrant +sudo apt-get build-dep vagrant ruby-libvirt +sudo apt-get install qemu libvirt-daemon-system libvirt-clients ebtables dnsmasq-base libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev + +# Note: The vagrant-libvirt APT package does not work as intended. We must +# remove it from the system otherwise errors will occur (we will install it +# later using the vagrant plugin command). +sudo apt purge vagrant-libvirt +``` + +## Set up the Vagrantfiles for the GitHub repository + +First, generate a Personal Access Token, which you can create [here](https://github.com/settings/tokens) +Make sure to set admin permissions on this token, then replace instances of `` in the Vagrantfiles ("Vagrantfile-builder" and "Vagrant-runner") with your token. + +Next, replace instances of `` with your GitHub account name and the repository name, separated by a forward slash. +For example, if your GitHub account name is `example` and your repository name is `example-repo`, you would replace `` with `example/example-repo`. + +## Install Vagrant Plugins + +Once everything is set properly, set the `VAGRANT_HOME` environment variable to the directory in which the Vagrant files and other scripts are stored (i.e., the CWD). +For example: + +```sh +export VAGRANT_HOME=`pwd` +``` + +After this, install the relevant vagrant plugins: + +``` sh +vagrant plugin install dotenv +vagrant plugin install vagrant-libvirt +vagrant plugin install vagrant-reload +``` + +## The "builder" and "runner" VMs + +The number of CPUs and the memory size differs between the "Vagrantfile-builder" and "Vagrantfile-runner". + +In our work we have two types of machines "runners" and "builders". +Runners are single core machines with 8GB of memory, and builders are 4 core machines with 16GB of memory. +The latter is used for building gem5 binaries while the former is used for running instances of gem5. +You can expect each machine to take up approximately 60GB of disk space though VMs will consume the disk space they require. + +The "Vagrantfile-builder" file is set to create a runner machine and the "Vagrantfile-builder" file is set to create a builder machine. + +Specifying which Vagrantfile to use is done by setting the `VAGRANT_VAGRANTFILE` environment variable. + +## Creating the virtual machine + +Each VM on your host system must have a unique name. +Give the VM to be created a unique name by setting the `` variables in the Vagrantfile you wish to utilize. + +Then run: + +```sh +VAGRANT_VAGRANTFILE= vagrant up --provider=libvirt +``` + +This should automatically create your machine, as well as configure and start up a Github Actions runner. +You can check the status of the runner here: https://github.com///settings/actions/runners + +If the runner ever shows as offline, you can rerun the `vagrant up --provider=libvirt` command to make sure everything is working properly. + +If you wish to create more than one runner you must edit the `` in the Vagrant file. + +## Helper scripts + +The "vm_manager" script can be used to set up multiple builder and
[gem5-dev] [gem5 on GitHub] Explaining our new testing infrastructure: GitHub Actions, Runners, and current limitations
Dear all, As you are likely aware, we will be migrating to GitHub, form Gerrit, soon. Some have reached out to me with questions about the testing infrastructure on GitHub and how it may be used and improved. I shall do so in this email. GitHub allows for testing via its “Actions” infrastructure. GitHub Actions consists of “Workflows” specifies a set of jobs to be run that is executed on a specific event. GitHub Actions supports a wide range of these events from pull request creation, through to specific keywords appearing comments, simple scheduled runs and many more. The jobs the workflow specify run commands in a series steps and it is highly flexible for a large number of automation tasks. Some repos automatically moderate discussion threads, and others use it to build and deploy their service. Right now we are just using them to run tests. GitHub looks for GitHub Actions specified in a yaml format in “./github/workflows". Our current workload yaml file can be found here: https://github.com/gem5/gem5/blob/ad0a2d1beaa043c03c0e43406078b3a09a3861ac/.github/workflows/. There are many resources online explaining how to create yaml files to specific jobs and triggered on specific events so I won’t go into further details than this high-level description. There is one small limitation with GitHub Actions which we will need to change procedures for. GitHub only reads the yaml files on the repository’s main branch. This means if we want to update which tests are run, or how they are run, we need to update the stable branch. After some discussion we believe the best policy will be to permit patches to be submitted to the stable branch between releases for changes to these yaml files. Since these files do not affect the compilation or running of gem5, the stable branch is still “stable” with respect to the end user's interaction with gem5. Jobs run on “runners". A runner is just a server which accepts GitHub jobs to run. They run one job at one time. Typically you would pay GitHub to use their runners as most actions complete in a matter of seconds so incur little cost. That won’t work for us as some of our tests take days to complete. Fortunately GitHub allows for “self-hosted runners”. With tooling provided by GitHub you can setup a runner on any machine you want and point it towards the git repository it is to accept job requests from. There is one big problem with this: A self-hosted runner is not secure. With the right job specification you can execute whatever you want on the host hardware. A smaller annoyance is GitHub makes it hard, but not impossible, to run more than one runner per machine, which is annoying when ideally you want several runners to be executing jobs in parallel on machines that can handle them. Our solution to this is runners setup in virtual machines. We attempted to utilize Kubernetes for this for us but found it’s more tailored towards large cloud-based clusters where as we want to utilize a smaller number of servers at our disposal. After some trial and error we decided it wasn’t the right tool for the job. Moving on from this we opted to use Vagrant to create VMs to host the runners. I have documented all the scripts I used to do this here: https://gem5-review.googlesource.com/c/public/gem5/+/71098. You can consult the “README.md” on procedures to setup your own runners. Though I have created some scripts to semi-automated the process, it’s still quite manual. It would be nice if there was a more “push button” way to do deploy runners. In a similar vain, if they break we have to manually go in and restart them. There’s room for improvement here. Right now we have two types of VM’s: “builders” and “runners”. Builders are 4-core 16GB VMs with their primarily purpose being to build gem5. Runners are single-core 6GB VMs with their purpose being to run instances of gem5. Aiming for a rough 6 to 1 ratio we have 26 runners and 4 builders spread over 3 machines though this is very lopsided as 1 of our machines hosts 20 runners. In the yaml file the jobs are distributed to either a runner or builder based on the “run-on” field. Though this setup is currently functional, it does have some restrictions and pain-points. Of note: - We do not have a runner which can run KVM tests. For the meantime these are skipped. We’re not sure how feasible putting a runner in a VM which will allow KVM is. - Due to the Weekly GPU tests needing a special docker container built in the tests, we need more time to figure out how to do this. At present we get errors but are working finding a solution. - We do not have good tools to orchestrate these VMs. If they go down and they need restarted, or new VMs need created, it requires manual effort. - 20 of our runners are on a single machine. It’d be much better to have a more distributed set of runners. - All our machines are X86. It it may be of value to have some ARM hosts too. Particularly to
[gem5-dev] [XS] Change in gem5/gem5[develop]: configs: GPUFS: Only use parallel eventqs for KVM
Matthew Poremba has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/71419?usp=email ) Change subject: configs: GPUFS: Only use parallel eventqs for KVM .. configs: GPUFS: Only use parallel eventqs for KVM This is turned on by default with multiple CPUs in the GPUFS configs, which causes other CPU types (e.g., AtomicSimpleCPU) to assert. Only enable parallel event queues for KVM CPUs to avoid this issue. Change-Id: Ic8235437caf0150560e2b360a4544d82dfc26c36 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71419 Maintainer: Matt Sinclair Tested-by: kokoro Reviewed-by: Matt Sinclair --- M configs/example/gpufs/runfs.py 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Matt Sinclair: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/configs/example/gpufs/runfs.py b/configs/example/gpufs/runfs.py index 01203bb..b045b80 100644 --- a/configs/example/gpufs/runfs.py +++ b/configs/example/gpufs/runfs.py @@ -162,7 +162,8 @@ # GPUFS is primarily designed to use the X86 KVM CPU. This model needs to # use multiple event queues when more than one CPU is simulated. Force it # on if that is the case. -args.host_parallel = True if args.num_cpus > 1 else False +if ObjectList.is_kvm_cpu(ObjectList.cpu_list.get(args.cpu_type)): +args.host_parallel = True if args.num_cpus > 1 else False # These are used by the protocols. They should not be set by the user. n_cu = args.num_compute_units -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71419?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: Ic8235437caf0150560e2b360a4544d82dfc26c36 Gerrit-Change-Number: 71419 Gerrit-PatchSet: 2 Gerrit-Owner: Matthew Poremba Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Matt Sinclair Gerrit-Reviewer: Matthew Poremba Gerrit-Reviewer: kokoro Gerrit-CC: kokoro ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[develop]: configs,gpu-compute: Kernel dispatch-based exit events
Matthew Poremba has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/71418?usp=email ) Change subject: configs,gpu-compute: Kernel dispatch-based exit events .. configs,gpu-compute: Kernel dispatch-based exit events Add two kernel dispatch-based exit events that are useful for limiting the simulation and enabling debug flags at specific GPU kernels. Since the KVM CPU typically used with GPUFS is not deterministic, this help with enabling debug flags when the Tick number may vary. The exit at GPU kernel option can also limit simulation by only simulating a few hundred kernels, for example, and exit at a determined point. Change-Id: I81bae92a80c25fc38c41e999aa662e1417b7a20d Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71418 Maintainer: Matt Sinclair Tested-by: kokoro Reviewed-by: Matt Sinclair --- M configs/example/gpufs/runfs.py M src/gpu-compute/dispatcher.cc 2 files changed, 30 insertions(+), 0 deletions(-) Approvals: Matt Sinclair: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/configs/example/gpufs/runfs.py b/configs/example/gpufs/runfs.py index f8ef70d..01203bb 100644 --- a/configs/example/gpufs/runfs.py +++ b/configs/example/gpufs/runfs.py @@ -137,6 +137,20 @@ "MI200 (gfx90a)", ) +parser.add_argument( +"--debug-at-gpu-kernel", +type=int, +default=-1, +help="Turn on debug flags starting with this kernel", +) + +parser.add_argument( +"--exit-at-gpu-kernel", +type=int, +default=-1, +help="Exit simulation after running this many kernels", +) + def runGpuFSSystem(args): """ @@ -184,6 +198,9 @@ print("Running the simulation") sim_ticks = args.abs_max_tick +kernels_launched = 0 +if args.debug_at_gpu_kernel != -1: +m5.trace.disable() exit_event = m5.simulate(sim_ticks) @@ -199,11 +216,21 @@ assert args.checkpoint_dir is not None m5.checkpoint(args.checkpoint_dir) break +elif "GPU Kernel Completed" in exit_event.getCause(): +kernels_launched += 1 else: print( f"Unknown exit event: {exit_event.getCause()}. Continuing..." ) +if kernels_launched == args.debug_at_gpu_kernel: +m5.trace.enable() +if kernels_launched == args.exit_at_gpu_kernel: +print(f"Exiting @ GPU kernel {kernels_launched}") +break + +exit_event = m5.simulate(sim_ticks - m5.curTick()) + print( "Exiting @ tick %i because %s" % (m5.curTick(), exit_event.getCause()) ) diff --git a/src/gpu-compute/dispatcher.cc b/src/gpu-compute/dispatcher.cc index a76ba7c..b19bccc 100644 --- a/src/gpu-compute/dispatcher.cc +++ b/src/gpu-compute/dispatcher.cc @@ -40,6 +40,7 @@ #include "gpu-compute/hsa_queue_entry.hh" #include "gpu-compute/shader.hh" #include "gpu-compute/wavefront.hh" +#include "sim/sim_exit.hh" #include "sim/syscall_emul_buf.hh" #include "sim/system.hh" @@ -330,6 +331,8 @@ DPRINTF(GPUWgLatency, "Kernel Complete ticks:%d kernel:%d\n", curTick(), kern_id); DPRINTF(GPUKernelInfo, "Completed kernel %d\n", kern_id); + +exitSimLoop("GPU Kernel Completed"); } if (!tickEvent.scheduled()) { -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71418?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I81bae92a80c25fc38c41e999aa662e1417b7a20d Gerrit-Change-Number: 71418 Gerrit-PatchSet: 2 Gerrit-Owner: Matthew Poremba Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Matt Sinclair Gerrit-Reviewer: Matthew Poremba Gerrit-Reviewer: kokoro Gerrit-CC: VISHNU RAMADAS Gerrit-CC: kokoro ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [XS] Change in gem5/gem5[develop]: tests: Reducing json stat dump size.
Bobby Bruce has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71438?usp=email ) Change subject: tests: Reducing json stat dump size. .. tests: Reducing json stat dump size. This change reduces the number of stats dumped as json in traffic_gen tests. Change-Id: I94becb2e6d5da6096271cf7893ff2b380314da06 --- M tests/gem5/traffic_gen/simple_traffic_run.py 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/gem5/traffic_gen/simple_traffic_run.py b/tests/gem5/traffic_gen/simple_traffic_run.py index 7c0f188..bbb517e 100644 --- a/tests/gem5/traffic_gen/simple_traffic_run.py +++ b/tests/gem5/traffic_gen/simple_traffic_run.py @@ -209,7 +209,7 @@ exit_event = m5.simulate() print(f"Exiting @ tick {m5.curTick()} because {exit_event.getCause()}.") -simstats = get_simstat(root, prepare_stats=True) +simstats = get_simstat([core.generator for core in generator.get_cores()], prepare_stats=True) json_output = Path(m5.options.outdir) / "output.json" with open(json_output, "w") as stats_file: simstats.dump(stats_file, indent=2) -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71438?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I94becb2e6d5da6096271cf7893ff2b380314da06 Gerrit-Change-Number: 71438 Gerrit-PatchSet: 1 Gerrit-Owner: Bobby Bruce Gerrit-CC: Mahyar Samani ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [XS] Change in gem5/gem5[release-staging-v23-0]: tests: Reducing json stat dump size.
Mahyar Samani has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71402?usp=email ) Change subject: tests: Reducing json stat dump size. .. tests: Reducing json stat dump size. This change reduces the number of stats dumped as json in traffic_gen tests. Change-Id: I94becb2e6d5da6096271cf7893ff2b380314da06 --- M tests/gem5/traffic_gen/simple_traffic_run.py 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/gem5/traffic_gen/simple_traffic_run.py b/tests/gem5/traffic_gen/simple_traffic_run.py index 7c0f188..bbb517e 100644 --- a/tests/gem5/traffic_gen/simple_traffic_run.py +++ b/tests/gem5/traffic_gen/simple_traffic_run.py @@ -209,7 +209,7 @@ exit_event = m5.simulate() print(f"Exiting @ tick {m5.curTick()} because {exit_event.getCause()}.") -simstats = get_simstat(root, prepare_stats=True) +simstats = get_simstat([core.generator for core in generator.get_cores()], prepare_stats=True) json_output = Path(m5.options.outdir) / "output.json" with open(json_output, "w") as stats_file: simstats.dump(stats_file, indent=2) -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71402?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: release-staging-v23-0 Gerrit-Change-Id: I94becb2e6d5da6096271cf7893ff2b380314da06 Gerrit-Change-Number: 71402 Gerrit-PatchSet: 1 Gerrit-Owner: Mahyar Samani ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[stable]: misc: Update GitHub yaml files
Melissa Jost has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71400?usp=email ) Change subject: misc: Update GitHub yaml files .. misc: Update GitHub yaml files This introduces a few fixes to the yaml files, such as fixing the failing SystemC tests by removing an extra Docker container, declaring the Python version for our compiler tests, fixing typos in the GPU daily tests, and adjusting the timeout values for our compiler tests and unittests. Change-Id: I3b4f2220750138783717b3678b0d8676155cb2a1 --- M .github/workflows/ci-tests.yaml M .github/workflows/compiler-tests.yaml M .github/workflows/daily-tests.yaml 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci-tests.yaml b/.github/workflows/ci-tests.yaml index 309fefc..16c096d 100644 --- a/.github/workflows/ci-tests.yaml +++ b/.github/workflows/ci-tests.yaml @@ -8,9 +8,18 @@ types: [opened, reopened, edited] jobs: + pre-commit: +# runs on github hosted runner +runs-on: ubuntu-22.04 +steps: +- uses: actions/checkout@v3 +- uses: actions/setup-python@v3 +- uses: pre-commit/action@v3.0.0 + build-gem5: runs-on: [self-hosted, linux, x64, build] container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest +needs: pre-commit # only runs if pre-commit passes outputs: artifactname: ${{ steps.name.outputs.test }} steps: @@ -29,8 +38,8 @@ unittests-all-opt: runs-on: [self-hosted, linux, x64, run] -container: - image: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest +container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest +needs: pre-commit # only runs if pre-commit passes timeout-minutes: 60 steps: - uses: actions/checkout@v3 @@ -42,7 +51,7 @@ testlib-quick: runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest -needs: build-gem5 +needs: [pre-commit, build-gem5] timeout-minutes: 360 # 6 hours steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/compiler-tests.yaml b/.github/workflows/compiler-tests.yaml index 300f9eb..57401f4 100644 --- a/.github/workflows/compiler-tests.yaml +++ b/.github/workflows/compiler-tests.yaml @@ -18,7 +18,7 @@ opts: [.opt, .fast] runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/${{ matrix.image }}:latest -timeout-minutes: 2880 # 48 hours +timeout-minutes: 240 # 4 hours steps: - uses: actions/checkout@v3 with: @@ -37,7 +37,7 @@ opts: [.opt, .fast] runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/${{ matrix.image }}:latest -timeout-minutes: 2880 # 48 hours +timeout-minutes: 240 # 4 hours steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/daily-tests.yaml b/.github/workflows/daily-tests.yaml index 91bb7d6..97b4164 100644 --- a/.github/workflows/daily-tests.yaml +++ b/.github/workflows/daily-tests.yaml @@ -223,7 +223,7 @@ unittests-all-debug: runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest -timeout-minutes: 30 +timeout-minutes: 60 steps: - uses: actions/checkout@v3 @@ -240,7 +240,7 @@ unittests-all-fast: runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest -timeout-minutes: 30 +timeout-minutes: 60 steps: - uses: actions/checkout@v3 @@ -837,22 +837,16 @@ # therefore need to explicitly checkout the develop branch. ref: develop - name: Build ARM/gem5.opt - uses: docker://gcr.io/gem5-test/ubuntu-22.04_min-dependencies:latest - # This is a bit of a hack so we can run a different docker container. - with: -args: scons --ignore-style --duplicate-sources -j4 build/ARM/gem5.opt + run: scons build/ARM/gem5.opt --ignore-style --duplicate-sources -j$(nproc) - name: Build ARM/libgem5_opt.so - uses: docker://gcr.io/gem5-test/ubuntu-22.04_min-dependencies:latest - # This is a bit of a hack so we can run a different docker container. - with: -args: scons --with-cxx-config --without-python --without-tcmalloc USE_SYSTEMC=0 -j4 --duplicate-sources build/ARM/libgem5_opt.so + run: scons build/ARM/libgem5_opt.so --with-cxx-config --without-python --without-tcmalloc USE_SYSTEMC=0 -j$(nproc) --duplicate-sources - name: Compile gem5 withing SystemC working-directory: ${{ github.workspace }}/util/systemc/gem5_within_systemc run: make - name: Run gem5 within SystemC test run: ./build/ARM/gem5.opt configs/deprecated/example/se.py -c tests/test-progs/hello/bin/arm/linux/hello -- name: bla - run:
[gem5-dev] [M] Change in gem5/gem5[stable]: misc: Add weekly tests to Github workflows
Melissa Jost has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71401?usp=email ) Change subject: misc: Add weekly tests to Github workflows .. misc: Add weekly tests to Github workflows This introduces the very-long tests from our weekly tests to be able to run within GitHub. Change-Id: I5f5b4c521b47272cb27640c572a869c26c04b95a --- A .github/workflows/weekly-tests.yaml 1 file changed, 178 insertions(+), 0 deletions(-) diff --git a/.github/workflows/weekly-tests.yaml b/.github/workflows/weekly-tests.yaml new file mode 100644 index 000..48fb79f --- /dev/null +++ b/.github/workflows/weekly-tests.yaml @@ -0,0 +1,178 @@ +# This workflow runs all of the very-long tests within main.py + +name: Running weekly main.py +run-name: ${{ github.actor }} is running the weekly tests + + +on: + # Runs every Sunday from 7AM UTC + schedule: +- cron: '00 7 * * 6' + # Allows us to manually start workflow for testing + workflow_dispatch: + +jobs: + build-gem5: +runs-on: [self-hosted, linux, x64, build] +container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest +outputs: + build-name: ${{ steps.artifact-name.outputs.name }} +steps: + - uses: actions/checkout@v3 +with: + # Scheduled workflows run on the default branch by default. We + # therefore need to explicitly checkout the develop branch. + ref: develop + - id: artifact-name +run: echo "name=$(date +"%Y-%m-%d_%H.%M.%S")-ALL" >> $GITHUB_OUTPUT + - name: Build gem5 +run: | + scons build/ALL/gem5.opt -j $(nproc) + - uses: actions/upload-artifact@v3 +with: + name: ${{ steps.artifact-name.outputs.name }} + path: build/ALL/gem5.opt + retention-days: 5 + - run: echo "This job's status is ${{ job.status }}." + +# start running the very-long tests + testlib-very-long-gem5_library_example_tests: +runs-on: [self-hosted, linux, x64, run] +container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest +needs: [build-gem5] +timeout-minutes: 1440 # 24 hours +steps: +- uses: actions/checkout@v3 + with: +# Scheduled workflows run on the default branch by default. We +# therefore need to explicitly checkout the develop branch. +ref: develop +- uses: actions/download-artifact@v3 + with: +name: ${{needs.build-gem5.outputs.build-name}} +path: build/ALL +- run: chmod u+x build/ALL/gem5.opt +- name: very-long gem5_library_example_tests + working-directory: ${{ github.workspace }}/tests + run: ./main.py run gem5/gem5_library_example_tests --length very-long --skip-build -vv -t $(nproc) +- name: create zip of results + if: success() || failure() + run: | +apt-get -y install zip +zip -r output.zip tests/testing-results +- name: upload zip + if: success() || failure() + uses: actions/upload-artifact@v3 + env: +MY_STEP_VAR: ${{github.job}}_COMMIT.${{github.sha}}_RUN.${{github.run_id}}_ATTEMPT.${{github.run_attempt}} + with: +name: ${{ env.MY_STEP_VAR }} +path: output.zip +retention-days: 7 +- run: echo "This job's status is ${{ job.status }}." + + + testlib-long-gem5-resources: +runs-on: [self-hosted, linux, x64, run] +container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest +needs: [build-gem5] +timeout-minutes: 1440 # 24 hours +steps: +- uses: actions/checkout@v3 + with: +# Scheduled workflows run on the default branch by default. We +# therefore need to explicitly checkout the develop branch. +ref: develop +- uses: actions/download-artifact@v3 + with: +name: ${{needs.build-gem5.outputs.build-name}} +path: build/ALL +- run: chmod u+x build/ALL/gem5.opt +- name: very-long gem5-resources tests + working-directory: ${{ github.workspace }}/tests + run: ./main.py run gem5/gem5-resources --length very-long --skip-build -vv -t $(nproc) +- name: create zip of results + if: success() || failure() + run: | +apt-get -y install zip +zip -r output.zip tests/testing-results +- name: upload zip + if: success() || failure() + uses: actions/upload-artifact@v3 + env: +MY_STEP_VAR: ${{github.job}}_COMMIT.${{github.sha}}_RUN.${{github.run_id}}_ATTEMPT.${{github.run_attempt}} + with: +name: ${{ env.MY_STEP_VAR }} +path: output.zip +retention-days: 7 +- run: echo "This job's status is ${{ job.status }}." + + testlib-very-long-parsec-benchmarks: +runs-on: [self-hosted, linux, x64, run] +container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest +needs: build-gem5 +timeout-minutes: 1440 # 24 hours +steps: +- uses:
[gem5-dev] [XS] Change in gem5/gem5[release-staging-v23-0]: scons: Fix grpc protobuf actions
Bobby Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/71338?usp=email ) Change subject: scons: Fix grpc protobuf actions .. scons: Fix grpc protobuf actions The change will fix the proto import issue and build issue with --no-duplicate-sources options, more details please reference: https://gem5-review.googlesource.com/c/public/gem5/+/64491. Change-Id: I259413f7739f89598dcd42c3f2e1e865cec3de43 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71318 Reviewed-by: Jason Lowe-Power Tested-by: kokoro Maintainer: Jason Lowe-Power Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71338 Reviewed-by: Bobby Bruce Maintainer: Bobby Bruce --- M src/SConscript 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Bobby Bruce: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/src/SConscript b/src/SConscript index 13f08d2..d26bf49 100644 --- a/src/SConscript +++ b/src/SConscript @@ -280,9 +280,9 @@ root, ext = os.path.splitext(source[0].get_abspath()) return [root + '.grpc.pb.cc', root + '.grpc.pb.h'], source -protoc_grpc_action=MakeAction('${PROTOC} --grpc_out ${BUILDDIR} ' -'--plugin=protoc-gen-grpc=${PROTOC_GRPC} --proto_path ${BUILDDIR} ' -'${SOURCE.get_abspath()}', +protoc_grpc_action=MakeAction('${PROTOC} --grpc_out ${TARGET.dir.abspath} ' +'--plugin=protoc-gen-grpc=${PROTOC_GRPC} ' +'--proto_path ${SOURCE.dir.abspath} ${SOURCE.abspath}', Transform("PROTOC")) env.Append(BUILDERS={'GrpcProtoBufCC' : Builder( -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71338?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: public/gem5 Gerrit-Branch: release-staging-v23-0 Gerrit-Change-Id: I259413f7739f89598dcd42c3f2e1e865cec3de43 Gerrit-Change-Number: 71338 Gerrit-PatchSet: 4 Gerrit-Owner: Bobby Bruce Gerrit-Reviewer: Bobby Bruce Gerrit-Reviewer: Gabe Black Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: kokoro Gerrit-CC: Roger Chang Gerrit-CC: kokoro ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[develop]: configs,gpu-compute: Kernel dispatch-based exit events
Matthew Poremba has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71418?usp=email ) Change subject: configs,gpu-compute: Kernel dispatch-based exit events .. configs,gpu-compute: Kernel dispatch-based exit events Add two kernel dispatch-based exit events that are useful for limiting the simulation and enabling debug flags at specific GPU kernels. Since the KVM CPU typically used with GPUFS is not deterministic, this help with enabling debug flags when the Tick number may vary. The exit at GPU kernel option can also limit simulation by only simulating a few hundred kernels, for example, and exit at a determined point. Change-Id: I81bae92a80c25fc38c41e999aa662e1417b7a20d --- M configs/example/gpufs/runfs.py M src/gpu-compute/dispatcher.cc 2 files changed, 30 insertions(+), 0 deletions(-) diff --git a/configs/example/gpufs/runfs.py b/configs/example/gpufs/runfs.py index f8ef70d..01203bb 100644 --- a/configs/example/gpufs/runfs.py +++ b/configs/example/gpufs/runfs.py @@ -137,6 +137,20 @@ "MI200 (gfx90a)", ) +parser.add_argument( +"--debug-at-gpu-kernel", +type=int, +default=-1, +help="Turn on debug flags starting with this kernel", +) + +parser.add_argument( +"--exit-at-gpu-kernel", +type=int, +default=-1, +help="Exit simulation after running this many kernels", +) + def runGpuFSSystem(args): """ @@ -184,6 +198,9 @@ print("Running the simulation") sim_ticks = args.abs_max_tick +kernels_launched = 0 +if args.debug_at_gpu_kernel != -1: +m5.trace.disable() exit_event = m5.simulate(sim_ticks) @@ -199,11 +216,21 @@ assert args.checkpoint_dir is not None m5.checkpoint(args.checkpoint_dir) break +elif "GPU Kernel Completed" in exit_event.getCause(): +kernels_launched += 1 else: print( f"Unknown exit event: {exit_event.getCause()}. Continuing..." ) +if kernels_launched == args.debug_at_gpu_kernel: +m5.trace.enable() +if kernels_launched == args.exit_at_gpu_kernel: +print(f"Exiting @ GPU kernel {kernels_launched}") +break + +exit_event = m5.simulate(sim_ticks - m5.curTick()) + print( "Exiting @ tick %i because %s" % (m5.curTick(), exit_event.getCause()) ) diff --git a/src/gpu-compute/dispatcher.cc b/src/gpu-compute/dispatcher.cc index a76ba7c..b19bccc 100644 --- a/src/gpu-compute/dispatcher.cc +++ b/src/gpu-compute/dispatcher.cc @@ -40,6 +40,7 @@ #include "gpu-compute/hsa_queue_entry.hh" #include "gpu-compute/shader.hh" #include "gpu-compute/wavefront.hh" +#include "sim/sim_exit.hh" #include "sim/syscall_emul_buf.hh" #include "sim/system.hh" @@ -330,6 +331,8 @@ DPRINTF(GPUWgLatency, "Kernel Complete ticks:%d kernel:%d\n", curTick(), kern_id); DPRINTF(GPUKernelInfo, "Completed kernel %d\n", kern_id); + +exitSimLoop("GPU Kernel Completed"); } if (!tickEvent.scheduled()) { -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71418?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I81bae92a80c25fc38c41e999aa662e1417b7a20d Gerrit-Change-Number: 71418 Gerrit-PatchSet: 1 Gerrit-Owner: Matthew Poremba ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [XS] Change in gem5/gem5[develop]: configs: GPUFS: Only use parallel eventqs for KVM
Matthew Poremba has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71419?usp=email ) Change subject: configs: GPUFS: Only use parallel eventqs for KVM .. configs: GPUFS: Only use parallel eventqs for KVM This is turned on by default with multiple CPUs in the GPUFS configs, which causes other CPU types (e.g., AtomicSimpleCPU) to assert. Only enable parallel event queues for KVM CPUs to avoid this issue. Change-Id: Ic8235437caf0150560e2b360a4544d82dfc26c36 --- M configs/example/gpufs/runfs.py 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/example/gpufs/runfs.py b/configs/example/gpufs/runfs.py index 01203bb..b045b80 100644 --- a/configs/example/gpufs/runfs.py +++ b/configs/example/gpufs/runfs.py @@ -162,7 +162,8 @@ # GPUFS is primarily designed to use the X86 KVM CPU. This model needs to # use multiple event queues when more than one CPU is simulated. Force it # on if that is the case. -args.host_parallel = True if args.num_cpus > 1 else False +if ObjectList.is_kvm_cpu(ObjectList.cpu_list.get(args.cpu_type)): +args.host_parallel = True if args.num_cpus > 1 else False # These are used by the protocols. They should not be set by the user. n_cu = args.num_compute_units -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71419?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: Ic8235437caf0150560e2b360a4544d82dfc26c36 Gerrit-Change-Number: 71419 Gerrit-PatchSet: 1 Gerrit-Owner: Matthew Poremba ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[release-staging-v23-0]: tests: Fix bugs related to gem5 Vision
Bobby Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/71378?usp=email ) Change subject: tests: Fix bugs related to gem5 Vision .. tests: Fix bugs related to gem5 Vision This patch fixes refs under tests/pyunit/stdlib/resources. Removes instances of {url_base} in refs. Also, renames two refs: mongo_mock and mongo_dup_mock to mongo-mock and mongo-dup-mock to follow naming convention of other refs. Change-Id: If115114bc7a89764e7c546b77a93d36d6a3b5f8a Co-authored-by: Parth Shah Co-authored-by: Harshil2107 Co-authored-by: aarsli Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71378 Tested-by: kokoro Reviewed-by: Bobby Bruce Maintainer: Bobby Bruce --- M tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py R tests/pyunit/stdlib/resources/refs/mongo-dup-mock.json R tests/pyunit/stdlib/resources/refs/mongo-mock.json M tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json M tests/pyunit/stdlib/resources/refs/workload-checks.json 5 files changed, 5 insertions(+), 5 deletions(-) Approvals: Bobby Bruce: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py b/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py index 96aadf6..344f67b 100644 --- a/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py +++ b/tests/pyunit/stdlib/resources/pyunit_client_wrapper_checks.py @@ -82,12 +82,12 @@ mock_json = {} -with open(Path(__file__).parent / "refs/mongo_mock.json", "r") as f: +with open(Path(__file__).parent / "refs/mongo-mock.json", "r") as f: mock_json = json.load(f) duplicate_mock_json = {} -with open(Path(__file__).parent / "refs/mongo_dup_mock.json", "r") as f: +with open(Path(__file__).parent / "refs/mongo-dup-mock.json", "r") as f: duplicate_mock_json = json.load(f) diff --git a/tests/pyunit/stdlib/resources/refs/mongo_dup_mock.json b/tests/pyunit/stdlib/resources/refs/mongo-dup-mock.json similarity index 100% rename from tests/pyunit/stdlib/resources/refs/mongo_dup_mock.json rename to tests/pyunit/stdlib/resources/refs/mongo-dup-mock.json diff --git a/tests/pyunit/stdlib/resources/refs/mongo_mock.json b/tests/pyunit/stdlib/resources/refs/mongo-mock.json similarity index 100% rename from tests/pyunit/stdlib/resources/refs/mongo_mock.json rename to tests/pyunit/stdlib/resources/refs/mongo-mock.json diff --git a/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json b/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json index 8349b92..a7e9c9d 100644 --- a/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json +++ b/tests/pyunit/stdlib/resources/refs/workload-checks-custom-workload.json @@ -6,7 +6,7 @@ "architecture": "X86", "is_zipped": false, "md5sum": "dbf120338b37153e3334603970cebd8c", -"url": "{url_base}/test-progs/hello/bin/x86/linux/hello64-static", +"url": "http://dist.gem5.org/dist/develop/test-progs/hello/bin/x86/linux/hello64-static;, "source": "src/simple", "resource_version": "1.0.0", "gem5_versions": [ diff --git a/tests/pyunit/stdlib/resources/refs/workload-checks.json b/tests/pyunit/stdlib/resources/refs/workload-checks.json index d19396b..d41001d 100644 --- a/tests/pyunit/stdlib/resources/refs/workload-checks.json +++ b/tests/pyunit/stdlib/resources/refs/workload-checks.json @@ -6,7 +6,7 @@ "architecture": "X86", "is_zipped": false, "md5sum": "4838c99b77d33c8307b939c16624e4ac", -"url": "{url_base}/kernels/x86/static/vmlinux-5.2.3", +"url": "http://dist.gem5.org/dist/develop/kernels/x86/static/vmlinux-5.2.3;, "source": "src/linux-kernel", "resource_version": "1.0.0", "gem5_versions": [ @@ -20,7 +20,7 @@ "architecture": "X86", "is_zipped": true, "md5sum": "90e363abf0ddf22eefa2c7c5c9391c49", -"url": "{url_base}/images/x86/ubuntu-18-04/x86-ubuntu.img.gz", +"url": "http://dist.gem5.org/dist/develop/images/x86/ubuntu-18-04/x86-ubuntu.img.gz;, "source": "src/x86-ubuntu", "root_partition": "1", "resource_version": "1.0.0", -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71378?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: public/gem5 Gerrit-Branch: release-staging-v23-0 Gerrit-Change-Id: If115114bc7a89764e7c546b77a93d36d6a3b5f8a Gerrit-Change-Number: 71378 Gerrit-PatchSet: 2 Gerrit-Owner: Bobby Bruce Gerrit-Reviewer: Bobby Bruce Gerrit-Reviewer: kokoro Gerrit-CC: Kunal Pai Gerrit-CC: kokoro ___ gem5-dev mailing list --
[gem5-dev] [XS] Change in gem5/gem5[release-staging-v23-0]: stdlib: Add U74VecFU to U74CPU
Attention is currently required from: Jason Lowe-Power. Hello kokoro, Jason Lowe-Power, I'd like you to do a code review. Please visit https://gem5-review.googlesource.com/c/public/gem5/+/71399?usp=email to review the following change. Change subject: stdlib: Add U74VecFU to U74CPU .. stdlib: Add U74VecFU to U74CPU This change is to elimilate the warning message from U74CPU. Change-Id: I7a5d0cd0b2955e54ed14fc1ac6f7127bd7f0604b Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71238 Reviewed-by: Jason Lowe-Power Tested-by: kokoro Maintainer: Jason Lowe-Power --- M src/python/gem5/prebuilt/riscvmatched/riscvmatched_core.py 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/src/python/gem5/prebuilt/riscvmatched/riscvmatched_core.py b/src/python/gem5/prebuilt/riscvmatched/riscvmatched_core.py index 48291bf..4b8d2c1 100644 --- a/src/python/gem5/prebuilt/riscvmatched/riscvmatched_core.py +++ b/src/python/gem5/prebuilt/riscvmatched/riscvmatched_core.py @@ -75,6 +75,10 @@ pass +class U74VecFU(MinorDefaultVecFU): +pass + + class U74FUPool(MinorFUPool): funcUnits = [ U74IntFU(), @@ -86,6 +90,7 @@ U74MemReadFU(), U74MemWriteFU(), U74MiscFU(), +U74VecFU(), ] -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71399?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: release-staging-v23-0 Gerrit-Change-Id: I7a5d0cd0b2955e54ed14fc1ac6f7127bd7f0604b Gerrit-Change-Number: 71399 Gerrit-PatchSet: 1 Gerrit-Owner: Bobby Bruce Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: kokoro Gerrit-CC: Roger Chang Gerrit-Attention: Jason Lowe-Power ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[release-staging-v23-0]: arch-riscv,cpu-minor: Add MinorDefaultVecFU for risc-v v-ext
Attention is currently required from: Jason Lowe-Power. Hello kokoro, Jason Lowe-Power, I'd like you to do a code review. Please visit https://gem5-review.googlesource.com/c/public/gem5/+/71398?usp=email to review the following change. Change subject: arch-riscv,cpu-minor: Add MinorDefaultVecFU for risc-v v-ext .. arch-riscv,cpu-minor: Add MinorDefaultVecFU for risc-v v-ext Change-Id: Id5c5ae5fa1901154cadeb0a4958703f3f15d491f Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67295 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- M src/cpu/minor/BaseMinorCPU.py 1 file changed, 28 insertions(+), 0 deletions(-) diff --git a/src/cpu/minor/BaseMinorCPU.py b/src/cpu/minor/BaseMinorCPU.py index bd27b92..c20a310 100644 --- a/src/cpu/minor/BaseMinorCPU.py +++ b/src/cpu/minor/BaseMinorCPU.py @@ -250,6 +250,33 @@ opLat = 1 +class MinorDefaultVecFU(MinorFU): +opClasses = minorMakeOpClassSet( +[ +"VectorUnitStrideLoad", +"VectorUnitStrideStore", +"VectorUnitStrideMaskLoad", +"VectorUnitStrideMaskStore", +"VectorStridedLoad", +"VectorStridedStore", +"VectorIndexedLoad", +"VectorIndexedStore", +"VectorUnitStrideFaultOnlyFirstLoad", +"VectorWholeRegisterLoad", +"VectorWholeRegisterStore", +"VectorIntegerArith", +"VectorFloatArith", +"VectorFloatConvert", +"VectorIntegerReduce", +"VectorFloatReduce", +"VectorMisc", +"VectorIntegerExtension", +"VectorConfig", +] +) +opLat = 1 + + class MinorDefaultFUPool(MinorFUPool): funcUnits = [ MinorDefaultIntFU(), @@ -260,6 +287,7 @@ MinorDefaultPredFU(), MinorDefaultMemFU(), MinorDefaultMiscFU(), +MinorDefaultVecFU(), ] -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71398?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: release-staging-v23-0 Gerrit-Change-Id: Id5c5ae5fa1901154cadeb0a4958703f3f15d491f Gerrit-Change-Number: 71398 Gerrit-PatchSet: 1 Gerrit-Owner: Bobby Bruce Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: kokoro Gerrit-CC: 轩胡 Gerrit-Attention: Jason Lowe-Power ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org