Commit d215cdc
committed
util: support config files in parallel_sim.sh
Previously, running experiments with different configurations required creating
separate wrapper scripts (kmh_v3_btb.sh, kmh_v3_ideal.sh, kmh_v3_btb_nosc.sh, etc.).
This violates the DRY principle and makes configuration management difficult.
Modified `parallel_sim.sh` to auto-detect file type and support both modes:
- Legacy mode: Execute .sh wrapper scripts (backward compatible)
- New mode: Directly invoke gem5 with .py config files
- `util/xs_scripts/parallel_sim.sh`:
- Auto-detect .sh vs .py files using file extension
- Support optional 5th parameter for extra gem5 arguments
- Update help message with examples
- Maintain full backward compatibility with existing wrapper scripts
- `.github/workflows/gem5-perf-template.yml`:
- Add `config_path` parameter (recommended, replaces script_path)
- Add `extra_args` parameter for gem5 command-line arguments
- Keep `script_path` for backward compatibility
- `.github/workflows/gem5-ideal-btb-perf.yml`:
- Use `configs/example/idealkmhv3.py` directly
- `.github/workflows/gem5-ideal-btb-perf-nosc.yml`:
- Use `configs/example/idealkmhv3.py` with `--disable-mgsc`
- `.github/workflows/gem5-ideal-btb-perf-weekly.yml`:
- Migrate all jobs to use config files directly
1. **DRY compliance**: Configuration logic only in .py files
2. **Flexible parameters**: Support arbitrary gem5 arguments without new scripts
3. **Better traceability**: Experiment logs show full config + arguments
4. **Backward compatible**: Existing wrapper scripts continue to work
```bash
bash parallel_sim.sh kmh_v3_btb.sh workload.lst /cpt my_exp
bash parallel_sim.sh configs/example/idealkmhv3.py workload.lst /cpt my_exp
bash parallel_sim.sh configs/example/idealkmhv3.py workload.lst /cpt my_exp "--disable-mgsc"
Change-Id: I4c1f515b3913311fb05c0b9274e103460d3499661 parent 9750a5a commit d215cdc
File tree
5 files changed
+82
-16
lines changed- .github/workflows
- util/xs_scripts
5 files changed
+82
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | | - | |
| 11 | + | |
8 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
9 | 19 | | |
10 | 20 | | |
11 | 21 | | |
| |||
123 | 133 | | |
124 | 134 | | |
125 | 135 | | |
126 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
127 | 141 | | |
128 | 142 | | |
129 | | - | |
| 143 | + | |
| 144 | + | |
130 | 145 | | |
131 | 146 | | |
132 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
6 | 24 | | |
7 | 25 | | |
8 | 26 | | |
| |||
13 | 31 | | |
14 | 32 | | |
15 | 33 | | |
16 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
17 | 60 | | |
18 | 61 | | |
19 | 62 | | |
| |||
70 | 113 | | |
71 | 114 | | |
72 | 115 | | |
73 | | - | |
74 | | - | |
75 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
76 | 126 | | |
77 | 127 | | |
78 | 128 | | |
| |||
0 commit comments