Skip to content

Latest commit

 

History

History
74 lines (51 loc) · 1.96 KB

File metadata and controls

74 lines (51 loc) · 1.96 KB
sidebar_position
10

Build on IBM LinuxONE(s390x)

Please follow this tutorial to build and test WasmEdge on s390x hardware from source code.

Build WasmEdge

Get Source code

git clone https://github.com/WasmEdge/WasmEdge.git

Dependencies

WasmEdge requires LLVM 18 at least and you may need to install the following dependencies yourself.

:::note As Ubuntu 22.04 and previous versions of Ubuntu do not include the llvm-18 package, you can instead use the official llvm repository to install llvm-18.

wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18

:::

sudo apt-get update
sudo apt install -y software-properties-common cmake gcc g++
sudo apt install -y llvm-18-dev liblld-18-dev

Compile

Please refer to here for the descriptions of all CMake options.

cd WasmEdge
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release .. && make -j

Run Tests

The following tests are available only when the build option WASMEDGE_BUILD_TESTS is set to ON.

Users can use these tests to verify the correctness of WasmEdge binaries.

cd <path/to/wasmedge/build_folder>
LD_LIBRARY_PATH=$(pwd)/lib/api ctest

Building Supported Plugins

Currently, the WASI-NN plugin is supported on s390x, using the GGML backend. Building the plugin with BLAS support is recommended. to build the plugin with BLAS support, first install the OpenBLAS library:

sudo apt install libopenblas-dev

Then, build WasmEdge with the following commands:

cd <path/to/wasmedge/build_folder>
make -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_BUILD_PLUGINS=ON -DWASMEDGE_PLUGIN_WASI_NN_BACKEND="GGML" -DWASMEDGE_PLUGIN_WASI_NN_GGML_LLAMA_BLAS=ON ..

A guide on converting models to big endian is available at https://github.com/ggml-org/llama.cpp/blob/master/docs/build-s390x.md#getting-gguf-models