diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index c9a9de825..d1bd04f2a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -13,7 +13,7 @@ env: # job control jobs: format: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Apt Update run: sudo apt-get update @@ -24,7 +24,7 @@ jobs: - name: Clang Format run: ./format.sh -d test: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Apt Update run: sudo apt-get update diff --git a/applications/Makefile b/applications/Makefile index 1ec969c41..cbfa49262 100644 --- a/applications/Makefile +++ b/applications/Makefile @@ -26,6 +26,7 @@ all: \ gps_ekf.install \ license_plate_detection.install \ resize_image.install \ + cnn_face_detection.install \ scratch_storage_get.install \ scratch_storage_set.install \ scratch_storage_delete.install \ @@ -105,6 +106,9 @@ gps_ekf.install: ../runtime/bin/gps_ekf.wasm.so .PHONY: license_plate_detection.install license_plate_detection.install: ../runtime/bin/license_plate_detection.wasm.so +.PHONY: cnn_face_detection.install +cnn_face_detection.install: ../runtime/bin/cnn_face_detection.wasm.so + .PHONY: trap_divzero.install trap_divzero.install: ../runtime/bin/trap_divzero.wasm.so diff --git a/awsm b/awsm index 69c8b6116..f0b35e756 160000 --- a/awsm +++ b/awsm @@ -1 +1 @@ -Subproject commit 69c8b6116664d65a851cc459601bef6af3caeaea +Subproject commit f0b35e756395f79b06be8dd2660eecac94506e94 diff --git a/tests/CMSIS_5_NN/imageclassification/Makefile b/tests/CMSIS_5_NN/imageclassification/Makefile index 203f1ea03..cd7241c59 100644 --- a/tests/CMSIS_5_NN/imageclassification/Makefile +++ b/tests/CMSIS_5_NN/imageclassification/Makefile @@ -14,13 +14,13 @@ debug: .PHONY: client client: - @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/airplane1.bmp" "localhost:10000/rand" - @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/automobile1.bmp" "localhost:10000/rand" - @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/bird1.bmp" "localhost:10000/rand" - @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/cat1.bmp" "localhost:10000/rand" - @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/deer1.bmp" "localhost:10000/rand" - @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/dog1.bmp" "localhost:10000/rand" - @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/frog1.bmp" "localhost:10000/rand" - @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/horse1.bmp" "localhost:10000/rand" - @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/ship1.bmp" "localhost:10000/rand" - @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/truck1.bmp" "localhost:10000/rand" + @curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/airplane1.bmp" "localhost:10000/rand" + @curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/automobile1.bmp" "localhost:10000/rand" + @curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/bird1.bmp" "localhost:10000/rand" + @curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/cat1.bmp" "localhost:10000/rand" + @curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/deer1.bmp" "localhost:10000/rand" + @curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/dog1.bmp" "localhost:10000/rand" + @curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/frog1.bmp" "localhost:10000/rand" + @curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/horse1.bmp" "localhost:10000/rand" + @curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/ship1.bmp" "localhost:10000/rand" + @curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/truck1.bmp" "localhost:10000/rand" diff --git a/tests/multi-tenancy-sample/spec.json b/tests/multi-tenancy-sample/spec.json index ca2b3e041..db117b341 100644 --- a/tests/multi-tenancy-sample/spec.json +++ b/tests/multi-tenancy-sample/spec.json @@ -22,8 +22,7 @@ "relative-deadline-us": 10000, "http-resp-content-type": "text/plain" } - ], - "extra-exec-percentile": 0 + ] }, { "name": "long-000", @@ -48,8 +47,7 @@ "relative-deadline-us": 18000, "http-resp-content-type": "text/plain" } - ], - "extra-exec-percentile": 0 + ] }, { "name": "short-000", @@ -66,7 +64,6 @@ "relative-deadline-us": 18000, "http-resp-content-type": "text/plain" } - ], - "extra-exec-percentile": 0 + ] } ] diff --git a/tests/sod/cnn_face_detection/.gitignore b/tests/sod/cnn_face_detection/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/tests/sod/cnn_face_detection/Makefile b/tests/sod/cnn_face_detection/Makefile new file mode 100644 index 000000000..e86f62d34 --- /dev/null +++ b/tests/sod/cnn_face_detection/Makefile @@ -0,0 +1,26 @@ +RUNTIME_DIR=../../../runtime/ +SLEDGE_BINARY_DIR=${RUNTIME_DIR}/bin +HOSTNAME=localhost + +.PHONY: all +all: run + +.PHONY: clean +clean: + rm -rf res/* + +.PHONY: run +run: + LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} ${SLEDGE_BINARY_DIR}/sledgert spec.json + +.PHONY: debug +debug: + SLEDGE_DISABLE_PREEMPTION=true SLEDGE_NWORKERS=1 LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} gdb ${SLEDGE_BINARY_DIR}/sledgert \ + --eval-command="handle SIGUSR1 noprint nostop" \ + --eval-command="handle SIGPIPE noprint nostop" \ + --eval-command="set pagination off" \ + --eval-command="run spec.json" + +.PHONY: client +client: + curl -H 'Expect:' -H "Content-Type: image/jpeg" --data-binary "@cnn_faces.jpg" "${HOSTNAME}:10000/face" diff --git a/tests/sod/cnn_face_detection/README.md b/tests/sod/cnn_face_detection/README.md new file mode 100644 index 000000000..162e582d8 --- /dev/null +++ b/tests/sod/cnn_face_detection/README.md @@ -0,0 +1,5 @@ +# CNN Face Detection + +Originally, this workload returned an image where all the human faces were circles, along with the coordinates of the faces. It was modified to return a textual representation of faces, that is just the coordinates of the faces. + +The scripts DO NOT check for functional correctness of output for this reason. Please look at other scripts to have a better example for new applications. diff --git a/tests/sod/cnn_face_detection/cnn_faces.jpg b/tests/sod/cnn_face_detection/cnn_faces.jpg new file mode 100644 index 000000000..a21de9c75 Binary files /dev/null and b/tests/sod/cnn_face_detection/cnn_faces.jpg differ diff --git a/tests/sod/cnn_face_detection/spec.json b/tests/sod/cnn_face_detection/spec.json new file mode 100644 index 000000000..df93e486f --- /dev/null +++ b/tests/sod/cnn_face_detection/spec.json @@ -0,0 +1,19 @@ +[ + { + "name": "gwu", + "port": 10000, + "replenishment-period-us": 0, + "max-budget-us": 0, + "reservation-percentile": 0, + "routes": [ + { + "route": "/face", + "path": "cnn_face_detection.wasm.so", + "admissions-percentile": 50, + "expected-execution-us": 320000, + "relative-deadline-us": 500000, + "http-resp-content-type": "text/plain" + } + ] + } +] diff --git a/tests/sod/image_resize/test/Makefile b/tests/sod/image_resize/test/Makefile index 2c2967095..dedaf1ef7 100644 --- a/tests/sod/image_resize/test/Makefile +++ b/tests/sod/image_resize/test/Makefile @@ -18,4 +18,4 @@ debug: --eval-command="run spec.json" client: - curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@flower.jpg" --output "result.jpg" "${HOSTNAME}:10000/resize" + curl -H 'Expect:' -H "Content-Type: image/jpeg" --data-binary "@flower.jpg" --output "result.jpg" "${HOSTNAME}:10000/resize"