-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from Multi-V-VM/bench
Bench
- Loading branch information
Showing
26 changed files
with
923 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,5 @@ build | |
.idea | ||
cmake-* | ||
.cache | ||
.DS_Store | ||
.DS_Store | ||
foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
[submodule "lib/wasm-micro-runtime"] | ||
path = lib/wasm-micro-runtime | ||
url = https://github.com/Multi-V-VM/wasm-micro-runtime/ | ||
url = https://github.com/Multi-V-VM/wasm-micro-runtime.git | ||
[submodule "lib/yalantinglibs"] | ||
path = lib/yalantinglibs | ||
url = https://github.com/alibaba/yalantinglibs | ||
url = https://github.com/alibaba/yalantinglibs.git | ||
[submodule "bench/gapbs"] | ||
path = bench/gapbs | ||
url = https://github.com/victoryang00/gapbs.git | ||
[submodule "bench/clickhouse"] | ||
path = bench/clickhouse | ||
url = https://github.com/victoryang00/ClickHouse.git | ||
branch = Alucardik/WASM_for_clickhouse-local | ||
[submodule "bench/llama"] | ||
path = bench/llama | ||
url = https://github.com/second-state/WasmEdge-WASINN-examples | ||
url = https://github.com/victoryang00/llamma-wamr.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,58 @@ | ||
find_package(benchmark REQUIRED) | ||
add_executable(mvvm_benchmark bench.cpp) | ||
add_executable(MVVM_benchmark bench.cpp) | ||
target_link_libraries(MVVM_benchmark benchmark::benchmark MVVM_export) | ||
|
||
if(WIN32) | ||
set(WASI_SDK "D:/wasi-sdk") | ||
set(EMSDK_DIR "D:/emsdk/upstream") | ||
set(WASI_EXE_POSTFIX ".exe") | ||
else() | ||
set(WASI_SDK "/opt/wasi-sdk") | ||
set(EMSDK_DIR "/opt/emsdk/upstream") | ||
set(WASI_EXE_POSTFIX "") | ||
endif() | ||
|
||
# Link benchmark library to your test target | ||
target_link_libraries(mvvm_benchmark benchmark) | ||
include(ExternalProject) | ||
|
||
# add_subdirectory(gapbs) | ||
# add_subdirectory(clickhouse) | ||
# ExternalProject_Add(gapbs | ||
# SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gapbs | ||
# UPDATE_COMMAND "" | ||
# PATCH_COMMAND "" | ||
# CONFIGURE_COMMAND ${CMAKE_COMMAND} | ||
# -DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER_WORKS=1 | ||
# -GNinja | ||
# -DWASI_SDK_DIR=${WASI_SDK_DIR} | ||
# -DCMAKE_TOOLCHAIN_FILE=${WASI_SDK_DIR}/share/cmake/wasi-sdk.cmake | ||
# -DCMAKE_SYSROOT=${WASI_SDK_DIR}/share/wasi-sysroot | ||
# ${CMAKE_CURRENT_SOURCE_DIR}/gapbs | ||
# BUILD_COMMAND ${CMAKE_COMMAND} --build . | ||
# ) | ||
ExternalProject_Add(gapbs | ||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gapbs | ||
UPDATE_COMMAND "" | ||
PATCH_COMMAND "" | ||
CONFIGURE_COMMAND ${CMAKE_COMMAND} | ||
-GNinja -DWASI_SDK_DIR=${WASI_SDK} -DWASI_SDK_PREFIX=${WASI_SDK} | ||
-DCMAKE_C_COMPILER=${WASI_SDK}/bin/clang${WASI_EXE_POSTFIX} | ||
-DCMAKE_CXX_COMPILER=${WASI_SDK}/bin/clang++${WASI_EXE_POSTFIX} | ||
-DCMAKE_CXX_FLAGS="-fno-exceptions" | ||
-DCMAKE_SYSROOT=${WASI_SDK}/share/wasi-sysroot | ||
${CMAKE_CURRENT_SOURCE_DIR}/gapbs | ||
BUILD_COMMAND ${CMAKE_COMMAND} --build . | ||
INSTALL_COMMAND "" | ||
) | ||
if(NOT WIN32) | ||
ExternalProject_Add(clickhouse | ||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/clickhouse | ||
UPDATE_COMMAND "" | ||
PATCH_COMMAND "" | ||
CONFIGURE_COMMAND ${CMAKE_COMMAND} | ||
-GNinja | ||
-DCMAKE_C_COMPILER=${EMSDK_DIR}/bin/clang${WASI_EXE_POSTFIX} | ||
-DCMAKE_CXX_COMPILER=${EMSDK_DIR}/bin/clang++${WASI_EXE_POSTFIX} | ||
-DCMAKE_SYSROOT=${EMSDK_DIR}/emscripten/cache/sysroot -DEMSCRIPTEN=1 | ||
${CMAKE_CURRENT_SOURCE_DIR}/clickhouse | ||
BUILD_COMMAND ${CMAKE_COMMAND} --build . | ||
INSTALL_COMMAND "" | ||
) | ||
|
||
# ExternalProject_Add(clickhouse | ||
# SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/clickhouse | ||
# UPDATE_COMMAND "" | ||
# PATCH_COMMAND "" | ||
# CONFIGURE_COMMAND ${CMAKE_COMMAND} | ||
# -DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER_WORKS=1 | ||
# -GNinja | ||
# -DWASI_SDK_DIR=${WASI_SDK_DIR} | ||
# -DCMAKE_TOOLCHAIN_FILE=${WASI_SDK_DIR}/share/cmake/wasi-sdk.cmake | ||
# -DCMAKE_SYSROOT=${WASI_SDK_DIR}/share/wasi-sysroot | ||
# ${CMAKE_CURRENT_SOURCE_DIR}/clickhouse | ||
# BUILD_COMMAND ${CMAKE_COMMAND} --build . | ||
# ) | ||
ExternalProject_Add(llama | ||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/llama | ||
UPDATE_COMMAND "" | ||
PATCH_COMMAND "" | ||
CONFIGURE_COMMAND ${CMAKE_COMMAND} | ||
-GNinja -DWASI_SDK_DIR=${WASI_SDK} -DWASI_SDK_PREFIX=${WASI_SDK} | ||
-DCMAKE_C_COMPILER=${WASI_SDK}/bin/clang${WASI_EXE_POSTFIX} | ||
-DCMAKE_CXX_COMPILER=${WASI_SDK}/bin/clang++${WASI_EXE_POSTFIX} | ||
-DCMAKE_SYSROOT=${WASI_SDK}/share/wasi-sysroot | ||
${CMAKE_CURRENT_SOURCE_DIR}/llama | ||
BUILD_COMMAND ${CMAKE_COMMAND} --build . | ||
INSTALL_COMMAND "" | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule gapbs
updated
from 62258d to 9b657e
Submodule llama
updated
from b82598 to 76bd79
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.