ADL is an out-of-tree MLIR dialect for describing hardware architecture topology: spatial dimensions, memories, processors, resources, and composed or scaled architectures. The project follows the structure of LLVM's standalone dialect example and does not depend on Loom.
Build and install LLVM/MLIR first, then configure ADL against its CMake package:
cmake -G Ninja -S . -B build \
-DMLIR_DIR=/path/to/llvm-install/lib/cmake/mlir \
-DLLVM_EXTERNAL_LIT=/path/to/llvm-lit \
-DCMAKE_INSTALL_PREFIX=/path/to/adl-install
cmake --build build
cmake --build build --target check-adl
cmake --install buildRun the optimizer-style driver with:
/path/to/adl-install/bin/adl-opt input.mlirDocumentation generated from TableGen is available through the mlir-doc
build target.
cmake -G Ninja -S /path/to/llvm-project/llvm -B build \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_EXTERNAL_PROJECTS=adl-dialect \
-DLLVM_EXTERNAL_ADL_DIALECT_SOURCE_DIR=/path/to/adl-dialect
cmake --build build --target adl-opt check-adlPoint CMAKE_PREFIX_PATH at the installation prefix, or set
ADLDialect_DIR to its lib/cmake/ADLDialect directory:
find_package(ADLDialect REQUIRED CONFIG)
target_link_libraries(my-tool PRIVATE ADLDialect::IR)The public C++ API is provided by ADL/IR/ADLDialect.h,
ADL/IR/ADLOps.h, and ADL/IR/ADLTypes.h under the mlir::adl namespace.