Code Monkey home page Code Monkey logo

Comments (4)

Berke-Ates avatar Berke-Ates commented on May 28, 2024

Hi!
What branch and llvm-project commit are you using?
Have you tried building everything: cmake --build . or ninja?

from mlir-dace.

iBug avatar iBug commented on May 28, 2024

I'm running into precisely the same problem.

  • OS: Ubuntu 22.04 LTS (amd64)
  • apt install packages: build-essential, cmake, libstdc++-12-dev
  • Source code: Fresh git clone with bundled llvm-submodule (so HEAD should be 5067939)
  • Note: I don't use Ninja, just Make.

Steps on a fresh Linux account (ibug / /home/ibug):

  • Clone repo: git clone https://github.com/spcl/mlir-dace.git --depth=1 --single-branch --recurse-submodules --shallow-submodules

  • Build LLVM:

    cd mlir-dace/llvm-project
    mkdir build && cd build
    cmake ../llvm \
      -DLLVM_ENABLE_PROJECTS=mlir \
      -DLLVM_BUILD_EXAMPLES=ON \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_LLD=ON \
      -DLLVM_CCACHE_BUILD=ON \
      -DLLVM_ENABLE_ASSERTIONS=ON \
      -DLLVM_INSTALL_UTILS=ON
    cmake --build . --target check-mlir -j 24
    cmake --install . --prefix ~/.local

    Verify that ~/.local/lib/cmake/mlir exists and contains expected content.

  • Build MLIR-DaCe:

    # starting from cd $HOME
    mkdir mlir-dace/build
    cd mlir-dace/build
    cmake .. \
      -DMLIR_DIR=$HOME/.local/lib/cmake/mlir \
      -DLLVM_EXTERNAL_LIT=$HOME/mlir-dace/llvm-project/build/bin/llvm-lit
    cmake --build . --target check-sdfg-opt -j 24

Now comes the error:

/home/ibug/mlir-dace/include/SDFG/Dialect/Dialect.td:25:22: error: Value 'useFoldAPI' unknown!
    let useFoldAPI = kEmitFoldAdaptorFolder;

/home/ibug/mlir-dace/include/SDFG/Dialect/Dialect.h:14:10: fatal error: SDFG/Dialect/OpsDialect.h.inc: No such file or directory
   14 | #include "SDFG/Dialect/OpsDialect.h.inc"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

from mlir-dace.

iBug avatar iBug commented on May 28, 2024

I just noticed that you have GitHub Actions set up, and interestingly I tried following lit-test.yml and had success with it. The main differences are

  • I removed the cmake --install line from LLVM / MLIR build process.
  • For MLIR-DaCe, I replaced -DMLIR_DIR=$HOME/.local/lib/cmake/mlir with -DMLIR_DIR=$HOME/mlir-dace/llvm-project/build/lib/cmake/mlir (i.e. using LLVM's build directory instead of "install" directory).
  • I also gave up with Make and adhered to Ninja.

from mlir-dace.

Berke-Ates avatar Berke-Ates commented on May 28, 2024

Thanks for the findings!
I will update the instructions on the readme to include the LLVM / MLIR build process.

from mlir-dace.

Related Issues (5)

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.