Merge pull request #157 from gwsystems/155-projectsphnix

155 projectsphnix
main
Sean McBride 4 years ago committed by GitHub
commit ad3ea2f0ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

28
.gitmodules vendored

@ -12,18 +12,22 @@ url = https://github.com/gwsystems/ck.git
path = runtime/thirdparty/jsmn path = runtime/thirdparty/jsmn
url = https://github.com/gwsystems/jsmn.git url = https://github.com/gwsystems/jsmn.git
[submodule "runtime/tests/gocr"] [submodule "runtime/tests/gocr"]
path = runtime/tests/gocr path = runtime/tests/gocr
url = https://github.com/gwsystems/gocr.git url = https://github.com/gwsystems/gocr.git
branch = sledge branch = sledge
[submodule "runtime/tests/TinyEKF"] [submodule "runtime/tests/TinyEKF"]
path = runtime/tests/TinyEKF path = runtime/tests/TinyEKF
url = https://github.com/gwsystems/TinyEKF.git url = https://github.com/gwsystems/TinyEKF.git
branch = sledge branch = sledge
[submodule "runtime/tests/CMSIS_5_NN"] [submodule "runtime/tests/CMSIS_5_NN"]
path = runtime/tests/CMSIS_5_NN path = runtime/tests/CMSIS_5_NN
url = https://github.com/gwsystems/CMSIS_5_NN.git url = https://github.com/gwsystems/CMSIS_5_NN.git
branch = sledge branch = sledge
[submodule "runtime/tests/sod"] [submodule "runtime/tests/sod"]
path = runtime/tests/sod path = runtime/tests/sod
url = https://github.com/gwsystems/sod.git url = https://github.com/gwsystems/sod.git
branch = sledge branch = sledge
[submodule "runtime/tests/speechtotext"]
path = runtime/tests/speechtotext
url = https://github.com/gwsystems/speechtotext.git
branch = sledge

@ -0,0 +1,19 @@
#!/bin/bash
# Executes the runtime in GDB
# Substitutes the absolute path from the container with a path relatively derived from the location of this script
# This allows debugging outside of the Docker container
# Also disables pagination and stopping on SIGUSR1
experiment_directory=$(pwd)
project_directory=$(cd ../../.. && pwd)
binary_directory=$(cd "$project_directory"/bin && pwd)
export LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH"
export PATH="$binary_directory:$PATH"
gdb --eval-command="handle SIGUSR1 nostop" \
--eval-command="handle SIGPIPE nostop" \
--eval-command="set pagination off" \
--eval-command="set substitute-path /sledge/runtime $project_directory" \
--eval-command="run $experiment_directory/spec.json" \
sledgert

@ -0,0 +1,53 @@
#!/bin/bash
# Executes the runtime in GDB
# Substitutes the absolute path from the container with a path relatively derived from the location of this script
# This allows debugging outside of the Docker container
# Also disables pagination and stopping on SIGUSR1
experiment_directory=$(pwd)
project_directory=$(cd ../../.. && pwd)
binary_directory=$(cd "$project_directory"/bin && pwd)
# Copy License Plate Image if not here
if [[ ! -f "./samples/goforward.raw" ]]; then
cp ../../../tests/speechtotext/goforward.raw ./samples/goforward.raw
fi
if [ "$1" != "-d" ]; then
PATH="$binary_directory:$PATH" LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH" sledgert "$experiment_directory/spec.json" &
sleep 1
else
echo "Running under gdb"
fi
# expected_size="$(find expected_result.jpg -printf "%s")"
success_count=0
total_count=50
for ((i = 0; i < total_count; i++)); do
echo "$i"
# ext="$RANDOM"
curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@goforward.raw" localhost:10000 2>/dev/null
# # echo "$result"
# if [[ "$expected_size" == "$actual_size" ]]; then
# echo "SUCCESS $success_count"
# else
# echo "FAIL"
# echo "Expected Size:"
# echo "$expected_size"
# echo "==============================================="
# echo "Actual Size:"
# echo "$actual_size"
# fi
done
echo "$success_count / $total_count"
if [ "$1" != "-d" ]; then
sleep 5
echo -n "Running Cleanup: "
rm result_*.jpg
pkill sledgert >/dev/null 2>/dev/null
echo "[DONE]"
fi

@ -0,0 +1,14 @@
{
"active": "yes",
"name": "hello_ps",
"path": "hello_ps_wasm.so",
"port": 10000,
"relative-deadline-us": 50000,
"argsize": 1,
"http-req-headers": [],
"http-req-content-type": "image/jpeg",
"http-req-size": 102400,
"http-resp-headers": [],
"http-resp-size": 1048576,
"http-resp-content-type": "image/jpeg"
}

@ -0,0 +1 @@
Subproject commit 859db012144cbcec0cfccaedea4bee45ae50776f
Loading…
Cancel
Save