Giter Site home page Giter Site logo

rindow / rindow-openblas-ffi Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 37 KB

Rindow OpenBLAS PHP Interface

Home Page: https://rindow.github.io/mathematics/

License: BSD 3-Clause "New" or "Revised" License

PHP 88.07% C 11.93%
hpc machine-learning mathematics openblas php php8 scientific-computing

rindow-openblas-ffi's Introduction

Rindow OpenBLAS PHP Interface

Status: Build Status Downloads Latest Stable Version License

The Rindow OpenBLAS FFI is universal Buffer for N-dimension and OpenBLAS and Mathematical library. It can be used via PHP's FFI interface.

  • Provides Universal Buffer for 1-dimension for data exchange between C,C+ language and PHP.
  • The OpenBLAS library available to PHP. Only the commonly used functions in OpenBLAS are provided.
  • Provides commonly used Mathematical libraries not included in OpenBLAS.

You can do very fast N-dimensional array operations in conjunction with the Rindow Math Matrix.

Very useful when you want to do deep learning with PHP!

Requirements

  • PHP 8.1 or PHP8.2 or PHP8.3
  • Windows or Linux(Ubuntu 20.04 or Debian 12 or later)
  • OpenBLAS

How to download and setup

Windows

The OpenBLAS Library release number is included in the filename of the rindow-openblas pre-built archive file.

Unzip it to a suitable location and set the execution path in the bin directory.

TMP>set PATH=%PATH%;\path\to\OpenBLAS\bin

And then set it up using composer.

C> mkdir \your\app\dir
C> cd \your\app\dir
C> composer require rindow/rindow-openblas-ffi

Linux

Install openblas with apt command

$ sudo apt install libopenblas0-openmp liblapacke

And then set it up using composer.

$ mkdir \your\app\dir
$ cd \your\app\dir
$ composer require rindow/rindow-openblas-ffi

Troubleshooting for Linux

Since rindow-matlib currently uses OpenMP, choose the OpenMP version for OpenBLAS as well.

Using the pthread version of OpenBLAS can cause conflicts and become unstable and slow. This issue does not occur on Windows.

If you have already installed the pthread version of OpenBLAS,

$ sudo apt remove libopenblas0-pthread

But if you can't remove it, you can switch to it using the update-alternatives command.

$ sudo update-alternatives --config libopenblas.so.0-x86_64-linux-gnu
$ sudo update-alternatives --config liblapack.so.3-x86_64-linux-gnu

If you really want to use the pthread version of OpenBLAS, please switch to the serial version of rindow-matlib.

There are no operational mode conflicts with OpenBLAS on Windows.

But, If you really want to use the pthread version of OpenBLAS, please switch to the serial version of rindow-matlib.

$ sudo update-alternatives --config librindowmatlib.so
There are 2 choices for the alternative librindowmatlib.so (providing /usr/lib/librindowmatlib.so).

  Selection    Path                                             Priority   Status
------------------------------------------------------------
* 0            /usr/lib/rindowmatlib-openmp/librindowmatlib.so   95        auto mode
  1            /usr/lib/rindowmatlib-openmp/librindowmatlib.so   95        manual mode
  2            /usr/lib/rindowmatlib-serial/librindowmatlib.so   90        manual mode

Press <enter> to keep the current choice[*], or type selection number: 2

Choose the "rindowmatlib-serial".

rindow-openblas-ffi's People

Contributors

yuichiis 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.