Skip to content

Commit

Permalink
Merge pull request #3 from OSCPU/new-readme
Browse files Browse the repository at this point in the history
New readme
  • Loading branch information
Yakkhini authored Dec 9, 2024
2 parents 1b095a1 + 4ff00d7 commit 9ab32a2
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 62 deletions.
8 changes: 4 additions & 4 deletions LICENCE
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@

3, 请将如下声明文本放入每个源文件的头部注释中。

Copyright (c) 2024 Yakkhini [email protected]
QEMULinuxDevFlake is licensed under Mulan PSL v2.
Copyright (c) 2024 One Student One Chip [email protected]
OpenPerf is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan
PSL v2.
You may obtain a copy of Mulan PSL v2 at:
Expand Down Expand Up @@ -180,8 +180,8 @@ License in the first directory of your software package;
iii. Attach the statement to the appropriate annotated syntax at the
beginning of each source file.

Copyright (c) 2024 Yakkhini [email protected]
QEMULinuxDevFlake is licensed under Mulan PSL v2.
Copyright (c) 2024 One Student One Chip [email protected]
OpenPerf is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan
PSL v2.
You may obtain a copy of Mulan PSL v2 at:
Expand Down
127 changes: 69 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,79 +1,90 @@
# OPMark (Prototype of OpenPerf Project)
# OpenPerf Project

This Flake give a Qemu RISC-V Linux / Spike bare metal runtime to run benchmark, aim to make test environment reproducible and result fair enough.
OpenPerf is an open source benchmark for evaluating test the performance of the microarchitecture in processor core, developed and be maintained by [One Student One Chip Project](https://ysyx.oscc.cc/).

## Candidate Benchmark Programs
# How to use

[stress-ng - GPL 2.0 Licence](https://github.com/ColinIanKing/stress-ng)
This project plans to integrate with [YSYX's workbench](https://github.com/OSCPU/ysyx-workbench) and [NJU ProjectN](https://github.com/NJU-ProjectN).

[Anybench - MIT Licence](https://github.com/EntityFX/anybench)
To use openperf in baseline practice, clone it into your project's [AbstractMachine Kernels](https://github.com/NJU-ProjectN/am-kernels).

### Memory access patterns

#### Stream access

[STREAM - Custom Licence, but Open Source friendly](https://github.com/jeffhammond/STREAM)

[RRZE-HPC/TheBandwidthBenchmark - MIT Licence](https://github.com/RRZE-HPC/TheBandwidthBenchmark?tab=readme-ov-file)

#### Other patterns

[emilk/ram_bench - No Licence](https://github.com/emilk/ram_bench)

### Integer Arithmetic

[shaswata56/BenchUtil - WTFPL license](https://github.com/shaswata56/BenchUtil?tab=readme-ov-file)
```sh
cd am-kernels
git clone [email protected]:OSCPU/openperf.git
cd openperf
make ARCH= ... # NOTICE: `...` is not a part of the make command and you need to write it by yourself.
```

### Floating-point Arithmetic
The make recipe, like other benchmark programs in `am-kernel`, allows you to choose the architectures and the test scale.

## Benchmark Programs

<!-- [stress-ng - GPL 2.0 Licence](https://github.com/ColinIanKing/stress-ng) -->
<!---->
<!-- [Anybench - MIT Licence](https://github.com/EntityFX/anybench) -->
<!---->
<!-- ### Memory access patterns -->
<!---->
<!-- #### Stream access -->
<!---->
<!-- [STREAM - Custom Licence, but Open Source friendly](https://github.com/jeffhammond/STREAM) -->
<!---->
<!-- [RRZE-HPC/TheBandwidthBenchmark - MIT Licence](https://github.com/RRZE-HPC/TheBandwidthBenchmark?tab=readme-ov-file) -->
<!---->
<!-- #### Other patterns -->
<!---->
<!-- [emilk/ram_bench - No Licence](https://github.com/emilk/ram_bench) -->
<!---->
<!-- ### Integer Arithmetic -->
<!---->
<!-- [shaswata56/BenchUtil - WTFPL license](https://github.com/shaswata56/BenchUtil?tab=readme-ov-file) -->
<!---->
<!-- ### Floating-point Arithmetic -->
<!---->
<!-- [shaswata56/BenchUtil - WTFPL license](https://github.com/shaswata56/BenchUtil?tab=readme-ov-file) -->
<!---->
<!-- ### Branch Prediction -->
<!---->
<!-- Verilator Model -->
<!---->

* Stream Memory Access: STREAM
* Irregular Memory Access: mcf
* Float Memory: GEMM
* Footprint: Gsim and essent which simulate various RISC-V processor cores such as riscv-mini, Nutshell, Rocket Core, BOOM and XiangShan
* Branch Prediction: TCC
* Floating-point Arithmetic: Linpack, Whetstone
* Utils: soft-fp(cyl), abstract-machine, openlibm

[shaswata56/BenchUtil - WTFPL license](https://github.com/shaswata56/BenchUtil?tab=readme-ov-file)
## Community

### Branch Prediction
### One Student One Chip Project

Verilator Model
"One Student One Chip" is a public welfare learning program to supply talents & trained students to chip industry, which means registering and studying "One Student One Chip" is free. In the mainline, even if he or she has zero experience or skills, every student could learn deeply about how computer system works and create their own processor cores from scratch.

## Run Built-in QEMU VM
Visit [the main page](https://ysyx.oscc.cc/) to know more information.

A Nix Flake is provided for convenience, but not necessary dependency in the final project.
### Ranking (Coming Soon)

With Nix installed, run `nix develop` to get the reproducible development environment.
The One Student One Chip Project is planning to build a ranking system for students! You can run OpenPerf with your NEMU or NPC to find out your performance and compare with others.

Run `vm` to launch QEMU.
## Contributing

## How to compile & run programs in Spike
### Roadmap

With `just` installed, run `just compile` then `just run` in the program source code directory.
- [x] Transplant benchmark programs
- [ ] Test the sensitivity of various programs
- [ ] Collect performance data from various open source processor cores
- [ ] Get early access

Or you can run commands manually. `Justfile` is extremely easy to read and understand.
## Acknowledgement

## Development Environment & Testing
Thanks to the Open Source Community for developing related programs & tools included in OpenPerf. To know more copyright info you can check the Licence headers in programs' code. The moderate and additional features & code written by us is under Mulan PSL v2 Licence.

```sh
cd am-kernel # This project would be a submodule in am-kernel when it's finish
git clone [email protected]:Yakkhini/OPMark.git
cd OPMark
# git switch [branch] # Maybe you want to contribute to another branch
cp -r src/common/stdio.c $AM_HOME/klib/src/stdio.c # We improve printf functions feature, like print float numbers
cd src/linpack # Run a sub program to ensure build system working
make ARCH=riscv32-nemu run
```
Copyright (c) 2024 One Student One Chip Project OpenPerf is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2.
## Transplanted
You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2
* Memory Access: STREAM
* Floating-point Arithmetic: Linpack, Whetstone
* Utils: soft-fp(cyl), abstract-machine, openlibm
* Can build: Spike, RISC-V OpenOCD

## Roadmap

- [x] Run Configurable Linux on QEMU RISC-V Platform
- [x] Basic Benchmark Programs
- [x] Math Library
- [x] GEMM
- [x] Organize Build Scripts
- [x] More Complex Programs
- [ ] Embedded into am-kernel
- [ ] Handle with Licence
- [ ] Merge into single benchmark program
- [ ] Decide OpenPerf Project File Struct
THIS SOFTWARE IS PROVIDED ON AN “AS IS” BASIS, WITHOUT warranties of any kind, either express or implied, including but not limited to non-infringement, merchantability or fit for a particular purpose. See the Mulan PSL v2 for more details.
```

0 comments on commit 9ab32a2

Please sign in to comment.