Code Monkey home page Code Monkey logo

fgpu_compiler's Introduction

FGPU_Compiler

In this repository you can find the LLVM compiler for the FGPU inside a docker. With this you will be able to compile your openCL kernel into FGPU instructions. (for simulating and/or implementing)

Instructions

Install docker in your system.

    git clone this repository

    cd FGPU_Compiler/compiler

    docker build -t fgpu_compiler .

Alternatively you can pull an already built docker image (this haven't been tested enough times to make it the default option).

    docker pull munozher/fgpu_compiler

With the image already built, you can start it:

    cd ../kernels

    docker run -v $(pwd):/llvm/kernels -it fgpu_compiler 

NOTE: if you pulled the built image, the name of the image in the last command has to change from fgpu_compiler to munozher/fgpu_compiler

This will create a directory /llvm/kernels inside the container and mount the current directory over there, and then run the container into interactive mode (i.e., you get a shell inside the container).

    cd to llvm/kernels

    ./compile.sh or ./compile_and_log.sh 

NOTE: compile.sh outputs just the instructions for the FGPU while compile_and_log.sh will also provide an .objdump to see how the instructions were coded.

Later, its important to keep track of the docker instances because after created they will remain on your system forever unless deleted

You can see all the instances of docker with this line:

    docker container ls -a -s

Every time you do the docker run a new instance of docker will be created so you will need to delete the ones you already created to save space on your hardrive

    docker container rm *CONTID*

Replace CONTID with the ID from the list obtained in the previous line.

After compiling you can exit the docker instance with Ctrl + D.

The outputs can be found in kernels/compiler_outputs with the same name of your openCL kernel.

fgpu_compiler's People

Contributors

munozher avatar mbrandalero avatar

Stargazers

Ömer Güzel avatar

Watchers

James Cloos avatar  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.