misc: Merge stable into develop (v24.0 release) (#1295)

This guarantees all changes put on the staging branch and, for whatever
reason, put on stable are on develop.

In addition this PR reverts specific release procedures (e.g., reverting
the removal removing the -Werror compilation flag, and changing the
versioning back to "DEVELOP").
This commit is contained in:
Bobby R. Bruce
2024-06-27 23:45:25 -07:00
committed by GitHub
12 changed files with 247 additions and 35 deletions

View File

@@ -1,3 +1,161 @@
# Version 24.0
gem5 Version 24.0 is the first major release of 2024.
During this time there have been 298 pull requests merged, comprising of over 600 commits, from 56 unique contributors.
## API and user-facing changes
* The GCN3 GPU model has been removed in favor of the newer VEGA_X85 GPU model.
* gem5 now supports building, running, and simulating Ubuntu 24.04.
### Compiler and OS support
As of this release gem5 support Clang version 6 to 16 and GCC version 10 to 13.
While other compilers and versions may work, they are not regularly tested.
gem5 now supports building, running, and simulating on Ubuntu 24.04.
We continue to support 22.04 with 20.04 being deprecated in the coming year.
The majority of our testing is done on Ubuntu LTS systems though Apple Silicon machines and other Linux distributions have also been used regularly during development.
Improvements have been made to ensure a wider support of operating systems.
## New features
### gem5 MultiSim: Multiprocessing for gem5
The gem5 "MultiSim" module allows for multiple simulations to be run from a single gem5 execution via a single gem5 configuration script.
This allows for multiple simulations to be run in parallel in a structured manner.
To use MultiSim first create multiple simulators and add them to the MultiSim with the `add_simulator` function.
If needed, limit the maximum number of parallel processes with the `set_num_processes` function.
Then run the simulations in parallel with the `gem5` binary using `-m gem5.utils.multisim`.
Here is an example of how to use MultiSim:
```python
import gem5.util.multisim as multisim
# Set the maximum number of processes to run in parallel
multisim.set_num_processes(4)
# Create multiple simulators.
# In this case, one for each workload in the benchmark suite.
for workload in benchmark_suite:
board = X86Board(
# ...
)
board.set_workload(workload)
# Useful to set the ID here. This is used to create unique output
# directorires for each gem5 process and can be used to idenfify and
# run gem5 processes individually.
simulator = Simulator(board, id=f"{workload.get_id()}")
multisim.add_simulator(simulator)
```
Then to run the simulations in parallel:
```sh
<gem5 binary> -m gem5.utils.multisim <config script>
```
The output directory ("m5out" by default) will contain sub-directories for each simulation run.
The sub-directory will be named after the simulator ID set in the configuration script.
We therefore recommend setting the simulator ID to something meaningful to help identify the output directories (i.e., the workload run or something identifying the meaningful characteristics of the simulated system in comparison to others).
If only one simulation specified in the config needs run, you can do so with:
```sh
<gem5 binary> <config script> --list # Lists the simulations by ID
<gem5 binary> <config script> <ID> # Run the simulation with the specified ID.
```
Example scripts of using MultiSim can be found in "configs/example/gem5_library/multisim".
### RISC-V Vector Extension Support
There have been significant improvements to the RVV support in gem5 including
* Fixed viota (#1137)
* Fixed vrgather (#1134)
* Added RVV FP16 support (#1123)
* Fixed widening and narrowing instructions (#1079)
* Fixed bug in vfmv.f.s (#863)
* Add unit stride segment loads and stores (#851) (#913)
* Fix vl in masked load/store (#830)
* Add unit-stride loads (#794)
* Fix many RVV instructions (#814) (#805) (#715)
### General RISC-V bugfixes
* Fixed problem in TLB lookup (#1264)
* Fixed sign-extended branch target (#1173)
* Fixed compressed jump instructions (#1163)
* Fixed GDB connection (#1152)
* Fixed CSR behavior (#1099)
* Add Integer conditional operations Zicond (#1078)
* Add RISC-V Semihosting support (#681)
* Added more detailed instruction types (#589)
* Fixed 32-bit m5op arguments (#900)
* Fixed c.fswsp and c.fsw (#998) (#1005)
* Update PLIC implementation (#886)
* Fix fflags behavior in O3 (#868)
* Add support for local interrupts (#813)
* Removebit 63 of physical address (#756)
## Improvements
* Added an new generator which can generate requests based on [spatter](https://github.com/hpcgarage/spatter) patterns.
* KVM is now supported in the gem5 Standard Library ARM Board.
* Generic Cache template added to the Standard Library: https://github.com/gem5/gem5/pull/745
* Support added for partitioning caches.
* The Standard Library `obtain_resources` function can request multiple resources at once thus reducing delay associated with multiple requests.
* An official gem5 DevContainer has been added to the gem5 repository.
This can be used to build and run gem5 in consistent environment and enables GitHub Codespaces support.
### gem5 Python Statistics
The gem5 Python statistics API has been improved.
The gem5 Project's general intent with this improvement is make it easier and more desirable to obtain and interact with gem5 simulation statistics via Python.
For example, the following code snippet demonstrates how to obtain statistics from a gem5 simulation:
```python
from m5.stats.gem5stats import get_simstat
## Setup and run the configuation ...
simstat = get_simstat(board)
# Print the number of cycles the CPU at index 0 has executed.
print(simstat.cpu[0].numCycles)
# Strings can also be used to access statistics.
print(simstat['cpu'][0]['numCycles'])
# Print the total number of cycles executed by all CPUs.
print(sum(simstat.cpu[i].numCycles for i in range(len(simstat.cpu))))
```
We hope the usage of the gem5 Python statistics API will be more intuitive and easier to use while allowing better processing of statistical data.
### GPU Model
* Support for MI300X and MI200 GPU models including their features and most instructions.
* ROCm 6.1 disk image and compile docker files have been added. ROCm 5.4.2 and 4.2 resources are removed.
* The deprecated GCN3 ISA has been removed. Use VEGA instead.
## Bug Fixes
* An integer overflow error known to affect the `AddrRange` class has been fixed.
* Fix fflags behavior of floating point instruction in RISC-V for Out-of-Order CPUs.
### Arm FEAT_MPAM Support
An initial implementation of FEAT_MPAM has been introduced in gem5 with the capability to statically partition
classic caches. Guidance on how to use this is available on a Arm community [blog post](https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/gem5-cache-partitioning)
# Version 23.1
gem5 Version 23.1 is our first release where the development has been on GitHub.

View File

@@ -31,7 +31,7 @@ PROJECT_NAME = gem5
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = [DEVELOP-FOR-24.0]
PROJECT_NUMBER = [DEVELOP-FOR-v24.1]
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.

View File

@@ -32,6 +32,6 @@ namespace gem5
/**
* @ingroup api_base_utils
*/
const char *gem5Version = "DEVELOP-FOR-24.0";
const char *gem5Version = "DEVELOP-FOR-24.1";
} // namespace gem5

View File

@@ -24,7 +24,10 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from typing import List
from typing import (
List,
Optional,
)
from m5.objects import PcCountTrackerManager
from m5.params import PcCountPair
@@ -36,9 +39,31 @@ class ELFieInfo:
See https://github.com/intel/pinball2elf for more information.
"""
def __init__(self, start: PcCountPair, end: PcCountPair):
def __init__(
self,
start_pc: Optional[str] = None,
end_pc: Optional[str] = None,
start_pc_count: Optional[str] = None,
end_pc_count: Optional[str] = None,
start: Optional["PcCountPair"] = None,
end: Optional["PcCountPair"] = None,
**kwargs
):
self._start = start
self._end = end
if self._start is None:
if start_pc is None or start_pc_count is None:
raise ValueError(
"start_pc and start_pc_count must be provided"
)
self._start = PcCountPair(int(start_pc, 16), int(start_pc_count))
if self._end is None:
if end_pc is None or end_pc_count is None:
raise ValueError("end_pc and end_pc_count must be provided")
self._end = PcCountPair(int(end_pc, 16), int(end_pc_count))
self._manager = PcCountTrackerManager()
self._manager.targets = self.get_targets()

View File

@@ -57,6 +57,7 @@ from .client import (
)
from .client_api.client_query import ClientQuery
from .downloader import get_resource
from .elfie import ELFieInfo
from .looppoint import (
LooppointCsvLoader,
LooppointJsonLoader,
@@ -1411,4 +1412,5 @@ _get_resource_json_type_map = {
"looppoint-json": LooppointJsonResource,
"suite": SuiteResource,
"workload": WorkloadResource,
"elfie-info": ELFieInfo,
}

View File

@@ -22,7 +22,8 @@
"source_url": "https://github.com/gem5/gem5-resources/tree/develop/src/x86-ubuntu",
"resource_version": "1.0.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
],
"example_usage": "get_resource(resource_name=\"x86-ubuntu-18.04-img\")"
},
@@ -49,7 +50,8 @@
"source_url": "https://github.com/gem5/gem5-resources/tree/develop/src/x86-ubuntu",
"resource_version": "1.1.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
],
"example_usage": "get_resource(resource_name=\"x86-ubuntu-18.04-img\")"
}

View File

@@ -10,7 +10,8 @@
"source": "src/test-source",
"resource_version": "2.5.0",
"gem5_versions": [
"25.0"
"25.0",
"24.0"
]
},
{
@@ -24,7 +25,8 @@
"source": "src/test-source",
"resource_version": "2.0.0",
"gem5_versions": [
"23.0"
"23.0",
"24.0"
]
},
{
@@ -39,7 +41,8 @@
"resource_version": "1.7.0",
"gem5_versions": [
"develop",
"develop-2"
"develop-2",
"24.0"
]
},
{
@@ -53,7 +56,8 @@
"source": "src/test-source",
"resource_version": "1.5.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
]
}
]

View File

@@ -114,7 +114,8 @@
"resource_version": "1.0.0",
"gem5_versions": [
"develop",
"23.0"
"23.0",
"24.0"
]
},
{

View File

@@ -21,7 +21,8 @@
"source_url": "https://github.com/gem5/gem5-resources/tree/develop/src/asmtest",
"resource_version": "1.0.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
],
"example_usage": "get_resource(resource_name=\"rv64mi-p-sbreak\")"
},
@@ -48,7 +49,8 @@
"source_url": "https://github.com/gem5/gem5-resources/tree/develop/src/asmtest",
"resource_version": "1.1.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
],
"example_usage": "get_resource(resource_name=\"rv64mi-p-sbreak\")"
},
@@ -94,7 +96,8 @@
"source_url": "",
"resource_version": "1.0.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
],
"workload_name": "x86-print-this-15000-with-simpoints",
"example_usage": "get_resource(resource_name=\"x86-print-this-1500-simpoints\")",
@@ -122,7 +125,8 @@
"source_url": "",
"resource_version": "0.2.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
],
"workload_name": "x86-print-this-15000-with-simpoints",
"example_usage": "get_resource(resource_name=\"x86-print-this-1500-simpoints\")",
@@ -150,7 +154,8 @@
"source_url": "",
"resource_version": "0.2.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
],
"workload_name": "x86-print-this-15000-with-simpoints",
"example_usage": "get_resource(resource_name=\"x86-print-this-1500-simpoints\")",
@@ -178,7 +183,8 @@
"source_url": "",
"resource_version": "0.2.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
],
"workload_name": "x86-print-this-15000-with-simpoints",
"example_usage": "get_resource(resource_name=\"x86-print-this-1500-simpoints\")",
@@ -206,7 +212,8 @@
"source_url": "",
"resource_version": "0.2.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
],
"workload_name": "x86-print-this-15000-with-simpoints",
"example_usage": "get_resource(resource_name=\"x86-print-this-1500-simpoints\")",
@@ -234,7 +241,8 @@
"source_url": "",
"resource_version": "0.2.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
],
"workload_name": "x86-print-this-15000-with-simpoints",
"example_usage": "get_resource(resource_name=\"x86-print-this-1500-simpoints\")",
@@ -262,7 +270,8 @@
"source_url": "",
"resource_version": "0.2.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
],
"workload_name": "x86-print-this-15000-with-simpoints",
"example_usage": "get_resource(resource_name=\"x86-print-this-1500-simpoints\")",
@@ -290,7 +299,8 @@
"source_url": "",
"resource_version": "0.2.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
],
"workload_name": "x86-print-this-15000-with-simpoints",
"example_usage": "get_resource(resource_name=\"x86-print-this-1500-simpoints\")",
@@ -322,7 +332,8 @@
"source_url": "https://github.com/gem5/gem5-resources/tree/develop/src/x86-ubuntu",
"resource_version": "2.0.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
],
"example_usage": "get_resource(resource_name=\"x86-ubuntu-18.04-img\")"
}

View File

@@ -3,7 +3,7 @@
"id": "suite-example",
"category": "suite",
"resource_version": "1.0.0",
"gem5_versions": ["develop","23.1"],
"gem5_versions": ["develop","23.1", "24.0"],
"workloads": [
{
"id": "simple-workload-1",
@@ -37,7 +37,8 @@
},
"resource_version": "1.0.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
]
},
{
@@ -60,7 +61,8 @@
},
"resource_version": "1.0.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
]
},
{
@@ -74,7 +76,8 @@
"source": "src/linux-kernel",
"resource_version": "1.0.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
]
},
{
@@ -89,7 +92,8 @@
"root_partition": "1",
"resource_version": "1.0.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
]
},
{
@@ -103,7 +107,8 @@
"source": "src/simple",
"resource_version": "1.0.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
]
}
]

View File

@@ -10,7 +10,8 @@
"source": "src/linux-kernel",
"resource_version": "1.0.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
]
},
{
@@ -25,7 +26,8 @@
"root_partition": "1",
"resource_version": "1.0.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
]
},
{
@@ -48,7 +50,8 @@
},
"resource_version": "1.0.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
]
},
{
@@ -62,7 +65,8 @@
"source": "src/simple",
"resource_version": "1.0.0",
"gem5_versions": [
"develop"
"develop",
"24.0"
]
}
]

View File

@@ -39,15 +39,15 @@
# In the final stage this this is copied into /usr/local/bin/gem5. This ensures
# there is a pre-built gem5 binary in each devcontainer. This can save time
# if the container is used for education or demonstration purposes.
FROM --platform=${BUILDPLATFORM} ghcr.io/gem5/ubuntu-24.04_all-dependencies as builder
RUN git clone --branch stable https://github.com/gem5/gem5
FROM --platform=${BUILDPLATFORM} ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest as builder
RUN git clone --branch v24.0 https://github.com/gem5/gem5
WORKDIR /gem5
RUN scons build/ALL/gem5.opt -j`nproc`
# Stage 2: The final stage where we create the devcontainer image.
# This includes all dependencies for building and running gem5, the
# dependencies for developing gem5, and a pre-built gem5 binary.
FROM --platform=${BUILDPLATFORM} ghcr.io/gem5/ubuntu-24.04_all-dependencies
FROM --platform=${BUILDPLATFORM} ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest
RUN apt -y update && \
apt -y install vim
COPY --from=builder /gem5/build/ALL/gem5.opt /usr/local/bin/gem5