From 7118bbf72f67be0919a365fdde09742f18aa353b Mon Sep 17 00:00:00 2001 From: Yuichi Ishikawa Date: Fri, 22 Mar 2024 13:21:10 +0900 Subject: [PATCH] just update nn top and install --- _neuralnetworks/index.md | 76 +++++----- _neuralnetworks/install.md | 289 ++++++++++++++++++++++++------------- 2 files changed, 226 insertions(+), 139 deletions(-) diff --git a/_neuralnetworks/index.md b/_neuralnetworks/index.md index 03b4947..3d684b5 100644 --- a/_neuralnetworks/index.md +++ b/_neuralnetworks/index.md @@ -36,41 +36,39 @@ next_section: gettingstarted What is the Rindow Neural Networks ---------------------------------- -The Rindow Neural Networks is a high-level neural networks library for PHP. -You can achieve powerful machine learning on PHP. - -- You can build machine learning models for DNNs, CNNs, RNNs, and Attentions. -- You can use your knowledge of Python and Keras as it is. -- Samples of popular Computer Vision and natural language processing are available. -- The PHP extension can process data twice as fast as the tensorflow CPU version. -- You don't need a dedicated machine learning environment. It can be done on an inexpensive laptop. +Rindow Neural Networks is a high-level neural network library for PHP. +Powerful machine learning can be achieved with PHP. + +- Build DNN, CNN, RNN, and attention machine learning models. +- You can use your knowledge of Python and Keras as is. +- Popular computer vision and natural language processing samples available. +- By calling high-speed calculation libraries, it can process data as fast as the TensorFlow CPU version. +- No dedicated machine learning environment required. It can be done with an inexpensive laptop. - Comes with interesting sample programs. +The goal is to make it easy to create machine learning models in PHP, similar to Keras in Python. -The goal is to make it easy to write machine learning models on PHP, just like Keras on Python. - -If you use the rindow_openblas php extension, -you get can calculate at speed close to CPU version of tensorflow. -The trained model trained on your laptop is available on general web hosting. +When using OpenBLAS and Rindow-Matlib, +It can calculate at speeds close to the CPU version of tensorflow. +Pre-trained models trained on laptops are available on popular web hosting. You can also benefit from deep learning on popular PHP web hosting services. -It supports GPU acceleration using OpenCL with rindow_clblas and rindow_opencl. You can take advantage of the integrated GPUs in cheap laptops. +Supports GPU acceleration using OpenCL and CLblast. You can take advantage of GPUs integrated into inexpensive laptops. No n-vidia graphics card required. It has the following features. -- A high-level neural networks description -- Cooperation with high-speed operation library -- Designing for scalability of operation library -- To save developers the time to learn how to use this library, we adopt an interface similar to Keras. - -Rindow Neural Networks usually work with: +- Writing high-level neural networks +- Cooperation with high-speed calculation library +- Designed with consideration to the extensibility of the calculation library +- Adopts a Keras-like interface to save developers time learning how to use this library. -- Rindow Math Matrix: scientific matrix operation library -- Rindow OpenBLAS extension: PHP extension of OpenBLAS -- Rindow Math Plot: Visualize machine learning results -- Rindow OpenCL extension: PHP extension of OpenCL operating -- Rindow CLBlast extension: PHP extension of BLAS on GPU (OpenCL) +Rindow Neural Networks typically work in conjunction with: +- Rindow-Matlib: Scientific matrix calculation library suitable for machine learning +- OpenBLAS: The most popular high-speed matrix calculation library +- Rindow Math Plot: Visualize machine learning results. +- OpenCL: Framework for GPU programming +- CLBlast: BLAS on GPU (OpenCL) Sample programs --------------- @@ -112,28 +110,28 @@ See the [Machine learning tutorials on PHP](tutorials/tutorials.html) page. Why do deep learning with PHP? ------------------------------ -> - "If you do deep learning, you should use Python." -> - "You should study Python anyway!" -> - "Isn't Python an excellent Deep learning framework?" +> - "If you want to do deep learning, you should use Python." +> - “You should just learn Python!” +> - "Isn't Python a great deep learning framework?" -What you say is right. +You are right. -So why do we have to use Python? +So why should you use Python? Do you need to be platform constrained for deep learning? -Never need! +Absolutely not necessary! -Deep learning / ML is only a small part of the whole system. It's just a small group of functions in the library. -Everyone should be able to use it anywhere, as much as print "Hello!". +Deep learning/ML is just one part of the whole system. This is just a small group of functions in the library. +Anyone can use it anywhere as long as it prints out "Hello!". -It is more unnatural to not be able to use PHP. +It would be unnatural not to be able to use PHP. Requirements ------------ -- PHP 8.0. 8.1 8.2(If you want to use it on PHP 7.x, please use Version 1.x.) -- Windows or Linux environment is required to use rindow_openblas extension. +- PHP 8.1 8.2 8.3 (If you want to use it on PHP 7.x and 8.0, please use Version 1.x.) +- Windows 10 or Ubuntu 20.04 or later is required to use OpenBLAS and Rindow-Matlib. - Rindow Math Matrix Recommends @@ -142,8 +140,8 @@ Recommends - Rindow Math Plot ( Display the result on a graph ) - GD / GD2 extension ( Used for graph display ) - pdo_sqlite extension ( Used to save the trained model ) -- Rindow OpenBLAS extension ( Used for high-speed calculation ) -- Rindow OpenCL extension / Rindow CLBlast extension ( Windows only ) +- OpenBLAS/Rindow-Matlib ( Used for high-speed calculation ) +- OpenCL/CLBlast ( GPU Acceleration ) Release Notes ------------- @@ -151,7 +149,7 @@ The release notes are below - [Rindow Neuralnetworks](https://github.com/rindow/rindow-neuralnetworks/releases) - [Rindow Math Matrix](https://github.com/rindow/rindow-math-matrix/releases) -- [Rindow OpenBLAS](https://github.com/rindow/rindow-openblas/releases) +- [Rindow Matlib](https://github.com/rindow/rindow-matlib/releases) Note ---- diff --git a/_neuralnetworks/install.md b/_neuralnetworks/install.md index 44108e3..f098279 100644 --- a/_neuralnetworks/install.md +++ b/_neuralnetworks/install.md @@ -13,40 +13,40 @@ next_section: tutorials/tutorials Operating environment --------------------- -Rindow Neural Networks has been tested in the following operating environment. +Rindow Neural Networks has been tested in the following operating environments: -- PHP 8.0, 8.1, 8.2(If you want to use it on PHP 7.x environment, please use Release 1.x.) +・PHP 8.1, 8.2, 8.3 (When using in PHP 7.x, 8.0 environment, please use Release 1.x.) - Windows 10 20H2 or later. -- Ubuntu 18.04, 20.04, 22.04 -- AMD/Intel CPU/APU 64bit(SSE2 or later) -- OpenBLAS (0.3.20 Windows-x64, 0.3.20 Ubuntu-2204, 0.3.8 Ubuntu-2004, 0.2.20 Ubuntu-1804) -- CLBlast (1.5.2 Windows-x64, Ubuntu-2204, Ubuntu-2004) +- Ubuntu 20.04, 22.04 +- AMD/Intel CPU/APU 64bit (SSE2 or later) +- OpenBLAS (0.3.20 Windows-x64, 0.3.20 Ubuntu-2204, 0.3.8 Ubuntu-2004) +- CLBlast (1.5.2 or later, Windows-x64, Ubuntu-2204, Ubuntu-2004) -It will also work on Intel CPUs and Integrated Graphics with OpenCL Drivers. +It also works with Intel/AMD CPU/APU and integrated graphics with OpenCL drivers. -Installation procedure for Windows ----------------------------------- -PHP installation + +Installation instructions for Windows +------------------------------------- +Installing PHP For Windows 10/11, install PHP for Windows. -+ Download the PHP8.0 (or 8.1 or 8.2) x64 Thread Safe version from https://windows.php.net/download/. -+ Unzip to the location of your choice. -+ Copy php.ini-development to create php.ini. -+ Set the execution PATH for PHP.EXE. ++ Download the PHP x64 version from https://windows.php.net/download/. Either Non Thread Safe or Thread Safe version is fine. ++ Extract to a location of your choice. ++ Create php.ini by copying php.ini-development. ++ Set execution PATH for PHP.EXE. + Make sure PHP works with PHP -v. ```shell -C:TEMP>COPY C:\php\php81\php.ini-development C:\php\php81\php.ini - +C:TEMP>COPY C:\php\php.ini-development C:\php\php.ini Edit php.ini to your liking. -C:TEMP>PATH %PATH%;C:\php\php81 +C:TEMP>PATH %PATH%;C:\php C:TEMP>php -v -PHP 8.1.7 (cli) (built: Jun 7 2022 21:45:53) (ZTS Visual C++ 2019 x64) +PHP 8.3.4 (cli) (built: Mar 13 2024 11:42:47) (NTS Visual C++ 2019 x64) Copyright (c) The PHP Group -Zend Engine v4.1.7, Copyright (c) Zend Technologies - with Zend OPcache v8.1.7, Copyright (c), by Zend Technologies +Zend Engine v4.3.4, Copyright (c) Zend Technologies + with Zend OPcache v8.3.4, Copyright (c), by Zend Technologies C:TEMP> ``` @@ -62,33 +62,33 @@ C:TEMP>CD \bin C:bin>echo @php "%~dp0composer.phar" %*>composer.bat ``` -Install the required PHP extensions for Rindow Neural Networks. +Install the PHP extensions required by Rindow Neural Networks. -+ Download and unzip the latest version of rindow_openblas from https://github.com/rindow/rindow-openblas/releases. -+ Download and unzip OpenBLAS with the release number to corresponding the rindow-openblas from https://github.com/xianyi/OpenBLAS/releases. The compatible OpenBLAS Library release number is included in the filename of the rindow-openblas pre-built archive file. If you use the wrong OpenBLAS release number DLL, it will not work properly. -+ Set the OpenBLAS DLL path to the execution path. -+ Copy php_rindow_openblas.dll to PHP's ext directory. ++ Download and unzip the corresponding pre-built binary file from https://github.com/xianyi/OpenBLAS/releases. ++ Download and unzip the corresponding pre-built binary file from https://github.com/rindow/rindow-matlib/releases. ++ Set the OpenBLAS and Rindow-Matlib DLL paths to the execution path. + Make the necessary settings in php.ini. - - memory_limit = 8G - - extension = rindow_openblas - - extension = pdo_sqlite - - extension = gd - - extension = mbstring - - extension = openssl -+ Make sure rindow_openblas is loaded with PHP -m. + - memory_limit = 8G + - extension = ffi + - extension=gd + - extension = mbstring + - extension=openssl + - extension=pdo_sqlite + - extension=zip ++ Make sure PHP extensions are loaded with PHP -m. ```shell -C:TEMP>PATH %PATH%;C:\OpenBLAS\OpenBLAS-0.3.20-x64\bin -C:TEMP>COPY rindow-openblas-php8.1-0.3.0-openblas0.3.20-win-ts-vs16-x64\php_rindow_openblas.dll C:\php\php-8.1.7-Win32-vs16-x64\ext +C:TEMP>PATH %PATH%;C:\OpenBLAS\OpenBLAS-0.3.26-x64\bin +C:TEMP>PATH %PATH%;C:\Matlib\rindow-matlib-1.0.0-win64\bin Edit php.ini C:TEMP>php -m [PHP Modules] ... -pdo_sqlite +ffi ... -rindow_openblas +pdo_sqlite ... C:TEMP> ``` @@ -96,44 +96,58 @@ C:TEMP> Install Rindow Neural Networks. + Create your project directory. -+ Install rindow / rindow-neural networks with composer. -+ Install rindow / rindow-math-plot with composer for graph display. -+ Run the sample and check the operation. -+ The result is displayed as a graph. ++ Install rindow/rindow-neuralnetworks with composer. ++ Install rindow/rindow-math-matrlix-matlibffi with composer to speed up. ++ Install rindow/rindow-math-plot with composer for graph display. ++ Verify that the state of rindow-math-matrlix is Advanced or Accelerated. ```shell C:TEMP>MKDIR \tutorials C:TEMP>CD \tutorials C:tutorials>composer require rindow/rindow-neuralnetworks +C:tutorials>composer require rindow/rindow-matrlix-matlibffi C:tutorials>composer require rindow/rindow-math-plot +C:tutorials>vendor/bin/rindow-math-matrix +Service Level : Advanced +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 +``` + +Run the sample program + ++ Run the sample to see if it works. ++ The results are displayed graphically. + +```shell C:tutorials>MKDIR samples C:tutorials>CD samples C:tutorials\samples>COPY ..\vendor\rindow\rindow-neuralnetworks\samples\* . C:tutorials\samples>php mnist-basic-clasification.php Downloading train-images-idx3-ubyte.gz ...Done .... -Epoch 4/5 ........................ - 10 sec. - loss:0.1276 accuracy:0.9641 val_loss:0.1162 val_accuracy:0.9649 -Epoch 5/5 ........................ - 11 sec. - loss:0.1063 accuracy:0.9703 val_loss:0.1059 val_accuracy:0.9688 +Epoch 4/5 [.........................] 1 sec. remaining:00:00 - 2 sec. + loss:0.1264 accuracy:0.9640 val_loss:0.1246 val_accuracy:0.9604 +Epoch 5/5 [.........................] 1 sec. remaining:00:00 - 2 sec. + loss:0.1054 accuracy:0.9698 val_loss:0.1129 val_accuracy:0.9675 The graph is displayed ``` -Installation procedure for Ubuntu ---------------------------------- - +Installation instructions for Ubuntu +----------------------------------------- Install php. -+ Install php-cli, php-mbstring, gd and unzip with the apt command. ++ Install php-cli, php-mbstring, and unzip using the apt command. ```shell -$ sudo apt install php-cli8.1 php8.1-mbstring php8.1-sqlite3 php8.1-gd unzip +$ sudo apt install php-cli8.3 php8.3-mbstring php8.3-curl php8.3-sqlite3 php8.3-gd php8.3-xml php8.3-opcache unzip $ php -v -PHP 8.1.7 (cli) (built: Jun 10 2022 12:23:36) (NTS) +PHP 8.3.4 (cli) (built: Mar 16 2024 08:40:08) (NTS) Copyright (c) The PHP Group -Zend Engine v4.1.7, Copyright (c) Zend Technologies - with Zend OPcache v8.1.7, Copyright (c), by Zend Technologies +Zend Engine v4.3.4, Copyright (c) Zend Technologies + with Zend OPcache v8.3.4, Copyright (c), by Zend Technologies ``` Install composer. @@ -152,33 +166,41 @@ php "${dir}/composer.phar" "$@" ^D $ chmod +x composer $ composer -V -Composer version 2.3.7 2022-06-06 16:43:28 +Composer version 2.6.6 2023-12-08 18:32:26 ``` -Install the required PHP extensions for Rindow Neural Networks. +Install the libraries required by Rindow NeuralNetworks. -+ Download the latest version of rindow_openblas from https://github.com/rindow/rindow-openblas/releases. - - If you don't see the bre-build binary you want, click "Show all xxx assets" at the bottom. You will see the hidden prebuilt binaries. -+ Install the downloaded deb file with the apt command. -+ Make sure rindow_openblas is loaded with PHP -m. ++ Install OpenBLAS with apt command ++ Download the latest version of Rindow-Matlib's pre-built binary files from https://github.com/rindow/rindow-matlib/releases. ++ Install the downloaded deb file using the apt command. ++ Set Rindow-Matlib to serial mode for use with PHP. ```shell -$ sudo apt install ./rindow-openblas-php8.1_0.3.0-1+ubuntu22.04_amd64.deb -$ php -m -[PHP Modules] -... -rindow_openblas -... +$ sudo apt install libopenblas-base liblapacke +$ wget https://github.com/rindow/rindow-matlib/releases/download/X.X.X/rindow-matlib_X.X.X_amd64.deb +$ sudo apt install ./rindow-matlib_X.X.X_amd64.deb +$ sudo update-alternatives --config librindowmatlib.so +There are 2 choices for the alternative librindowmatlib.so (providing /usr/lib/librindowmatlib.so). + + Selection Path Priority Status +------------------------------------------------------------ +* 0 /usr/lib/rindowmatlib-openmp/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 + +Press to keep the current choice[*], or type selection number: 2 ``` Install Rindow Neural Networks. -+ Set the image display command of rindow-math-plot. ++ Set the image display command for rindow-math-plot. + Create your project directory. -+ Install rindow / rindow-neural networks with composer. -+ Install rindow / rindow-math-plot with composer for graph display. -+ Run the sample and check the operation. -+ The result is displayed as a graph. ++ Install rindow/rindow-neuralnetworks with composer. ++ Install rindow/rindow-math-matrix-matlibffi with composer to speed up. ++ Install rindow/rindow-math-plot with composer for graph display. ++ Verify that the state of rindow-math-matrlix is Advanced or Accelerated. + ```shell $ RINDOW_MATH_PLOT_VIEWER=/some/bin/dir/png-file-viewer @@ -187,10 +209,24 @@ $ mkdir ~/tutorials $ cd ~/tutorials $ composer require rindow/rindow-neuralnetworks $ composer require rindow/rindow-math-plot +$ vendor/bin/rindow-math-matrix +Service Level : Advanced +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 +``` + +Run the sample program + ++ Run the sample to see if it works. ++ The results are displayed graphically. + +```shell $ mkdir samples $ cd samples $ cp ../vendor/rindow/rindow-neuralnetworks/samples/* . -$ php basic-image-clasification.php +$ php mnist-basic-clasification.php Downloading train-images-idx3-ubyte.gz ...Done .... Epoch 4/5 ........................ - 10 sec. @@ -207,25 +243,38 @@ The result is displayed as a graph. GPU/OpenCL support for Windows ------------------------------ +OpenCL can be used by default on Windows. -Download binaries and setup PHP extension and libraries. +Please download the CLBlast library and set the execution path. -- [Rindow OpenCL extension](https://github.com/rindow/rindow-opencl/releases) -- [Rindow CLBlast extension](https://github.com/rindow/rindow-clblast/releases) - [CLBlast library](https://github.com/CNugteren/CLBlast/releases) -Copy DLLs and set environment variable. +```shell +C:TEMP>PATH %PATH%;C:\CLBlast\CLBlast-1.6.2-Windows-x64\bin +``` + +Configure the rindow-neuralnetworks backend to use OpenCL. + ++ Verify that rindow-math-matrix is Accelerated and the OpenCL driver is recognized. ++ Set environment variables to use GPU in rindow-neuralnetworks backend. ++ Run the sample program. ```shell -C:TEMP>PATH %PATH%;C:\CLBlast\CLBlast-1.5.2-Windows-x64\lib -C:TEMP>COPY rindow_opencl-php81-0.1.4-win-ts-vs16-x64\php_rindow_opencl.dll C:\php\php-8.1.7-Win32-vs16-x64\ext -C:TEMP>COPY rindow_clblast-php81-0.1.2-clblast1.5.2-win-ts-vs16-x64\php_rindow_clblast.dll C:\php\php-8.1.7-Win32-vs16-x64\ext +C:tutorials>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 C:tutorials>SET RINDOW_NEURALNETWORKS_BACKEND=rindowclblast::GPU C:tutorials>cd samples C:samples>php basic-image-clasification.php ``` -Note: For RINDOW_NEURALNETWORKS_BACKEND, you can specify OpenCL device type or a set of Platform-ID and Device-ID in addition to names such as rindowclblast. For example; +Note: RINDOW_NEURALNETWORKS_BACKEND can specify an OpenCL device type or a set of platform ID and device ID in addition to a name such as rindowclblast. If you have two or more GPUs, you can use this specification method to identify them. for example; + - rindowclblast => platform #0, device #0 - rindowclblast::GPU => GPU type device: Integrated GPU, etc. - rindowclblast::CPU => CPU type device: pocl-opencl-icd, etc. @@ -233,21 +282,30 @@ Note: For RINDOW_NEURALNETWORKS_BACKEND, you can specify OpenCL device type or a - rindowclblast::0,1 => platform #0, device #1 - rindowclblast::1,0 => platform #1, device #0 +If you are unable to successfully set the target GPU, please check the OpenCL device status using the clinfo command. + +```shell +C:tutorials>vendor\bin\clinfo +Number of platforms(1) +Platform(0) + CL_PLATFORM_NAME=Intel(R) OpenCL + CL_PLATFORM_PROFILE=FULL_PROFILE +.... +... +.. +``` + GPU/OpenCL support for Ubuntu ------------------------------ -It is a major premise that OpenCL works correctly in the Linux environment. (that is quite difficult) - -Download binaries and setup PHP extension and libraries. +It is essential that OpenCL works properly in the Linux environment. +(That's quite difficult) -- [Rindow OpenCL extension](https://github.com/rindow/rindow-opencl/releases) -- [Rindow CLBlast extension](https://github.com/rindow/rindow-clblast/releases) -- [Script for downloading and packing the CLBlast library to deb - "clblast-packdeb.sh"](https://github.com/rindow/rindow-clblast/releases) +Install the OpenCL environment. -Install OpenCL environment. ```shell $ sudo apt install clinfo -$ sudo apt install mesa-opencl-icd +$ sudo apt install intel-opencl-icd ``` Ubuntu standard OpenCL drivers include: - mesa-opencl-icd @@ -256,29 +314,60 @@ Ubuntu standard OpenCL drivers include: - nvidia-opencl-icd-xxx - pocl-opencl-icd +The standard Linux OpenCL driver does not work properly, so we deal with it on a case-by-case basis to make it work somehow for each driver and version. -Install pre-build-binaries and set environment variable. -```shell -$ sh ./clblast-packdeb.sh -$ sudo apt install ./clblast_1.5.2-1+ubuntu22.04_amd64.deb -$ sudo apt install ./rindow-opencl-php8.1_0.1.5-1+ubuntu22.04_amd64.deb -$ sudo apt install ./rindow-clblast-php8.1_0.1.3-1+ubuntu22.04_amd64.deb +Check that OpenCL is running using the clinfo command. -$ php -m -[PHP Modules] -... -rindow_openblas -rindow_opencl -rindow_clblast +```shell +$ clinfo +Number of platforms 1 + Platform Name Intel Gen OCL Driver + Platform Vendor Intel +.... ... +.. +``` + +Download and install the CLBlast library. +Scripts are available for easy download and installation. + ++ Check the latest version: [CLBlast library](https://github.com/CNugteren/CLBlast/releases) ++ Copy script ++ Change the version at the beginning of the script ++ Run script and create deb file ++ Install deb file + +```shell +$ cp vendor/rindow/rindow-clblast-ffi/clblast-packdeb.sh . +$ vi clblast-packdeb.sh +CLBLASTVERSION=1.6.2 <===== change +$ sh clblast-packdeb.sh +$ sudo apt install ./clblast_X.X.X-1+ubuntuXX.XX_amd64.deb ``` + +Configure the rindow-neuralnetworks backend to use OpenCL. + ++ Verify that rindow-math-matrix is Accelerated and the OpenCL driver is recognized. ++ Set environment variables to use GPU in rindow-neuralnetworks backend. ++ Run the sample program. + ```shell +$ 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_NEURALNETWORKS_BACKEND=rindowclblast::GPU $ export RINDOW_NEURALNETWORKS_BACKEND $ cd samples $ php basic-image-clasification.php ``` -Note: For RINDOW_NEURALNETWORKS_BACKEND, you can specify OpenCL device type or a set of Platform-ID and Device-ID in addition to names such as rindowclblast. For example; +Note: RINDOW_NEURALNETWORKS_BACKEND can specify an OpenCL device type or a set of platform ID and device ID in addition to a name such as rindowclblast. If you have two or more GPUs, you can use this specification method to identify them. for example; + - rindowclblast => platform #0, device #0 - rindowclblast::GPU => GPU type device: Integrated GPU, etc. - rindowclblast::CPU => CPU type device: pocl-opencl-icd, etc. @@ -286,4 +375,4 @@ Note: For RINDOW_NEURALNETWORKS_BACKEND, you can specify OpenCL device type or a - rindowclblast::0,1 => platform #0, device #1 - rindowclblast::1,0 => platform #1, device #0 -[Read how to use the builders =>](builders.html) +If you are unable to successfully set the target GPU, please check the OpenCL device status using the clinfo command.