Skip to content

dnishiyama85/PHPMatrix

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

INTRODUCTION

This is a PHP extension which computes float matrix products.

  • It supports OpenBLAS sgemm and cuBLAS sgemm function.
  • To Enable OpenBLAS support, you have to specify its library path.
  • To Enable cuBLAS support, CUDA development environment required.
  • Some other functions like sum, scale, transpose, etc... included. (But, they are not utilize OpenBLAS nor cuBLAS.)
  • PHP7 required.

INSTALL

Clone this repository to your computer.

PHP development environment required.

$ cd PHPMatrix
$ phpize

# for simple matrix multiplication
$ ./configure

# to enable OpenBLAS support
$ ./configure --with-openblas=/PATH/TO/OpenBLAS # ex.) /opt/OpenBLAS

# to enable cuBLAS support
$ ./configure --enable-cublas
$ ./build_cublas_support_lib.sh # to build CUDA code.

$ make
$ make install # if needed

Running sample code

# specify the extension file explicitly unless installed globally.
$ php -d extension=./modules/matrix.so sample.php

LICENSE

This software is released under the MIT License, see LICENSE.

About

PHP extension for computing matrix product linking to OpenBLAS and cuBLAS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published