Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

ADL Dialect

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.

Standalone build

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 build

Run the optimizer-style driver with:

/path/to/adl-install/bin/adl-opt input.mlir

Documentation generated from TableGen is available through the mlir-doc build target.

LLVM external-project build

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-adl

CMake consumers

Point 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages