hardware:raspberry_pi:dietpi:opencl_on_videocore_iv_gpu

文書の過去の版を表示しています。


VideoCore IV GPU で OpenCL

$ sudo apt update

Hit:1 http://raspbian.raspberrypi.com/raspbian bookworm InRelease
Hit:2 https://dietpi.com/apt bookworm InRelease
Hit:3 https://dietpi.com/apt all InRelease
Hit:4 https://archive.raspberrypi.com/debian bookworm InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

$ sudo apt install cmake git

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
cmake is already the newest version (3.25.1-1).
git is already the newest version (1:2.39.2-1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ sudo apt install opencl-headers

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
opencl-headers is already the newest version (3.0~2023.02.06-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ sudo apt install ocl-icd-opencl-dev ocl-icd-dev

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ocl-icd-opencl-dev is already the newest version (2.3.1-1).
ocl-icd-dev is already the newest version (2.3.1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ sudo apt install libraspberrypi-dev

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libraspberrypi-dev is already the newest version (1:2+git20231018~131943+3c97f76-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ sudo apt install clang clang-format clang-tidy

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
clang is already the newest version (1:14.0-55.7~deb12u1).
clang-format is already the newest version (1:14.0-55.7~deb12u1).
clang-tidy is already the newest version (1:14.0-55.7~deb12u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ sudo apt install clinfo

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
clinfo is already the newest version (3.0.23.01.25-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

ソースコードの clone …🤔

$ mkdir opencl && cd opencl
$ git clone --depth 1 https://github.com/doe300/VC4CLStdLib.git

Cloning into 'VC4CLStdLib'...
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 38 (delta 1), reused 14 (delta 0), pack-reused 0
Receiving objects: 100% (38/38), 151.65 KiB | 404.00 KiB/s, done.
Resolving deltas: 100% (1/1), done.

$ git clone https://github.com/doe300/VC4C.git

Cloning into 'VC4C'...
remote: Enumerating objects: 14476, done.
remote: Counting objects: 100% (3209/3209), done.
remote: Compressing objects: 100% (577/577), done.
remote: Total 14476 (delta 2626), reused 3192 (delta 2616), pack-reused 11267
Receiving objects: 100% (14476/14476), 26.52 MiB | 369.00 KiB/s, done.
Resolving deltas: 100% (11603/11603), done.
Updating files: 100% (1607/1607), done.

$ git clone https://github.com/doe300/VC4CL.git

Cloning into 'VC4CL'...
remote: Enumerating objects: 2119, done.
remote: Counting objects: 100% (118/118), done.
remote: Compressing objects: 100% (83/83), done.
remote: Total 2119 (delta 40), reused 39 (delta 35), pack-reused 2001
Receiving objects: 100% (2119/2119), 1.05 MiB | 254.00 KiB/s, done.
Resolving deltas: 100% (1657/1657), done.

$ cd VC4CLStdLib
$ mkdir build && cd build
$ cmake ..

-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- build deb package...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dietpi/opencl/VC4CLStdLib/build

$ make

[100%] Linking C static library libVC4CLStdLib.a
[100%] Built target VC4CLStdLib

$ sudo make install && sudo ldconfig

[100%] Built target VC4CLStdLib
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/include/vc4cl-stdlib
-- Installing: /usr/local/include/vc4cl-stdlib/_atomics.h
-- Installing: /usr/local/include/vc4cl-stdlib/opencl-c.h
-- Installing: /usr/local/include/vc4cl-stdlib/_integer.h
-- Installing: /usr/local/include/vc4cl-stdlib/defines.h
-- Installing: /usr/local/include/vc4cl-stdlib/_printf.h
-- Installing: /usr/local/include/vc4cl-stdlib/_spir_mangling.h
-- Installing: /usr/local/include/vc4cl-stdlib/_config.h
-- Installing: /usr/local/include/vc4cl-stdlib/_relational.h
-- Installing: /usr/local/include/vc4cl-stdlib/_common.h
-- Installing: /usr/local/include/vc4cl-stdlib/_work_items.h
-- Installing: /usr/local/include/vc4cl-stdlib/_extensions.h
-- Installing: /usr/local/include/vc4cl-stdlib/_geometric.h
-- Installing: /usr/local/include/vc4cl-stdlib/_images.h
-- Installing: /usr/local/include/vc4cl-stdlib/_overloads.h
-- Installing: /usr/local/include/vc4cl-stdlib/_math.h
-- Installing: /usr/local/include/vc4cl-stdlib/_vector.h
-- Installing: /usr/local/include/vc4cl-stdlib/_intrinsics.h
-- Installing: /usr/local/include/vc4cl-stdlib/_synchronization.h
-- Installing: /usr/local/include/vc4cl-stdlib/_conversions.h
-- Installing: /usr/local/include/vc4cl-stdlib/_clcxx_mangling.h
-- Installing: /usr/local/include/vc4cl-stdlib/_float_float.h
-- Installing: /usr/local/include/vc4cl-stdlib/_async.h
-- Installing: /usr/local/include/vc4cl-stdlib/VC4CLStdLib.h

$ cd ../../VC4CL
$ mkdir build && cd build
$ cmake ..

-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1") 
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for CL_VERSION_3_0
-- Looking for CL_VERSION_3_0 - found
-- Found OpenCL: /usr/lib/arm-linux-gnueabihf/libOpenCL.so (found version "3.0") 
-- Found headers for OpenCL up to version 3.0 located in /usr/include
-- No VC4C compiler library found!
-- VC4C compiler header found at: /home/dietpi/opencl/VC4C/include/VC4C.h
-- Looking for wsyncup in /usr/lib/arm-linux-gnueabihf/libcurses.so
-- Looking for wsyncup in /usr/lib/arm-linux-gnueabihf/libcurses.so - found
-- Looking for cbreak in /usr/lib/arm-linux-gnueabihf/libncurses.so
-- Looking for cbreak in /usr/lib/arm-linux-gnueabihf/libncurses.so - found
-- Looking for nodelay in /usr/lib/arm-linux-gnueabihf/libncurses.so
-- Looking for nodelay in /usr/lib/arm-linux-gnueabihf/libncurses.so - found
-- Found Curses: /usr/lib/arm-linux-gnueabihf/libncurses.so  
-- vcsm library not found
-- found clang-format: /usr/bin/clang-format
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
VC4CC_LIBRARY
    linked by target "VC4CL" in directory /home/dietpi/opencl/VC4CL/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

$ make


  • hardware/raspberry_pi/dietpi/opencl_on_videocore_iv_gpu.1713908101.txt.gz
  • 最終更新: 2024/04/24 06:35
  • by ともやん