{"id":18509195,"url":"https://github.com/rindow/rindow-opencl","last_synced_at":"2026-03-12T19:35:24.117Z","repository":{"id":53700684,"uuid":"323520088","full_name":"rindow/rindow-opencl","owner":"rindow","description":"OpenCL library on PHP extension","archived":false,"fork":false,"pushed_at":"2024-04-29T07:48:41.000Z","size":115,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T21:35:51.466Z","etag":null,"topics":["gpgpu","gpu","hpc","machine-learning","mathematics","opencl","php","php-extension","php8"],"latest_commit_sha":null,"homepage":"https://rindow.github.io/mathematics/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rindow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-22T04:26:57.000Z","updated_at":"2024-04-29T07:47:23.000Z","dependencies_parsed_at":"2024-04-29T08:57:22.941Z","dependency_job_id":null,"html_url":"https://github.com/rindow/rindow-opencl","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/rindow/rindow-opencl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rindow%2Frindow-opencl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rindow%2Frindow-opencl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rindow%2Frindow-opencl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rindow%2Frindow-opencl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rindow","download_url":"https://codeload.github.com/rindow/rindow-opencl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rindow%2Frindow-opencl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30440010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gpgpu","gpu","hpc","machine-learning","mathematics","opencl","php","php-extension","php8"],"created_at":"2024-11-06T15:16:45.419Z","updated_at":"2026-03-12T19:35:24.064Z","avatar_url":"https://github.com/rindow.png","language":"C","readme":"IMPORTANT\n=========\nDevelopment of this program has ended.\nPlease migrate to the program below instead.\n\n- https://github.com/rindow/rindow-opencl-ffi\n\nWe stopped using PHP extensions because it was too difficult to prepare binary files for each PHP version and Linux version.\n\n\nRindow OpenCL PHP extension\n===========================\nYou can use OpenCL on PHP.\nThe version of OpenCL is limited to version 1.2(1.1 with restrictions), and we are considering porting to a wide range of environments.\n\nSince our goal is to use it with the Rindow Neural Network Library, we currently only have the minimum required functionality. It will be expanded in the future.\n\nLearn more about the Rindow Neural Network Library [here](https://rindow.github.io/neuralnetworks/).\n\nRequirements\n============\n\n- PHP7.2 or PHP7.3 or PHP7.4 or PHP8.0 or PHP8.1 or PHP8.2 or PHP8.3\n- interop-phpobjects/polite-math 1.0.3 or later\n- LinearBuffer implements for interop-phpobjects (rindow_openblas etc.)\n- OpenCL 1.2 ICL loader and OpenCL 1.1/1.2 drivers\n- Windows / Linux\n\nAMD GPU/APU drivers for windows are including OpenCL drivers.\n\nRecommend environment\n=====================\n\n- PHP8.1 or PHP8.2 or PHP8.3\n- OpenBLAS [sources](https://github.com/OpenMathLib/OpenBLAS), [binaries](https://github.com/OpenMathLib/OpenBLAS/releases)\n- LinearBuffer implements - rindow-openblas 0.4.0 or later. [sources](https://github.com/rindow/rindow-openblas), [binaries](https://github.com/rindow/rindow-openblas/releases)\n- OpenCL binding for PHP - rindow-opencl 0.2.0. [sources](https://github.com/rindow/rindow-opencl), [binaries](https://github.com/rindow-opencl/releases)\n- BLAS libray for OpenCL implements - rindow-clblast 0.2.0. [sources](https://github.com/rindow/rindow-clblast), [binaries](https://github.com/rindow-clblast/releases)\n- Matrix PHP library - rindow-math-matrix 2.0.0 or later. [sources](https://github.com/rindow/rindow-math-matrix)\n- Driver Pack - rindow-math-matrix-matlibext 1.0.0 or later. [sources](https://github.com/rindow/rindow-math-matrix-matlibext)\n\n\nHow to build from source code on Linux\n========================================\nYou can also build and use from source code.\n\n### Install OpenCL ICD and Tool\n```shell\n$ sudo apt install clinfo\n```\n\n### Install Hardware-dependent OpenCL library.\nFor example, in the case of Ubuntu standard AMD driver, install as follows\n\n```shell\n$ sudo apt install mesa-opencl-icd\n$ sudo mkdir -p /usr/local/usr/lib\n$ sudo ln -s /usr/lib/clc /usr/local/usr/lib/clc\n```\n\nIn addition, there are the following drivers.\n\n- mesa-opencl-icd\n- beignet-opencl-icd\n- intel-opencl-icd\n- nvidia-opencl-icd-xxx\n- pocl-opencl-icd\n\n### Check OpenCL status\nHow to check the installation status\n\n```shell\n$ clinfo\nNumber of platforms                               1\n  Platform Name                                   Clover\n  Platform Vendor                                 Mesa\n  Platform Version                                OpenCL 1.1 Mesa 21.2.6\n  Platform Profile                                FULL_PROFILE\n  Platform Extensions                             cl_khr_icd\n  Platform Extensions function suffix             MESA\n....\n...\n..\n.\n```\n\n### Install build tools and libray\nInstall gcc development environment and opencl library. Then install the php development environment according to the target php version.\n\n```shell\n$ sudo apt install build-essential autoconf automake libtool bison re2c\n$ sudo apt install pkg-config\n$ sudo apt install phpX.X-dev (ex. php8.1-dev)\n$ sudo apt install ocl-icd-opencl-dev\n$ sudo apt install ./rindow-openblas-phpX.X_X.X.X_amd64.deb (ex. php8.1)\n```\n\n### Build\nRun the target php version of phpize and build.\n\n```shell\n$ git clone https://github.com/rindow/rindow-opencl\n$ cd rindow-opencl\n$ composer update\n$ phpizeX.X (ex. phpize8.1)\n$ mv build/Makefile.global build/Makefile.global.orig\n$ sed -f Makefile.global.patch \u003c build/Makefile.global.orig \u003e build/Makefile.global\n$ ./configure --enable-rindow_opencl --with-php-config=php-configX.X (ex. php-config8.1)\n$ make clean\n$ make\n$ make test\n```\n\n### Install from built directory\n\n```shell\n$ sudo make install\n```\nAdd the \"extension=rindow_opencl\" entry to php.ini\n\nIf you want an easier install, use the following spell instead of \"make install\" and creating an ini file.\n\n```shell\n$ sh ./packaging.sh X.X   (ex. sh ./packaging.sh 8.1)\n$ sudo apt install ./rindow-opencl-phpX.X_X.X.X_amd64.deb (ex. ./rindow-opencl-php8.1_...)\n```\n\nHow to build from source code on Windows\n========================================\n\n### Install VC15 or VS16\nDeveloping PHP extensions from php7.2 to php7.4 requires VC15 instead of the latest VC.\n\n- Install Microsoft Visual Studio 2019 or later installer\n- Run Installer with vs2017 build tools option.\n\nDeveloping PHP extensions from php8.0 requires VS16. You can use Visual Studio 2019.\n\n### php sdk and devel-pack binaries for windows\n\n- You must know that PHP 7.2,7.3 and 7.4 needs environment for the MSVC version vc15 (that means Visual Studio 2017). php-sdk releases 2.1.9 supports vc15.\n- For PHP 7.x, Download the php-sdk from https://github.com/microsoft/php-sdk-binary-tools/releases/tag/php-sdk-2.1.9\n- If you want to build extensions for PHP 8.0, You have to use php-sdk release 2.2.0. It supports vs16.\n- For PHP 8.0,8.1,8.2 Download the php-sdk from https://github.com/microsoft/php-sdk-binary-tools/releases/tag/php-sdk-2.2.0\n- Extract to c:\\php-sdk\n- Download target dev-pack from https://windows.php.net/downloads/releases/\n- Extract to /path/to/php-devel-pack-x.x.x-Win32-Vxxx-x64/\n\n### Download OpenCL-SDK\n\n- Download OpenCL SDK form https://github.com/KhronosGroup/OpenCL-SDK/releases\n- extract and copy to opencl development directory\n\n### Install and setup rindow_openblas for test\n\nIn order to execute rindow_opencl, you need a buffer object that implements the LinearBuffer interface. Please install rindow_openblas to run the tests.\nSee https://github.com/rindow/rindow-openblas/ for more information.\n\n```shell\nC:\\tmp\u003ecopy rindow_openblas.dll /path/to/php-installation-path/ext\nC:\\tmp\u003eecho extension=rindow_openblas.dll \u003e\u003e /path/to/php-installation-path/php.ini\nC:\\tmp\u003ePATH %PATH%;/path/to/OpenBLAS/bin\n```\n\n### Start php-sdk for target PHP version\n\nOpen Visual Studio Command Prompt for VS for the target PHP version(see stepbystepbuild.)\nNote that when you build for PHP7.x, you must explicitly specify the version of vc15 for which php.exe was built.\nThe -vcvars_ver=14.16 means vc15.\n\nIf you want to build for PHP8.0, 8.1, 8.2 you just use Visual Studio Command Prompt.\n\n```shell\nC:\\visual\\studio\\path\u003evcvars64 -vcvars_ver=14.16\nor\nC:\\visual\\studio\\path\u003evcvars64\n\nC:\\tmp\u003ecd c:\\php-sdk\nC:\\php-sdk\u003ephpsdk-vc15-x64.bat\nor\nC:\\php-sdk\u003ephpsdk-vs16-x64.bat\n```\n\n### Build\n\n```shell\n$ cd /path/to/here\n$ composer update\n$ /path/to/php-devel-pack-x.x.x-Win32-VXXX-x64/phpize.bat\n$ configure --enable-rindow_opencl --with-prefix=/path/to/php-installation-path --with-opencl=/path/to/OpenCL-SDK-directory\n$ nmake clean\n$ nmake\n$ nmake test\n```\n\n### Install from built directory\n\n- Copy the php extension binary(.dll) to the php/ext directory from here/arch/Releases_TS/php_rindow_opencl.dll\n- Add the \"extension=php_rindow_opencl\" entry to php.ini\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frindow%2Frindow-opencl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frindow%2Frindow-opencl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frindow%2Frindow-opencl/lists"}