Coder Social home page Coder Social logo

tblas's Introduction

tBLAS

A header only multithreaded and cache-optimized linear algebra library.

TODO and future

  • Optimized kernel for transpose: The current implementation supports fast transpose using tiling and multithreading for large matrices. However the size of the kernel needs to be tuned specifically for transpose. The lack of this leads to longer compute times than the naive version for transpose of large matrices.

  • Tuning params: Presently the parameters for block tiling the matrices are defined in constants.hpp. These values are not tuned and should be interpreted as sensible defaults. In an ideal scenario these would be tuned for a given CPU with known cache sizes. The current implementation can be improved by allowing configuration by passing preprocessor definitions so the user of the library can input the cache sizes and the block sizes can then be derived from these by using constexpr based on some heuristics.

  • More tests: The current tests showcase the correctness of the solution fairly well. There is still room for more coverage.

Installation

From project root run

$ cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/your/installation/path
$ cmake --build . --config Release --target install -- -j $(nproc)

Running tests

From build directory run

$ cmake ..
$ make tests
$ ctest

Running benchmarks

From build directory run.

$ cmake ..
$ make bench
$ ./tests/bench  --benchmark-samples=5

Usage

Example CMake snippet

project("tBLAS-example")

find_package(tBLAS CONFIG REQUIRED)

add_executable(tBLAS-example src/main.cpp)
target_link_libraries(tBLAS-example tBLAS::tBLAS)

tblas's People

Contributors

tgujar avatar

Watchers

 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.