rindow-math-matrix

The fundamental package for scientific matrix operation

BSD-3-CLAUSE License

Downloads
24.5K
Stars
10
Committers
2

Bot releases are hidden (Show)

rindow-math-matrix - For new rindow PHP Extensions Latest Release

Published by yuichiis 6 months ago

Compatible with new generation PHP extensions

  • Supported PHP Extension created for Rindow Math Matrix version 2.
  • New extensions now use name-based DLL calls on Windows. It can handle changes in OpenBLAS and DLL versions.

Interface remains V1.1

  • Rindow Neuralnetworks v1 works because the interface does not change.

Fully compatible for THE LEGACY with PHP7.x and PHP8.0

  • Windows and Linux binaries of rindow_openblas, rindow_opencl, and rindow_clblast can be downloaded for PHP7.2, 7.3, 7.4, and 8.0.
  • Works on PHP 7.x and PHP8.0.
rindow-math-matrix - Boot log function

Published by yuichiis 6 months ago

Added boot log function

Added -v option to vendor/bin/rindow-math-matrix command.
Executing the command with the -v option will display the error log when loading the driver.
This will help you resolve the issue if you cannot find the reason why the service level becomes Basic.

rindow-math-matrix - Type definitions

Published by yuichiis 6 months ago

Complete review of type definitions

  • Type definitions were applied to variables and arguments that did not have type definitions, a legacy of php7.

Add BLAS function

  • Added rotm, rotmg

Bug when error occurs

  • Fixed minor bugs that occur when errors occur
rindow-math-matrix - Fix SelectorTest

Published by yuichiis 7 months ago

Fix Selector Test miss case

rindow-math-matrix - Added command to check status

Published by yuichiis 7 months ago

Added command to check status

You can check the service level and driver loading status with the following command.

$ vendor/bin/rindow-math-matrix
Service Level   : Accelerated
Buffer Factory  : Rindow\Math\Buffer\FFI\BufferFactory
BLAS Driver     : Rindow\OpenBLAS\FFI\Blas
LAPACK Driver   : Rindow\OpenBLAS\FFI\Lapack
Math Driver     : Rindow\Matlib\FFI\Matlib
OpenCL Factory  : Rindow\OpenCL\FFI\OpenCLFactory
CLBlast Factory : Rindow\CLBlast\FFI\CLBlastFactory

rindow-math-matrix - Version 2.0

Published by yuichiis 7 months ago

Summary:

  • The default access method for external libraries has been changed from PHP Extension to FFI.
    • This eliminates the need for individual support for each PHP version, operating system, and external library version.
    • PHP Extension can still be used for environments where FFI is not available, but it will not be actively updated in the future.
    • Modules for loading external libraries are now in plugin format and can be replaced. Plugins can be used to switch between FFI and PHP Extension.
  • The data serialization method has been changed. The output format has also been changed.
    • In the old format, the PHP class name was directly embedded in the storage format, which made it difficult to flexibly extend the functionality.
    • In the new format, keywords are embedded.
  • Support for complex number functions in the BLAS library has been added.
    • A complex number data type has been supported. However, this is currently only for the BLAS library, not all functions.
  • The syntax for specifying array subscript ranges has changed.
    • In version 1, the method to specify elements 0 to 4 was [0,4], but in version 2 it is specified as [0,5]. This is to match the notation of other mathematical libraries.
    • You can specify the version 1 style with NDArrayPhp::$rangeStyle and NDArrayCL::$rangeStyle. You can explicitly declare that it is in the version 2 style using the R function. Specify as R(0,5).
      • RANGE_STYLE_DEFAULT: Default version 2 style
      • RANGE_STYLE_1: Version 1 style
      • RANGE_STYLE_FORCE2: Force R function style
  • Automatic data type detection has been abolished in the array() function. The default is fixed to float32. If you want to use a data type other than the default, please specify it explicitly.
  • With the introduction of complex numbers, the functions amax and amin now return the absolute value.
  • With the introduction of complex numbers, the conj option has been added and the order of arguments for some functions has changed. Please use named arguments.
  • New functions have been added.
    • omatcopy, pow (function changed), notEqual

Further details:

  • FFI: Foreign Function Interface. It allows PHP to call functions written in other languages, such as C.
  • Serialization: The process of converting data into a format that can be stored or transmitted.
  • Complex numbers: Numbers that have both a real and imaginary part.
  • Named arguments: Arguments that are passed to a function by name, rather than by position.

Compatibility:

  • Version 2.0 is not compatible with version 1.0 in many ways.
  • If you are using version 1.0, you will need to make changes to your code in order to use version 2.0.
rindow-math-matrix - fix using float64 in gemm

Published by yuichiis over 1 year ago

Bugfix:

  • LinearAlgebra::gemm() - Fixed a bug that prevented using float64 data without specifying an output buffer
rindow-math-matrix - fix for OpenCL on PHP8.2

Published by yuichiis over 1 year ago

fix for OpenCL on PHP8.2

rindow-math-matrix - Support PHP8.2.

Published by yuichiis over 1 year ago

Support PHP8.2.

Functionality has not changed.

rindow-math-matrix - Fix search OpenCL device by type

Published by yuichiis about 2 years ago

Fixed a typo in the OpenCL device search option in MatrixOperator::laAccelerated()

Usage is as follows:

  • The 'device' option contains two numbers separated by a comma. The first is the platform, the second is the device. For example,['device'=>'0,1'].
  • The 'deviceType' option contains one string of device type. Specify 'CPU' or 'GPU'. For example, ['deviceType'=>'GPU'].
  • Both of these options cannot be specified at the same time.
rindow-math-matrix - Interim Linux support for OpenCL features

Published by yuichiis about 2 years ago

The OpenCL extensions that were previously available only on Windows have been changed so that they can be used on Linux as well.

Libclc, the linux standard open source OpenCL hardware support runtime, has many bugs and we have incorporated changes to work around them.
However, since libclc does not work properly in our environment, we gave up detailed testing.

If you have testable hardware, please test using the proprietary driver.

rindow-math-matrix - Workaround exception of gather and reduceGather

Published by yuichiis over 2 years ago

I applied a workaround to avoid throwing an exception with gather() and reduceGather() and stopping the whole process.
Display a warning instead of throwing an exception.

rindow-math-matrix - Fix MatrixBufferIterator php8.1 warning messages

Published by yuichiis over 2 years ago

Fix MatrixBufferIterator php8.1 warning messages

rindow-math-matrix - Supported PHP 8.1.

Published by yuichiis over 2 years ago

Supports PHP 8.1 from this release.
This release supports PHP 8.0 and PHP 8.1.

It does not work with PHP7.2, PHP7.3, PHP7.4.

rindow-math-matrix - Enhancement of comparison function, etc.

Published by yuichiis over 2 years ago

Summary:

  • Enhancement of comparison function
  • You can now handle NaN and INF.
  • Added some other functions.
  • Not backward compatible due to changes in the interface of some functions.
  • Supports Rindow OpenBLAS 0.3.0

New functions

  • LinearAlgebra::toNDArray(), expandDims(), squeeze(), greatorEqual(), lessEqual(), sin(), cos(), tan(), not(), searchsorted(), cumsom(), nam2num(), isnan(), linspace()

Refined interface functions (Not compatible with the old)

  • LinearAlgebra::maximum(), minimum(), greator(), less(), reduceMean()
rindow-math-matrix - PHP extension version check function

Published by yuichiis over 2 years ago

New feature:

MatrixOperator will check the PHP extension version if needed.

  • rindow_openblas
  • rindow_opencl
  • rindow_clblast
rindow-math-matrix - Refine select and scatter functions in LinearAlgebra

Published by yuichiis over 3 years ago

Summary

  • Restructured select and scatter functions for greater flexibility
  • Speeding up the Repeat function
  • New 2D copy function
  • Supports Rindow OpenBLAS 0.2.4
  • OpenCL kernel equivalent to Rindow OpenBLAS 0.2.4

Discontinued function

  • LinearAlgebra::select()

New functions

  • LinearAlgebra::gather()
  • LinearAlgebra::imagecopy()

Refined interface functions (Not compatible with the old)

  • LinearAlgebra::scatter()
  • LinearAlgebra::scatterAdd()
  • LinearAlgebra::repeat()
rindow-math-matrix - Math slice functions supports axis 2

Published by yuichiis over 3 years ago

Support Rindow OpenBLAS 0.2.3. Math slice functions supports axis 2.

  • LinearAlgebra::slice()
  • LinearAlgebra::stick()
  • LinearAlgebra::stack()
  • LinearAlgebra::concat()
  • LinearAlgebra::split()
  • LinearAlgebra::repeat()

Fix slice bug on OpenCL

  • OpenCLMath::slice()

Migrated some random number functions to OpenCL

  • OpenCLMath::randomUniform()
  • OpenCLMath::randomNormal()
rindow-math-matrix - Update for RindowOpenCL 0.1.2

Published by yuichiis over 3 years ago

Update for RindowOpenCL 0.1.2

  • NDArrayCL::offsetSet
rindow-math-matrix - Change the interface of the reduction functions

Published by yuichiis over 3 years ago

The reduction functions support the N-dimension reduction with any axis

  • LinearAlgebra::reduceSum()
  • LinearAlgebraMath::reduceMax()
  • LinearAlgebraMath::reduceArgMax()

Strong Recommended

  • Rindow OpenBLAS 0.2.2 or later

OpenCL support

  • Rindow CLBlast 0.1.2 or later
  • Rindow OpenCL 0.1.1 or later