Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.55 KB

File metadata and controls

53 lines (37 loc) · 1.55 KB

PIM-IREE

This project is a compiler and runtime for executing GLM models on PIM devices. (It is a fork of IREE). A model described in MLIR's StableHLO dialect is taken as input and compiled into code that can operate on a PIM device, and it can be executed by connecting with the SDK through the runtime.

Installation Instructions

Download pim-iree

git clone https://github.com/aiha-lab/pim-iree.git
cd pim-iree
git submodule update --init

Install Jsoncpp

Reference: Jsoncpp GitHub

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install jsoncpp

CMake Build

# vcpkg root indicates the directory where you installed vcpkg in the previous step.
cmake -G Ninja -B ../pim-iree-build/ . -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake -DCMAKE_PREFIX_PATH="[vcpkg root]/installed/x64-linux"
cmake --build ../pim-iree-build/

Usage

Compile

cd pim-iree/PIM-sdk/compiler-artifact/
./compile.sh

Input file is a GPT2-125M model described in the StableHLO dialect. The final output of the compiler is a vmfb file, and if you want to check the intermediate result(MLIR), you can modify and use the --compile-to option in compile.sh.

Runtime Execution

The generated .vmfb file from the compilation is executed to perform PiM simulator execution. Furthermore, it outputs the results of the operations.

./exec-pim.sh