Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
66e04ca
Update the schedule for 2024
powerjg May 9, 2024
6d125ef
Fix indentation in index.md
BobbyRBruce May 9, 2024
c359495
Revert "Fix indentation in index.md"
BobbyRBruce May 9, 2024
af8e82c
Fix indentation errors in index.md
BobbyRBruce May 9, 2024
d5d2e64
Move acceleration to Day 2
BobbyRBruce May 9, 2024
6fc594e
Fix title of course and description for 2024
powerjg May 10, 2024
54df6d5
Try to change link to register color
powerjg May 10, 2024
9758135
Move button and change color
powerjg May 10, 2024
0ca58a5
Add info for when the registration for 3/5 days run
powerjg May 10, 2024
6b635b4
misc: Update gem5 and gem5-resources repos to stable
powerjg Jun 18, 2024
6fcb2c7
misc: Updates to readme
powerjg Jun 18, 2024
2a13225
misc: Updated devcontainer
powerjg Jun 18, 2024
fceeb18
bootcamp: Update gem5 remotes to github
powerjg Jun 18, 2024
9bbfe26
misc: Update devcontainer based on upstream gem5
powerjg Jun 18, 2024
bdee555
misc: Fix devcontainer oncreate command
powerjg Jun 19, 2024
8669ff4
misc: Sync gem5 and gem5-resources repo
powerjg Jun 19, 2024
a2a1f5f
misc: reduce core requirement in devcontainer
powerjg Jun 17, 2024
cea1a0e
misc: remove gitlens from extensions
powerjg Jun 17, 2024
1b30d2d
misc: Use ISCA devcontainer
powerjg Jun 24, 2024
2606cec
misc: Update readme
powerjg Jun 24, 2024
b6135d8
misc: Add link to pyproject file in gem5
powerjg Jun 24, 2024
b30df7e
misc: Update gem5 to staging branch
powerjg Jun 24, 2024
c48135e
materials: Start adding ISCA materials
powerjg Jun 24, 2024
125a88a
misc: Update gem5 to latest staging
powerjg Jun 25, 2024
0508d80
misc: Update gem5-resources to latest stable
powerjg Jun 25, 2024
30b0ace
misc: Update devcontainer with black
powerjg Jun 25, 2024
0269818
misc: update default vscode settings
powerjg Jun 25, 2024
7c98a2b
materials: Working on isca scripts
powerjg Jun 25, 2024
ae484c5
materials: Finish up 01-basic.py
powerjg Jun 25, 2024
08793a6
materials: More isca 24 materials
powerjg Jun 26, 2024
d0dd52a
materials: Adding more ISCA materials
powerjg Jun 26, 2024
e727bf6
materials: adding multisim example
powerjg Jun 26, 2024
8a11a17
materials: finish adding multisim example
powerjg Jun 26, 2024
ab3652a
misc: Add automatic predownlaoding for resources
powerjg Jun 26, 2024
e64355b
misc: Update readme for gpuse
powerjg Jun 26, 2024
5170bee
misc: Add docker pull for gcn image to on_create
powerjg Jun 26, 2024
86f436d
misc: Update pre-download to actually download
powerjg Jun 26, 2024
abe10a6
misc: Fix the pre-download script
powerjg Jun 27, 2024
2a277fc
misc: Add square to download in on_create
powerjg Jun 27, 2024
054f735
misc: Add square to gitignore
powerjg Jun 27, 2024
8e26b1d
misc: Download GPU files in on_create
powerjg Jun 27, 2024
b526ad0
misc:update devcontainer to download new kernel
powerjg Jun 27, 2024
7e3427d
materials: Add simobject example
powerjg Jun 27, 2024
0c2c3f0
misc: update gitignore
powerjg Jun 28, 2024
3ad375c
misc: make post_start executable
powerjg Jun 28, 2024
010f634
misc: Fix path on post_start disk image
powerjg Jun 28, 2024
0f3f4af
misc: Bump gem5 to 24.0.0.0
powerjg Jun 28, 2024
b9649aa
materials: Update documenation for materials
powerjg Jun 28, 2024
42406ea
misc: Add gpufs README
v-ramadas Jun 28, 2024
2a6db32
misc: Add files required for checkpointing
v-ramadas Jun 28, 2024
4f77809
misc: Update README with file paths
v-ramadas Jun 28, 2024
0db56ba
misc: Fix typo in README, add m5ops build steps
v-ramadas Jun 29, 2024
f9ca63c
misc: Update checkpoint make command to "make clean && make"
v-ramadas Jun 29, 2024
43778bb
misc: Remove a few redundant cd command from GPUFS README
v-ramadas Jun 29, 2024
83491f3
Merge pull request #2 from v-ramadas/gpufs-tutorial-updates
powerjg Jun 29, 2024
d4cf948
Merge pull request #1 from gem5-ISCA24-tutorial/main
powerjg Jul 5, 2024
33af852
slides: Add initial Marp slides
powerjg Jul 5, 2024
5f90853
slides: Adding outline for 2024 bootcamp slides
powerjg Jul 5, 2024
4a473a1
[slides] Testing out draw.io
powerjg Jul 8, 2024
0d1f851
misc: Update vs code settings
powerjg Jul 8, 2024
6ef3220
slides: update slides readme
powerjg Jul 8, 2024
7ebeb0f
materials: Add outline for readme
powerjg Jul 8, 2024
118f551
slides: Update overall outline for bootcamp
powerjg Jul 8, 2024
943b80c
slides: Style updates
powerjg Jul 8, 2024
98cdbce
slides: Fix images in intro
powerjg Jul 8, 2024
c790486
slides: Add outline slides for everything
powerjg Jul 8, 2024
9401f15
misc: Fix typo in readme
powerjg Jul 8, 2024
944379b
misc: Update devcontainer with drawio extension
powerjg Jul 9, 2024
56edbaf
Merge pull request #2 from gem5bootcamp/marp-slides
powerjg Jul 9, 2024
b3d9c02
slides: Fix typos in intro/outline
powerjg Jul 9, 2024
0ba2559
slides: Add contributing section
powerjg Jul 9, 2024
384f7be
Update devcontainer.json to use v24-0 image
BobbyRBruce Jul 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .devcontainer/Dockerfile

This file was deleted.

45 changes: 33 additions & 12 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,38 @@
{
"name": "gem5 Development Container",
"image": "ghcr.io/gem5/devcontainer:v24-0",
"hostRequirements": {
"cpus": 16,
"cpus": 1,
"memory": "8gb",
"storage": "32gb"
"storage": "64gb"
},
"customizations": {
"vscode": {
"extensions": [
"GitHub.copilot",
"GitHub.copilot-chat",
"GitHub.vscode-pull-request-github",
"ms-python.debugpy",
"ms-python.isort",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cpptools-themes",
"ms-vscode.makefile-tools",
"Tsinghua-Hexin-Joint-Institute.gem5-slicc",
"ms-python.black-formatter",
"marp-team.marp-vscode",
"hediet.vscode-drawio"
]
}
},
"build": { "dockerfile": "Dockerfile" },
"onCreateCommand" : "bash ./.devcontainer/on_create.sh",
"runArgs": ["--privileged", "-v", "/var/run/docker.sock:/var/run/docker.sock", "--security-opt", "seccomp=unconfined"],
"extensions": [
"ms-vscode.cpptools",
"streetsidesoftware.code-spell-checker",
"eamodio.gitlens",
"ms-python.vscode-pylance",
"ms-python.python"
]
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers-contrib/features/actionlint:1": {},
"ghcr.io/devcontainers-contrib/features/vscode-cli:1": {}
},
"onCreateCommand": "./.devcontainer/on_create.sh",
"postStartCommand": "./.devcontainer/post_start.sh"
}
27 changes: 19 additions & 8 deletions .devcontainer/on_create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,30 @@
# Update the submodules
git submodule update --init --recursive

# Create the stubs
gem5-arm gem5_stubgen.py
gem5-x86 gem5_stubgen.py
gem5-riscv gem5_stubgen.py

mv out typings

# Setups the gem5 source directory
cd gem5
pushd gem5

## We cleanup git's 'blame' feature by ignoring certain commits (typically
## commits that have reformatted files)
git config --global blame.ignoreRevsFile .git-blame-ignore-revs

## `git pull` should rebase by default
git config --global pull.rebase true

./util/pre-commit-install.sh

popd # gem5

# Pre-download the resources we use

gem5 pre-download-resources.py

docker pull ghcr.io/gem5/gcn-gpu:v24-0

wget http://dist.gem5.org/dist/v24-0/test-progs/square/square

wget https://storage.googleapis.com/dist.gem5.org/dist/v24-0/gpu-fs/kernel/vmlinux-gpu-ml-isca

# Note: this unzips to 55 GB so must in on /tmp.
# See post_start.sh where it is unzipped each time the devcontainer starts
wget https://storage.googleapis.com/dist.gem5.org/dist/v24-0/gpu-fs/diskimage/x86-ubuntu-gpu-ml-isca.gz
8 changes: 8 additions & 0 deletions .devcontainer/post_start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if [ ! -f /tmp/x86-ubuntu-gpu-ml-isca ]; then
cp x86-ubuntu-gpu-ml-isca.gz /tmp
gunzip /tmp/x86-ubuntu-gpu-ml-isca.gz
fi

ln -s /tmp/x86-ubuntu-gpu-ml-isca .
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Ignore all m5out directories and build directories
**/m5out/
**/checkpoint/

# Jekyll stuff
_site/
Expand All @@ -12,3 +13,13 @@ typings/
.vscode/*.log

__pycache__

# Ignore downloaded files
square
vmlinux-gpu-ml-isca
x86-ubuntu-gpu-ml-isca
x86-ubuntu-gpu-ml-isca.gz

# Ignore slides
*.pdf
*.html
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "gem5"]
path = gem5
url = https://gem5.googlesource.com/public/gem5
url = https://github.com/gem5/gem5
[submodule "gem5-resources"]
path = gem5-resources
url = https://gem5.googlesource.com/public/gem5-resources
url = https://github.com/gem5/gem5-resources
19 changes: 12 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
{
"python.formatting.provider": "black",
"python.analysis.stubPath": "typings",
"python.analysis.extraPaths": ["gem5/src/python"],
"python.formatting.blackArgs": [
"--line-length",
"79"
],
"editor.rulers": [
79
]
],
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"markdown.marp.themes": [
"slides/themes/gem5.css"
],
"markdown.marp.enableHtml": true,
"hediet.vscode-drawio.globalVars": {
"pageScale": "1",
"pageWidth": "1160",
"pageHeight": "440"
}
}
49 changes: 32 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,43 @@
# gem5 bootcamp environment

This repository has been designed for use in gem5 tutorials.

It has been built with the assumption users will utilize [Codespaces](https://github.com/features/codespaces) to learn gem5.

The repository contains the following directories:

* [docker](docker) :
The source code for the Docker image used by [.devcontainer/Dockerfile](.devcontainer/Dockerfile) to create the Codespace Docker container.
The source code for the Docker image used by the [Dockerfile](gem5/util/dockerfiles/devcontainer/Dockerfile) to create the Codespace Docker container.
* gem5 :
v22.0.0.1 of gem5.
v24.0.0.0 of gem5.
* gem5-resources :
gem5-resources which may be used with v22.0 of gem5.
gem5-resources which may be used with v24.0 of gem5.
* materials: Example materials used as part of the tutorial.
* modules: Source for the accompying website: https://gem5bootcamp.github.io/gem5-bootcamp-env
* modules: Source for the accompanying website: <https://gem5bootcamp.github.io/gem5-bootcamp-env> (This link is not up to date.)
The website contains links to slides, presentation videos, and notes for the tutorials.

**Note:** 'gem5' and 'gem5-resources' are submodules though the [.devcontainer/devcontainer.json](.devcontainer/devcontainer.json) file specifies that a `git module update --init --recursive` command is executed when the Codespace Docker container is created.
**Note:** 'gem5' and 'gem5-resources' are submodules though the [.devcontainer/devcontainer.json](.devcontainer/devcontainer.json) file specifies that a `git submodule update --init --recursive` command is executed when the Codespace Docker container is created.

The container used by Codespaces is built from [.devcontainer/Dockerfile](.devcontainer/Dockerfile).
The container used by Codespaces is built from [Dockerfile](gem5/util/dockerfiles/devcontainer/Dockerfile).
It contains:

* All gem5 dependencies (inc. optional dependencies).
* Prebuilt gem5 binaries:
- `/usr/local/bin/gem5-x86`
- `/usr/local/bin/gem5-arm`
- `/usr/local/bin/gem5-riscv`
* `/usr/local/bin/gem5` (gem5 ALL ISAs with CHI protocol)
* `/usr/local/bin/gem5-default` (default gem5 ALL build with MESI_Two_Level)
* `/usr/local/bin/gem5-vega` (x86-only with GPU protocol)
* `/usr/local/bin/gem5-vega-se` (same as above, but compiled with 20.04)
* A RISCV64 and an AARCH64 GNU cross-compiler:
* RISCV64 GNU cross-compiler found in `/opt/cross-compiler/riscv64-linux/`.
* AARCH64 GNU cross-compiler found in `/opt/cross-compiler/aarch64-linux/`.
* RISCV64 GNU cross-compiler found in `/opt/cross-compiler/riscv64-linux/`.
* AARCH64 GNU cross-compiler found in `/opt/cross-compiler/aarch64-linux/`.
* ROCm development environment 6.1.2 (note, this is why the container is based on 22.04 instead of 24.04)

## Beginners' example

The following can be used within the Codespace container to run a basic gem5 simulation straight away:

```
gem5-arm gem5/configs/example/gem5_library/arm-hello.py
gem5 gem5/configs/example/gem5_library/arm-hello.py
```

This will execute a "Hello world!" program inside a simulated ARM system.
Expand All @@ -41,12 +46,13 @@ This will execute a "Hello world!" program inside a simulated ARM system.

In this project we have two submodules: 'gem5' and 'gem5-resources'.
These are automatically obtained when the codespaces is initialized.
At the time of writing the 'gem5' directory is checked out to the stable branch at v22.0.0.1.
The 'gem5-resources' repository is checkoued out to revision '871e715', which should contain resources with known compatibility with gem5 v22.0.
At the time of writing the 'gem5' directory is checked out to the stable branch at v24.0.0.0.
The 'gem5-resources' repository is checked out to revision '97532302', which should contain resources with known compatibility with gem5 v24.0.

To update the git submodules to be in-sync with their remote origins (that hosted on our [googlesource](https://gem5.googlesource.com)), execute the following command:
To update the git submodules to be in-sync with their remote origins (that hosted on our [GitHub](https://github.com/gem5/gem5)), execute the following command:

```sh
git submodule sync # Only needed if submodule remotes changed
git submodule update --remote
```

Expand All @@ -58,7 +64,7 @@ git commit -m "git submodules updated"
git push
```

## Best practises
## Best practices

### Using branches

Expand All @@ -83,7 +89,7 @@ git branch example-1 # Creating a new branch named 'example-1'.
3. Checkout this branch:

```sh
git checkout example-`
git checkout example-1
```

4. Make changes on this branch and commit the changes.
Expand Down Expand Up @@ -113,3 +119,12 @@ To see a list of all available branches you can execute:
```sh
git branch
```

## Note on running GPU SE

You can use docker.
Below is an example command

```sh
docker run -v $PWD:$PWD -v /usr/local/bin:/usr/local/bin -w $PWD ghcr.io/gem5/gcn-gpu:v24-0 gem5-vega-se gem5/configs/example/apu_se.py -n 3 -c square
```
4 changes: 2 additions & 2 deletions _data/course.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
title: "gem5 Bootcamp 2022"
description: "gem5 Bootcamp Summer 2022 at UC Davis offered by the Davis Computer Architecture Research Group"
title: "gem5 Bootcamp"
description: "gem5 Bootcamp Summer 2024 at UC Davis offered by the Davis Computer Architecture Research Group"
modules: ["Introduction", "Using gem5", "Developing gem5 models", "Extra topics"]
2 changes: 1 addition & 1 deletion gem5
Submodule gem5 updated 3990 files
2 changes: 1 addition & 1 deletion gem5-resources
Submodule gem5-resources updated 771 files
Loading