You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following benchmark suites have been modified to work with the linux runtime:
6
+
-```polybench```: [Polybench](https://web.cse.ohio-state.edu/~pouchet.2/software/polybench/); 60 benchmarks (30 benchmarks x 2 sizes)
7
+
-```mibench```: [Mibench](https://vhosts.eecs.umich.edu/mibench/); 30 benchmarks (16 benchmarks, with 14 having small and large sizes)
8
+
-```cortex```: [UCSD CortexSuite](https://cseweb.ucsd.edu//groups/bsg/), excluding the San Diego Vision Benchmark suite; 24 benchmarks (8 benchmarks x 3 sizes)
9
+
-```vision```: [San Diego Vision Benchmark Suite](https://michaeltaylor.org/vision/); 27 benchmarks (9 benchmarks x 3 sizes)
10
+
11
+
In total, we currently have 141 benchmarks, 63 of which are unique (differ by more than just data / parameters).
12
+
3
13
## Setup
4
14
5
-
0. Set up infrastructure if required.
15
+
0. Set up infrastructure if not already installed.
6
16
7
17
- Mosquitto server: ```sudo apt-get install mosquitto```. Start with ```mosquitto``` if not already running.
8
18
- Run the [orchestrator](https://github.com/SilverLineFramework/orchestrator). All settings can be default, and config files can be empty.
19
+
- Install the Python Client, [libsilverline](https://github.com/SilverLineFramework/libsilverline).
9
20
- The instructions here assume that the [linux runtime](https://github.com/SilverLineFramework/runtime-linux) is installed in the same directory as this repository:
4. Acquire an MQTT token and save it in a file ```./mqtt_pwd.txt```.
50
+
3. Acquire an MQTT token and save it in a file ```./mqtt_pwd.txt```.
43
51
44
52
**NOTE**: if the MQTT server is unsecured (i.e. a default local install of mosquitto), you can just ```touch mqtt_pwd.txt```.
45
53
46
-
5. Build benchmarks:
54
+
4. Build benchmarks:
47
55
48
56
- ```make wasm```: build wasm programs; saved to ```./wasm```.
57
+
- ```make {benchmark}```: make ```tests```, ```polybench```, ```mibench```, ```vision```, or ```cortex``` individually.
49
58
- ```make rustpython```: copy rustpython to ```./wasm``` for distribution or AOT compilation.
50
-
- ```make aot```: build wasm apps into AOT; saved in ```./aot```. **NOTE**: this can take a very long time, especially if rustpython is included.
51
59
- ```make clean```: remove ```./wasm``` and ```./aot```.
52
-
53
-
6. Clone the [Python Client](https://github.com/SilverLineFramework/libsilverline), which includes scripts for launching benchmarks.
60
+
- ```make aot```: build wasm apps into AOT. This will compile **all** ```*.wasm``` files in the ```./wasm``` directory to corresponding ```*.aot``` files in the ```./aot``` directory.
61
+
62
+
**NOTE**: this can take a very long time, especially if rustpython is included. Always ```make aot -j16``` (with the appropriate number of threads).
54
63
55
64
## Usage
56
65
@@ -61,27 +70,26 @@
61
70
62
71
**NOTE**: due to runtime WASI issues, you may need to start inside the benchmarks directory like this example in order for some benchmarks to properly open files.
63
72
64
-
2. Run the ```run.py``` script (from the [Python Client](https://github.com/SilverLineFramework/libsilverline)), for example:
73
+
2. Run the ```run.py``` script (from the [Python Client](https://github.com/SilverLineFramework/libsilverline)):
65
74
```sh
66
75
python libsilverline/run.py --path wasm/tests/helloworld.wasm --runtime test
67
76
```
68
77
69
-
## Benchmarks
70
-
71
-
The following benchmark suites have been modified to work with the linux runtime:
- ```cortex```: [UCSD CortexSuite](https://cseweb.ucsd.edu//groups/bsg/), excluding the San Diego Vision Benchmark suite.
75
-
- ```vision```: [San Diego Vision Benchmark Suite](https://michaeltaylor.org/vision/)
78
+
The ```run.py``` script supports several benchmarking modes. ```---type passive``` will likely be most helpful; for example:
79
+
```sh
80
+
python libsilverline/run.py --path aot/polybench/2mm.aot --runtime test --type passive --duration 10
81
+
```
82
+
will create a module for the AOT-compiled benchmark ```aot/polybench/2mm.aot``` on the runtime named ```test```, wait for 10 seconds, then instruct it to exit.
In the makefile, the WASM output should be ```wasm/path/to/benchmark.wasm```,
105
-
and any accompanying data files should be copied to ```data/path/to/benchmark.dat```.
121
+
and any accompanying data files should be copied to ```data/path/to/benchmark.dat```. No specific data file naming/directory scheme is required, as long as it does not conflict with other benchmarks.
106
122
107
123
2. Rename main function to ```benchmark_main```.
108
124
@@ -120,3 +136,5 @@ The following benchmark suites have been modified to work with the linux runtime
120
136
return loop(argc, argv, &benchmark_main);
121
137
}
122
138
```
139
+
140
+
4. Run on the runtime and observe the number of loops (should be printed out by the common driver at exit). Generally, you should get at least 10 loops in a 10s interval, and at most 2000.
0 commit comments