diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..67ff064 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,44 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.166.1/containers/docker-existing-dockerfile +{ + "name": "Dockerfile", + + // Sets the run context to one level up instead of the .devcontainer folder. + "context": "..", + + // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. + "dockerFile": "../Dockerfile.x86_64", + + // Set *default* container specific settings.json values on container create. + "settings": { + "terminal.integrated.shell.linux": null + }, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "editorconfig.editorconfig", + "foxundermoon.shell-format", + "timonwong.shellcheck", + "dtsvet.vscode-wasm", + "13xforever.language-x86-64-assembly", + "ms-vscode.cpptools-extension-pack" + ], + + "workspaceMount": "source=${localWorkspaceFolder},target=/sledge,type=bind,consistency=cached", + "workspaceFolder": "/sledge", + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Uncomment the next line to run commands after the container is created - for example installing curl. + "postCreateCommand": "make -C /sledge install && make -B -C /sledge/runtime/tests clean all", + + // Uncomment when using a ptrace-based debugger like C++, Go, and Rust + // "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], + + // Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker. + // "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], + + // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "root", +} diff --git a/.env b/.env new file mode 100644 index 0000000..018de14 --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +LD_LIBRARY_PATH=/sledge/runtime/bin +SLEDGE_NWORKERS=1 +SLEDGE_SCHEDULER=EDF diff --git a/.gitignore b/.gitignore index bcb5681..2adb446 100644 --- a/.gitignore +++ b/.gitignore @@ -60,9 +60,6 @@ runtime/tests/**/*.xlsx # Swap Files *.swp -# Editor Configs -.vscode - # Symlinks Dockerfile diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..a247cb5 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,19 @@ +{ + "configurations": [ + { + "name": "Linux", + "intelliSenseMode": "clang-x64", + "includePath": [ + "/usr/include/", + "${workspaceFolder}/runtime/include/", + "${workspaceFolder}/runtime/thirdparty/ck/include/", + "${workspaceFolder}/runtime/thirdparty/http-parser/", + "${workspaceFolder}/runtime/thirdparty/jsmn/" + ], + "defines": ["USE_MEM_VM", "x86_64", "_GNU_SOURCE"], + "cStandard": "c17", + "compilerPath": "/usr/bin/clang" + } + ], + "version": 4 +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..a78a207 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,10 @@ +{ + "recommendations": [ + "editorconfig.editorconfig", + "foxundermoon.shell-format", + "timonwong.shellcheck", + "dtsvet.vscode-wasm", + "13xforever.language-x86-64-assembly", + "ms-vscode.cpptools-extension-pack" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..b0d9dc7 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "(gdb) Launch", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/runtime/bin/sledgert", + "args": ["${workspaceFolder}/runtime/experiments/applications/ocr/hyde/spec.json"], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "envFile": "${workspaceFolder}/.env", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..013f581 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,73 @@ +{ + "files.associations": { + "*.inc": "cpp", + "arm_nnexamples_cifar10_parameter.h": "c", + "arm_nnexamples_cifar10_weights.h": "c", + "__hash_table": "cpp", + "__split_buffer": "cpp", + "__tree": "cpp", + "array": "cpp", + "bitset": "cpp", + "deque": "cpp", + "dynarray": "cpp", + "simd": "cpp", + "hash_map": "cpp", + "hash_set": "cpp", + "initializer_list": "cpp", + "iterator": "cpp", + "list": "cpp", + "map": "cpp", + "queue": "cpp", + "random": "cpp", + "regex": "cpp", + "set": "cpp", + "stack": "cpp", + "string": "cpp", + "string_view": "cpp", + "unordered_map": "cpp", + "unordered_set": "cpp", + "utility": "cpp", + "valarray": "cpp", + "vector": "cpp", + "__locale": "cpp", + "__config": "c", + "*.def": "c", + "mman.h": "c", + "types.h": "c", + "assert.h": "c", + "fstream": "c", + "locale": "c", + "*.tcc": "c", + "sandbox.h": "c", + "runtime.h": "c", + "panic.h": "c", + "ucontext.h": "c", + "stdlib.h": "c", + "pthread.h": "c", + "signal.h": "c", + "current_sandbox.h": "c", + "admissions_control.h": "c", + "sigval_t.h": "c", + "__sigval_t.h": "c", + "sigaction.h": "c", + "string.h": "c", + "errno.h": "c", + "siginfo_t.h": "c", + "features.h": "c" + }, + "files.exclude": { + "**/.git": true, + "**/.svn": true, + "**/.hg": true, + "**/CVS": true, + "**/.DS_Store": true, + "awsm/wasmception": true + }, + "C_Cpp.default.cStandard": "c17", + "C_Cpp.exclusionPolicy": "checkFilesAndFolders", + "C_Cpp.experimentalFeatures": "Enabled", + "C_Cpp.files.exclude": { + "awsm/wasmception": true, + "**/.vscode": true + } +}