All Projects → google → mlir-hs

google / mlir-hs

Licence: Apache-2.0 license
Haskell bindings for MLIR

Programming Languages

haskell
3896 projects
C++
36643 projects - #6 most used programming language

Labels

Projects that are alternatives of or similar to mlir-hs

ebpfault
A BPF-based syscall fault injector
Stars: ✭ 65 (+22.64%)
Mutual labels:  llvm
los
Los是一个c/c++语言编译型的虚拟机。它使用llvm/clang作为其前端,losld做后端对源代码进行编译,生成los指令文件。Los is a c/c++-compiled virtual machine. It uses llvm/clang as its front end, losld does the backend to compile the source code, and generates the los directive file.
Stars: ✭ 46 (-13.21%)
Mutual labels:  llvm
mollusc
Pure-Rust libraries for parsing, interpreting, and analyzing LLVM
Stars: ✭ 49 (-7.55%)
Mutual labels:  llvm
kotlin-native
Kotlin/Native infrastructure
Stars: ✭ 7,066 (+13232.08%)
Mutual labels:  llvm
alon
Remix for Solana.
Stars: ✭ 87 (+64.15%)
Mutual labels:  llvm
OCCAM
OCCAM: Object Culling and Concretization for Assurance Maximization
Stars: ✭ 20 (-62.26%)
Mutual labels:  llvm
pa.llvm
Program Analysis for LLVM
Stars: ✭ 37 (-30.19%)
Mutual labels:  llvm
systemc-compiler
This tool translates synthesizable SystemC code to synthesizable SystemVerilog.
Stars: ✭ 128 (+141.51%)
Mutual labels:  llvm
compiler lab
Some toy labs for compiler course
Stars: ✭ 49 (-7.55%)
Mutual labels:  llvm
Chromium Clang
Chromium browser compiled with the Clang/LLVM compiler.
Stars: ✭ 77 (+45.28%)
Mutual labels:  llvm
clad
clad -- automatic differentiation for C/C++
Stars: ✭ 161 (+203.77%)
Mutual labels:  llvm
Grimheart
Torture your LLVM Obfuscation
Stars: ✭ 29 (-45.28%)
Mutual labels:  llvm
LLVM-Obfuscator
LLVM Obfuscator
Stars: ✭ 44 (-16.98%)
Mutual labels:  llvm
pacxx-llvm
Programming Accelerators with C++ (PACXX)
Stars: ✭ 57 (+7.55%)
Mutual labels:  llvm
CMLFS
Clang-Built Musl Linux From Scratch
Stars: ✭ 51 (-3.77%)
Mutual labels:  llvm
evm llvm
Official repo of the EVM LLVM project
Stars: ✭ 72 (+35.85%)
Mutual labels:  llvm
movForth
LLVM frontend for the Forth Language
Stars: ✭ 71 (+33.96%)
Mutual labels:  llvm
llvm-compile-time-data
LLVM compile-time performance data over time.
Stars: ✭ 16 (-69.81%)
Mutual labels:  llvm
OS-CFI
Origin-sensitive Control Flow Integrity (OS-CFI) - USENIX Security 2019
Stars: ✭ 27 (-49.06%)
Mutual labels:  llvm
Star-lang-specification
Work in progress specs for the Star programming language
Stars: ✭ 26 (-50.94%)
Mutual labels:  llvm

mlir-hs - Haskell bindings for MLIR

🚨 This is an early-stage project. All details are subject to arbitrary changes. 🚨

Note that the main branch tracks the current HEAD of LLVM and so it is likely to be incompatible with any past releases. We are planning to provide release-specifi branches in the future, but only once the API stabilizes. For now your best bet is to develop against MLIR built from source. See the Building MLIR from source section for guidance.

Building

The only prerequisite for building mlir-hs is that you have MLIR installed somewhere, and the llvm-config binary from that installation is available in your PATH (a good way to verify this is to run which llvm-config).

If that's looking reasonable, we recommend using Stack for development. To build the project simply run stack build, while the test suite can be executed using stack test.

Building MLIR from source

The instructions below assume that you have cmake and ninja installed. You should be able to get them from your favorite package manager.

  1. Clone the latest LLVM code (or use git pull if you cloned it before) into the root of this repository

    git clone https://github.com/llvm/llvm-project
  2. Create a temporary build directory

    mkdir llvm-project/build
  3. Configure the build using CMake. Remember to replace $PREFIX with the directory where you want MLIR to be installed. See LLVM documentation for extended explanation and other potentially interesting build flags.

    cmake -B llvm-project/build           \
      -G Ninja                            \ # Use the Ninja build system
      -DLLVM_ENABLE_PROJECTS=mlir         \ # Enable build MLIR
      -DCMAKE_INSTALL_PREFIX=$PREFIX      \ # Install prefix
      -DMLIR_BUILD_MLIR_C_DYLIB=ON        \ # Build shared libraries
      -DLLVM_BUILD_LLVM_DYLIB=ON          \
      llvm-project/llvm

    For development purposes we additionally recommend using -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_ASSERTIONS=ON to retain debug information and enable internal LLVM assertions. If one changes the install directory (CMAKE_INSTALL_PREFIX) then one needs to add this directory to PATH and LD_LIBRARY_PATH for the subsequent builds (e.g., stack) to find it.

  4. [Build and install MLIR]. Note that it uses the installation prefix specified in the previous step.

    cmake --build llvm-project/build -t install

Contributing

Contributions of all kinds are welcome! If you're planning to implement a larger feature, consider posting an issue so that we can discuss it before you put in the work.

License

See the LICENSE file.

mlir-hs is an early-stage project, not an official Google product.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].