Skip to content
forked from aiha-lab/iree

Compiler and runtime implementation for PIM device.

License

Notifications You must be signed in to change notification settings

aiha-lab/pim-iree

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


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

About

Compiler and runtime implementation for PIM device.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 38.5%
  • MLIR 27.8%
  • C 18.6%
  • Python 5.6%
  • CMake 4.7%
  • Starlark 2.9%
  • Other 1.9%