rindow/rindow-openblas-ffi
Composer 安装命令:
composer require rindow/rindow-openblas-ffi
包简介
The Openblas library for FFI on PHP
README 文档
README
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, PHP8.2, PHP8.3, PHP8.4
- Linux, Windows, macOS
- OpenBLAS 0.3.8 or later(Linux/Windows), vecLib(macOS)
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 liblapacke
And then set it up using composer.
$ mkdir \your\app\dir $ cd \your\app\dir $ composer require rindow/rindow-openblas-ffi
macOS
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 ptheads, so you should choose the pthread version for OpenBLAS as well. In version 1.0 of Rindow-matlib we recommended the OpenMP version, but now we have changed our policy and are recommending the pthread version.
Using the OpenMP version of OpenBLAS can cause conflicts and become unstable and slow. This issue does not occur on Windows.
If you have already installed the OpenMP version of OpenBLAS, you can delete it and install pthread version.
$ sudo apt install libopenblas0-pthread liblapacke $ sudo apt remove libopenblas0-openmp
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 OpenMP version of OpenBLAS, please switch to the OpenMP version of rindow-matlib.
$ sudo update-alternatives --config librindowmatlib.so There are 1 choices for the alternative librindowmatlib.so (providing /usr/lib/librindowmatlib.so). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/lib/rindowmatlib-thread/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 3 /usr/lib/rindowmatlib-thread/librindowmatlib.so 100 manual mode Press <enter> to keep the current choice[*], or type selection number: 1
Choose the "rindowmatlib-openmp".
rindow/rindow-openblas-ffi 适用场景与选型建议
rindow/rindow-openblas-ffi 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 260.05k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 03 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「math」 「ffi」 「rindow」 「openblas」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 rindow/rindow-openblas-ffi 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 rindow/rindow-openblas-ffi 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 rindow/rindow-openblas-ffi 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP FFI Environment
LaTeX formula to PNG
SDL FFI bindings for the PHP language
Partition problem for balanced arrays splitting made easy.
Simple, chainable calculation library.
Easy to use arithmetic operations for decimals in PHP (using BCMath)
统计信息
- 总下载量: 260.05k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 24
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2024-03-18