Skip to content
PHP extension for computing matrix product linking to OpenBLAS and cuBLAS
C M4 PHP Cuda JavaScript Shell
Branch: master
Clone or download
Pull request Compare This branch is even with dnishiyama85:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
.gitignore
CREDITS
EXPERIMENTAL
LICENSE
README.md
build_cublas_support_lib.sh
config.m4
config.w32
configure.in
cublas_sgemm.cu
matrix.c
matrix.php
php_matrix.h
sample.php

README.md

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.

You can’t perform that action at this time.