updated structure of how we document the optimizations
This commit is contained in:
committed by
[Quy Anh] «Elliot» Nguyen
parent
1718a2122f
commit
3ce1c8cc2e
+21
-166
@@ -1,18 +1,16 @@
|
||||
# Optimizations of the Social Force Model
|
||||
|
||||
## Table of Contents
|
||||
Summary of optimization attempts. Each optimization has its own details file
|
||||
under `docs/optimization_<name>.md`. Use `docs/optimization_template.md` as
|
||||
the starting point for a new entry.
|
||||
|
||||
1. [Performance Results](#performance-results)
|
||||
2. [Baseline](#2-baseline)
|
||||
3. [Optimization 1](#3-optimization-1)
|
||||
4. [Optimization 2](#4-optimization-2)
|
||||
5. [Optimization 3](#5-optimization-3)
|
||||
6. [Optimization 4](#6-optimization-4)
|
||||
7. [Optimization 5](#7-optimization-5)
|
||||
8. [Optimization 6](#8-optimization-6)
|
||||
9. [Optimization 7](#9-optimization-7)
|
||||
10. [Optimization 8](#10-optimization-8)
|
||||
11. [Optimization 9](#11-optimization-9)
|
||||
To document a new optimization:
|
||||
|
||||
```
|
||||
cp docs/optimization_template.md docs/optimization_<your_name>.md
|
||||
```
|
||||
|
||||
Fill it in, then add a row to the tables below pointing at your file.
|
||||
|
||||
---
|
||||
|
||||
@@ -23,7 +21,7 @@
|
||||
**Machine**:
|
||||
|
||||
```
|
||||
Processors: 16 × AMD Ryzen AI 7 350 w/ Radeon 860M
|
||||
Processors: 16 x AMD Ryzen AI 7 350 w/ Radeon 860M
|
||||
Memory: 32 GiB of RAM (30.6 GiB usable)
|
||||
Graphics Processor: AMD Radeon 860M Graphics
|
||||
Manufacturer: LENOVO
|
||||
@@ -33,164 +31,21 @@ System Version: IdeaPad Slim 5 14AKP10
|
||||
|
||||
**Frequency**: 2 GHz
|
||||
|
||||
| # | Optimization | W(n) [Flops] | T(n) [Cycles] | Performance [Flops/Cycle] | Author |
|
||||
| --- | ------------ | ---------------- | -------------- | ------------------------- | ------ |
|
||||
| 0 | Baseline | 1'058'400'000.00 | 850'352'900.00 | 1.24 | |
|
||||
| 1 | Inlining | 1'058'400'000.00 | 756'088'260.00 | 1.40 | Elliot |
|
||||
| 2 | | | | | |
|
||||
| 3 | | | | | |
|
||||
| 4 | | | | | |
|
||||
| 5 | | | | | |
|
||||
| 6 | | | | | |
|
||||
| 7 | | | | | |
|
||||
| 8 | | | | | |
|
||||
| 9 | | | | | |
|
||||
| # | Optimization | W(n) [Flops] | T(n) [Cycles] | Performance [Flops/Cycle] | Author |
|
||||
| --- | --------------------------------------- | ---------------- | -------------- | ------------------------- | ------ |
|
||||
| 0 | [Baseline](optimization_baseline.md) | 1'058'400'000.00 | 850'352'900.00 | 1.24 | |
|
||||
| 1 | [Inlining](optimization_inlining.md) | 1'058'400'000.00 | 756'088'260.00 | 1.40 | Elliot |
|
||||
|
||||
### ARM
|
||||
### ARM (Apple)
|
||||
|
||||
**Machine**:
|
||||
|
||||
```
|
||||
|
||||
TBD
|
||||
```
|
||||
|
||||
**Frequency**: ...
|
||||
**Frequency**: TBD
|
||||
|
||||
| # | Optimization | W(n) [Flops] | T(n) [Cycles] | Performance [Flops/Cycle] | Author |
|
||||
| --- | ------------ | ------------ | ------------- | ------------------------- | ------ |
|
||||
| 0 | Baseline | | | | |
|
||||
| 1 | | | | | |
|
||||
| 2 | | | | | |
|
||||
| 3 | | | | | |
|
||||
| 4 | | | | | |
|
||||
| 5 | | | | | |
|
||||
| 6 | | | | | |
|
||||
| 7 | | | | | |
|
||||
| 8 | | | | | |
|
||||
| 9 | | | | | |
|
||||
|
||||
## 2. Baseline
|
||||
|
||||
**Author**: [Name]
|
||||
|
||||
**Description**:
|
||||
Standard implementation without optimizations.
|
||||
|
||||
```cpp
|
||||
// Paste your code here only the relevant part
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3. Optimization 1
|
||||
|
||||
**Author**: [Quy Anh] «Elliot» Nguyen
|
||||
|
||||
**Description**:
|
||||
Manually inlined functions, namely `w`, `acceleration_term_dt`, `pedestrian_repulsion_dt`, `obstacle_repulsion_dt`, `norm`, `dot`, and `find_nearest_obstacle_point`, all into `run_simulation`. Got rid of small number checks after verifying they do not affect results. Removed all references to `Vector2d` and rewrote `Pedestrian` into a struct of doubles. Reduced `sqrt()` calls using mathematical properties.
|
||||
|
||||
**Relevant Files**: `variant_inlining_1.cpp`, `variant_inlining_2.cpp`, `variant_inlining_3.cpp`, `variant_inlining_4.cpp`, `variant_inlining_5.cpp`, `variant_inlining_6.cpp`, `variant_inlining_7.cpp`, `pedestrian_reduced.hpp`
|
||||
|
||||
## 4. Optimization 2
|
||||
|
||||
**Author**: [Name]
|
||||
|
||||
**Description**:
|
||||
[Briefly describe the optimization technique]
|
||||
|
||||
```cpp
|
||||
// Paste your code here only the relevant part
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5. Optimization 3
|
||||
|
||||
**Author**: [Name]
|
||||
|
||||
**Description**:
|
||||
[Briefly describe the optimization technique]
|
||||
|
||||
```cpp
|
||||
// Paste your code here only the relevant part
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 6. Optimization 4
|
||||
|
||||
**Author**: [Name]
|
||||
|
||||
**Description**:
|
||||
[Briefly describe the optimization technique]
|
||||
|
||||
```cpp
|
||||
// Paste your code here only the relevant part
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 7. Optimization 5
|
||||
|
||||
**Author**: [Name]
|
||||
|
||||
**Description**:
|
||||
[Briefly describe the optimization technique]
|
||||
|
||||
```cpp
|
||||
// Paste your code here only the relevant part
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 8. Optimization 6
|
||||
|
||||
**Author**: [Name]
|
||||
|
||||
**Description**:
|
||||
[Briefly describe the optimization technique]
|
||||
|
||||
```cpp
|
||||
// Paste your code here only the relevant part
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 9. Optimization 7
|
||||
|
||||
**Author**: [Name]
|
||||
|
||||
**Description**:
|
||||
[Briefly describe the optimization technique]
|
||||
|
||||
```cpp
|
||||
// Paste your code here only the relevant part
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 10. Optimization 8
|
||||
|
||||
**Author**: [Name]
|
||||
|
||||
**Description**:
|
||||
[Briefly describe the optimization technique]
|
||||
|
||||
```cpp
|
||||
// Paste your code here only the relevant part
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 11. Optimization 9
|
||||
|
||||
**Author**: [Name]
|
||||
|
||||
**Description**:
|
||||
[Briefly describe the optimization technique]
|
||||
|
||||
```cpp
|
||||
// Paste your code here only the relevant part
|
||||
```
|
||||
|
||||
---
|
||||
| # | Optimization | W(n) [Flops] | T(n) [Cycles] | Performance [Flops/Cycle] | Author |
|
||||
| --- | --------------------------------------- | ------------ | ------------- | ------------------------- | ------ |
|
||||
| 0 | [Baseline](optimization_baseline.md) | | | | |
|
||||
|
||||
Reference in New Issue
Block a user