|
|
||
|---|---|---|
| include | ||
| lib | ||
| test/SPIRV | ||
| CMakeLists.txt | ||
| README.md | ||
| main.cpp | ||
README.md
lume
lume is a compiler that converts SPIR-V binaries to MLIR and then to LLVM IR. This enables cross compilation of SPIR-V shaders to various target architectures through the LLVM toolchain
Building
Prerequisites
- CMake 3.20 or higher
- LLVM (w/ MLIR support)
- C++17 compatible compiler
Build
mkdir build
cd build
cmake .. -DLLVM_DIR=/path/to/llvm/build/lib/cmake/llvm \
-DMLIR_DIR=/path/to/mlir/build/lib/cmake/mlir
make
Usage
lume input.spv -o output.mlir
lume input.spv --dump-mlir
lume input.spv --dump-all
lume - -o output.mlir
Options
-
Input file
<input file>
Input SPIR-V binary file (use-for stdin) -
Output file
-o <output file>
Specify output file (default: stdout) -
SPIR-V MLIR Dump
--dump-mlir
Dump the SPIR-V MLIR dialect -
Full Dump
--dump-all
Dump all dialects and LLVM IR