Graph lowering (Glow) experimental implementation using MLIR
- Install the latest version of bazelisk: details
- Install the python3.10 (preferebly using conda): help
- Have Clang compiler tools installed
Need to resolve them to be done automatically from build.
- "/usr/local/lib/libmlir_c_runner_utils.so"
- "/usr/local/lib/libmlir_runner_utils.so"
- Clone the repo and go inside
git clone https://github.com/gokulkrishna98/GGlow.git
cd GGlow
- Clone the submodules
git submodule init
git submodule update
- Run the bazel build command
- For building GlowDialect
bazel build lib/Dialect/GGlow:GGlowDialect
- For building gglow
bazel build src:gglow
- For building all of mlir binaries from llvm-project
bazel build @llvm-project//mlir/...:all
- You can find the exectuables from bazil-bin path
- Read the pytorch model: get graph and weights.
- Develop GGlow dialect to represent this model.
- Do simple lowering executing on my Intel cpu.
Using WebKit stype of format using clang-format tool
clang-format --style=WebKit -i gglow.cpp
- Lower Conv2d to LLVM dialect
- Generate resblock high level operation
- Convert pytorch model to IR in GGLow Dialect
- Lower to LLVM