GithubHelp home page GithubHelp logo

dmiitriyjarosh / cfpq-on-gpgpu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jetbrains-research/cfpq-on-gpgpu

0.0 1.0 0.0 10.48 MB

License: MIT License

C++ 27.36% Python 32.95% Cuda 34.73% C 0.78% CMake 2.35% Dockerfile 1.70% Shell 0.13%

cfpq-on-gpgpu's Introduction

fast boolean semiring matrix multiplication for CFPQ

Implementations

  • CPU:
    • matrix multiplication using m4ri lib
    • sparse boolean matrix multiplication using libs on Python
  • GPU:
    • naive matrix multiplication with packed into uint32 boolean values
    • Four Russians method for matrix multiplication with packed into uint32 boolean values

Documentation

Prerequirements.

  1. Docker is installed and started.
  2. Git LFS is installed.
  3. Some of the tests require Cuda, you cannot run these tests without a Nvidia video card. CPU-based implementations can be run anyway.

Quick start

  1. Clone this repo

  2. Build docker image. All tests should run inside docker, so first of all you should build image via Dockerfile in root folder.
    We use ubuntu 18.04 with CUDA compability as main image and install anaconda, mono, m4ri library and some usefull utilites. Builded image has entrypoint for run testing, so generate tests description file and run docker with mounting project root folder.

  3. Generate tests description. For testing system we use tests.csv file which describes all tests, we need it because differents tests may use same files, you can't run testing without this file. For creating this file you can use test_utils/build_testset.py script, it has only parameter โ€’ path to folder with data.
    For example, if your data stores in data folder, run this command for generate tests description:

python test_utils/build_testset.py data
  1. Run tests

Use the following command to run tests.

docker run -v /<path to project>:/work/ <image name>

After running tests, you can find result.csv file in root folder with time measure for each test and each solution in table format.

Data representation

All tests are divided to groups and placed in different folders. Each folder must contain Grammars folder with describing all grammars and Matrices for describing all graphs of this group. Tests for each group is cross product of all grammars and graphs in it.
grammar file is a file with rules definition in format: nt nt1 nt2, which means nt1 -> nt1 nt2, or a T, which means a -> T. We use capital letters for terminal symbols and other letters/words for non-terminal.
graph file contain description of graph with lines likes 0 T 1, where 0 and 1 is vertices numbers and T is a terminal symbol for this edge.
So, if you want to add your data, just put it in data folder in described format and rebuild tests.csv.

cfpq-on-gpgpu's People

Contributors

sokolovyaroslav avatar nikitamishin avatar egornemchinov avatar vkutuev avatar gsvgit avatar sergeigorbatiuk avatar immortalturtle avatar rustam-azimov avatar spirinegor avatar

Watchers

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