Git Product home page Git Product logo

iree-amd-aie's Introduction

AMD AIE Plugin for IREE

This repository contains an early-phase IREE compiler and runtime plugin for interfacing the AMD AIE accelerator to IREE.

Architectural Overview

image

Developer Setup

These instructions assume that you have an appropriate IREE checkout side by side with this repository have an IREE build setup in an iree-build directory that is also a sibling. This is not a requirement, but instructions will need to be changed for different paths.

Preparing repository:

git submodule update --init

Enabling in IREE

To pin IREE and its submodules (LLVM, etc) to commits which are compatible with this plugin, run

python3 sync_deps.py

from within the iree-amd-aie root directory. Then,

cd ../iree-build
cmake -DIREE_CMAKE_PLUGIN_PATHS=../iree-amd-aie .
ninja

to build IREE with amd-aie plugin. Note for the time being building the amd-aie backend requires headers-only Boost library. On Ubuntu you can do this with

sudo apt-get install libboost-dev

Lit tests specific to AIE can be run with something like:

ctest -R amd-aie

Runtime driver setup

To enable the runtime driver. You need to make sure XRT cmake package is discoverable by cmake. One option is to add it to your PATH. Note that with a standard setup, XRT is installed in /opt/xilinx/xrt.

Now from within the iree-amd-aie root directory. Then,

cd ../iree-build
cmake . -DIREE_CMAKE_PLUGIN_PATHS=../iree-amd-aie \
  -DIREE_EXTERNAL_HAL_DRIVERS=xrt \
  -DXRT_DIR=/opt/xilinx/xrt/share/cmake/XRT
ninja

Building XRT

For the CI, we prefer to build against the pinned XRT. Note that XRT has submodules so recursively submodule initialization is required.

You can build using the same script the CI does:

./build_tools/ci/build_xrt.sh ../xrt-build ../xrt-install

Then instead of using the default system install location for -DXRT_DIR= above, prepend the ../xrt-install/ prefix for the one you just built.

Ubuntu Dependencies

Presently XRT is a monolithic build that unconditionally requires a number of packages. Here are the requirements for various operating systems:

apt install \
  libboost-dev libboost-filesystem-dev libboost-program-options-dev \
  libboost-system-dev \
  pkg-config libdrm-dev opencl-headers ocl-icd-opencl-dev libssl-dev \
  rapidjson-dev \
  protobuf-compiler \
  libprotobuf-dev \
  python3-pybind11 \
  uuid-dev \
  libcurl4-openssl-dev \
  libudev-dev \
  systemtap-sdt-dev \
  libelf-dev

RH Based Deps

This is an incomplete list derived by adding what is needed to our development base manylinux (AlmaLinux 8) image.

yum install \
  boost-devel \
  boost-filesystem \
  boost-program-options \
  boost-static \
  libcurl-devel \
  libdrm-devel \
  libudev-devel \
  libuuid-devel \
  ncurses-devel \
  ocl-icd-devel \
  openssl-devel \
  pkgconfig \
  protobuf-compiler \
  protobuf-devel \
  rapidjson-devel \
  systemtap-sdt-devel

iree-amd-aie's People

Contributors

abhishek-varma avatar daveliddell avatar erwei-xilinx avatar frafranz avatar franzhaniel avatar jtuyls avatar maheshravishankar avatar makslevental avatar newling avatar nirvedhmeshram avatar powderluv avatar spaceotter avatar stellaraccident avatar yzhang93 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.