Giter VIP home page Giter VIP logo

open-cim-compiler's Introduction

OCC: The Open CIM Compiler

This repository contains MLIR-based compilation infrastructure and a suite of tests for a Computing-In-Memory device simulator.

See the 'sim_build' branch for additional simulation benchmarks, cross-compilation build config and evaluation results.

End-to-end CIM compilation tests

The provided tests are based on the following steps:

  1. MLIR code is generated from the functions defined in a Tensor Comprehensions (TC) file
  2. MLIR is lowered through CIM dialect (and others) and compiled to an object file
  3. A test application is compiled together with the MLIR object file and linked against CIM runtime library
  4. The test application calls the compiled TC functions through their MLIR C interfaces

Initializing submodules

git submodule init && git submodule update

Building tests

Ensure that paths to the following executables are set correctly at the project root level CMakeLists.txt:

  • MLIR_OPT_BIN
  • MLIR_TRANSLATE_BIN
  • LLC_BIN
  • TECKYL_BIN

Tests can then be built by (optionally) creating a build directory, invoking cmake and running make as follows:

  • mkdir build
  • cd build
  • cmake ..
  • make

The built tests application can be found in build/bin directory.
Other build artifacts, e.g. generated MLIR files, can be found in build/tests/TEST_NAME subdirectories.

Build tools

Build tested with:

  • cmake version 3.10.2
  • clang version 10.0.0
  • clang++ version 10.0.0
  • llc version 10.0.0
  • ld version 2.30
  • mlir_opt built from llvm-project submodule
  • mlir_translate built from llvm-project submodule
  • teckyl built from teckyl submodule

open-cim-compiler's People

Contributors

adam-smnk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

open-cim-compiler's Issues

Gem5-CIM simulator

Hello, thank you for the open-source compiler and some use cases. But I would like to write some other applications using your compiler, is it possible to provide the source code of the simulator.

Gem5 integration

Does the repository contain how to be integrated and simulated by Gem5, as demonstrated in the paper?

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.