両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
hardware:raspberry_pi:dietpi:opencl_on_videocore_iv_gpu [2024/04/24 14:02] – [VC4C のビルド & インストール] ともやん | hardware:raspberry_pi:dietpi:opencl_on_videocore_iv_gpu [2024/04/26 07:30] (現在) – [clinfo で動作確認😍] ともやん |
---|
====== VideoCore IV GPU で OpenCL ====== | ====== Raspberry Pi Zero WH VideoCore IV GPU で OpenCL🤤 ====== |
本家: [[git>doe300/VC4CL|doe300/VC4CL: OpenCL implementation running on the VideoCore IV GPU of the Raspberry Pi models]]\\ | 本家: [[git>doe300/VC4CL|doe300/VC4CL: OpenCL implementation running on the VideoCore IV GPU of the Raspberry Pi models]]\\ |
| |
make[1]: *** [CMakeFiles/Makefile2:525: test/CMakeFiles/TestVC4C.dir/all] Error 2 | make[1]: *** [CMakeFiles/Makefile2:525: test/CMakeFiles/TestVC4C.dir/all] Error 2 |
make: *** [Makefile:166: all] Error 2 | make: *** [Makefile:166: all] Error 2 |
| </pre></html></WRAP> |
| <WRAP color_command><html><pre> |
| <font color="#AFFF00"><b>$</b></font> <font color="#26A269">git</font> diff |
| </pre></html></WRAP> |
| <WRAP color_result_hlong><html><pre><b>diff --git a/test/TestInstructions.cpp b/test/TestInstructions.cpp</b> |
| <b>index 75501e8..1329d0a 100644</b> |
| <b>--- a/test/TestInstructions.cpp</b> |
| <b>+++ b/test/TestInstructions.cpp</b> |
| <font color="#2AA1B3">@@ -824,7 +824,7 @@</font> void TestInstructions::testOpCodeFlags() |
| return false; |
| }; |
| |
| <font color="#C01C28">- auto INT_MAX = Value(Literal(0x7FFFFFFFu), TYPE_INT32);</font> |
| <font color="#26A269">+ auto INT_MAX2 = Value(Literal(0x7FFFFFFFu), TYPE_INT32);</font> |
| auto FLOAT_MINUS_ONE = Value(Literal(-1.0f), TYPE_FLOAT); |
| |
| TEST_ASSERT(checkFlagClear(OP_ADD(INT_ONE, INT_ONE).second, FlagsMask::ZERO)) |
| <font color="#2AA1B3">@@ -834,7 +834,7 @@</font> void TestInstructions::testOpCodeFlags() |
| TEST_ASSERT(checkFlagSet(OP_ADD(INT_ONE, INT_MINUS_ONE).second, FlagsMask::ZERO)) |
| TEST_ASSERT(checkFlagSet(OP_ADD(INT_MINUS_ONE, INT_MINUS_ONE).second, FlagsMask::NEGATIVE)) |
| TEST_ASSERT(checkFlagSet(OP_ADD(INT_MINUS_ONE, INT_MINUS_ONE).second, FlagsMask::CARRY)) |
| <font color="#C01C28">- TEST_ASSERT(checkFlagSet(OP_ADD(INT_MAX, INT_MAX).second, FlagsMask::SIGNED_OVERFLOW))</font> |
| <font color="#26A269">+ TEST_ASSERT(checkFlagSet(OP_ADD(INT_MAX2, INT_MAX2).second, FlagsMask::SIGNED_OVERFLOW))</font> |
| |
| TEST_ASSERT(checkFlagClear(OP_AND(INT_ONE, INT_ONE).second, FlagsMask::ZERO)) |
| TEST_ASSERT(checkFlagClear(OP_AND(INT_ONE, INT_ONE).second, FlagsMask::NEGATIVE)) |
| <font color="#2AA1B3">@@ -977,7 +977,7 @@</font> void TestInstructions::testOpCodeFlags() |
| TEST_ASSERT(checkFlagSet(OP_SUB(INT_ONE, INT_ONE).second, FlagsMask::ZERO)) |
| TEST_ASSERT(checkFlagSet(OP_SUB(INT_MINUS_ONE, INT_ONE).second, FlagsMask::NEGATIVE)) |
| TEST_ASSERT(checkFlagClear(OP_SUB(INT_MINUS_ONE, INT_ONE).second, FlagsMask::CARRY)) |
| <font color="#C01C28">- TEST_ASSERT(checkFlagSet(OP_SUB(INT_MAX, INT_MINUS_ONE).second, FlagsMask::SIGNED_OVERFLOW))</font> |
| <font color="#26A269">+ TEST_ASSERT(checkFlagSet(OP_SUB(INT_MAX2, INT_MINUS_ONE).second, FlagsMask::SIGNED_OVERFLOW))</font> |
| |
| TEST_ASSERT(checkFlagClear(OP_XOR(INT_ONE, INT_MINUS_ONE).second, FlagsMask::ZERO)) |
| TEST_ASSERT(checkFlagClear(OP_XOR(INT_ONE, INT_ONE).second, FlagsMask::NEGATIVE)) |
| </pre></html></WRAP> |
| <WRAP color_command><html><pre> |
| <font color="#AFFF00"><b>$</b></font> <font color="#26A269">make</font> |
| </pre></html></WRAP> |
| <WRAP color_result_hlong><html><pre> |
| [ 1%] <font color="#12488B"><b>Performing update step for 'cpplog-project'</b></font> |
| From https://github.com/doe300/cpplog |
| * branch HEAD -> FETCH_HEAD |
| Already up to date. |
| [ 1%] <font color="#12488B"><b>No patch step for 'cpplog-project'</b></font> |
| [ 1%] <font color="#12488B"><b>Performing configure step for 'cpplog-project'</b></font> |
| -- Configuring done |
| -- Generating done |
| -- Build files have been written to: /home/dietpi/opencl/VC4C/build/cpplog/src/cpplog-project-build |
| [ 2%] <font color="#12488B"><b>Performing build step for 'cpplog-project'</b></font> |
| [ 50%] Built target cpplog |
| [100%] Built target cpplog-static |
| [ 3%] Built target cpplog-project-build |
| [ 48%] Built target VC4CC |
| [ 48%] Built target GetGitCommit |
| [ 48%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4C.dir/main.cpp.o</font> |
| [ 48%] <font color="#26A269"><b>Linking CXX executable vc4c</b></font> |
| [ 48%] Built target VC4C |
| [ 50%] Built target qpu_emulator |
| [ 88%] Built target TestData |
| [ 89%] <font color="#12488B"><b>Performing update step for 'cpptest-lite-project'</b></font> |
| From https://github.com/doe300/cpptest-lite |
| * branch HEAD -> FETCH_HEAD |
| Already up to date. |
| [ 89%] <font color="#12488B"><b>No patch step for 'cpptest-lite-project'</b></font> |
| [ 89%] <font color="#12488B"><b>Performing configure step for 'cpptest-lite-project'</b></font> |
| -- Configuring done |
| -- Generating done |
| -- Build files have been written to: /home/dietpi/opencl/VC4C/build/cpptest-lite/src/cpptest-lite-project-build |
| [ 90%] <font color="#12488B"><b>Performing build step for 'cpptest-lite-project'</b></font> |
| [100%] Built target cpptest-lite |
| [ 91%] Built target cpptest-lite-project-build |
| [ 91%] <font color="#26A269">Building CXX object test/CMakeFiles/TestVC4C.dir/TestInstructions.cpp.o</font> |
| <b><command-line>:</b> <font color="#A347BA"><b>warning: </b></font>"_GNU_SOURCE" redefined |
| <b><command-line>:</b> <font color="#2AA1B3"><b>note: </b></font>this is the location of the previous definition |
| [ 92%] <font color="#26A269">Building CXX object test/CMakeFiles/TestVC4C.dir/TestIntrinsics.cpp.o</font> |
| <b><command-line>:</b> <font color="#A347BA"><b>warning: </b></font>"_GNU_SOURCE" redefined |
| <b><command-line>:</b> <font color="#2AA1B3"><b>note: </b></font>this is the location of the previous definition |
| [ 92%] <font color="#26A269">Building CXX object test/CMakeFiles/TestVC4C.dir/TestMathFunctions.cpp.o</font> |
| <b><command-line>:</b> <font color="#A347BA"><b>warning: </b></font>"_GNU_SOURCE" redefined |
| <b><command-line>:</b> <font color="#2AA1B3"><b>note: </b></font>this is the location of the previous definition |
| [ 92%] <font color="#26A269">Building CXX object test/CMakeFiles/TestVC4C.dir/TestOperators.cpp.o</font> |
| <b><command-line>:</b> <font color="#A347BA"><b>warning: </b></font>"_GNU_SOURCE" redefined |
| <b><command-line>:</b> <font color="#2AA1B3"><b>note: </b></font>this is the location of the previous definition |
| [ 93%] <font color="#26A269">Building CXX object test/CMakeFiles/TestVC4C.dir/TestOptimizations.cpp.o</font> |
| <b><command-line>:</b> <font color="#A347BA"><b>warning: </b></font>"_GNU_SOURCE" redefined |
| <b><command-line>:</b> <font color="#2AA1B3"><b>note: </b></font>this is the location of the previous definition |
| [ 93%] <font color="#26A269">Building CXX object test/CMakeFiles/TestVC4C.dir/TestOptimizationSteps.cpp.o</font> |
| <b><command-line>:</b> <font color="#A347BA"><b>warning: </b></font>"_GNU_SOURCE" redefined |
| <b><command-line>:</b> <font color="#2AA1B3"><b>note: </b></font>this is the location of the previous definition |
| [ 94%] <font color="#26A269">Building CXX object test/CMakeFiles/TestVC4C.dir/TestPatternMatching.cpp.o</font> |
| <b><command-line>:</b> <font color="#A347BA"><b>warning: </b></font>"_GNU_SOURCE" redefined |
| <b><command-line>:</b> <font color="#2AA1B3"><b>note: </b></font>this is the location of the previous definition |
| [ 94%] <font color="#26A269">Building CXX object test/CMakeFiles/TestVC4C.dir/TestRegisterFixes.cpp.o</font> |
| <b><command-line>:</b> <font color="#A347BA"><b>warning: </b></font>"_GNU_SOURCE" redefined |
| <b><command-line>:</b> <font color="#2AA1B3"><b>note: </b></font>this is the location of the previous definition |
| [ 95%] <font color="#26A269"><b>Linking CXX executable TestVC4C</b></font> |
| /usr/bin/ld: warning: transpose.cl.o: missing .note.GNU-stack section implies executable stack |
| /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker |
| [100%] Built target TestVC4C |
| </pre></html></WRAP> |
| <WRAP color_command><html><pre> |
| <font color="#AFFF00"><b>$</b></font> <font color="#26A269">sudo</font> <font color="#26A269">make</font> install <font color="#12488B"><b>&&</b></font> <font color="#26A269">sudo</font> <font color="#C01C28"><b>ldconfig</b></font> |
| </pre></html></WRAP> |
| <WRAP color_result_hlong><html><pre> |
| [ 1%] <font color="#12488B"><b>Performing update step for 'cpplog-project'</b></font> |
| From https://github.com/doe300/cpplog |
| * branch HEAD -> FETCH_HEAD |
| Already up to date. |
| [ 1%] <font color="#12488B"><b>No patch step for 'cpplog-project'</b></font> |
| [ 1%] <font color="#12488B"><b>Performing configure step for 'cpplog-project'</b></font> |
| -- Configuring done |
| -- Generating done |
| -- Build files have been written to: /home/dietpi/opencl/VC4C/build/cpplog/src/cpplog-project-build |
| [ 2%] <font color="#12488B"><b>Performing build step for 'cpplog-project'</b></font> |
| [ 50%] Built target cpplog |
| [100%] Built target cpplog-static |
| [ 3%] Built target cpplog-project-build |
| [ 48%] Built target VC4CC |
| [ 48%] Built target GetGitCommit |
| [ 48%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4C.dir/main.cpp.o</font> |
| [ 48%] <font color="#26A269"><b>Linking CXX executable vc4c</b></font> |
| [ 48%] Built target VC4C |
| [ 50%] Built target qpu_emulator |
| [ 88%] Built target TestData |
| [ 89%] <font color="#12488B"><b>Performing update step for 'cpptest-lite-project'</b></font> |
| From https://github.com/doe300/cpptest-lite |
| * branch HEAD -> FETCH_HEAD |
| Already up to date. |
| [ 89%] <font color="#12488B"><b>No patch step for 'cpptest-lite-project'</b></font> |
| [ 89%] <font color="#12488B"><b>Performing configure step for 'cpptest-lite-project'</b></font> |
| -- Configuring done |
| -- Generating done |
| -- Build files have been written to: /home/dietpi/opencl/VC4C/build/cpptest-lite/src/cpptest-lite-project-build |
| [ 90%] <font color="#12488B"><b>Performing build step for 'cpptest-lite-project'</b></font> |
| [100%] Built target cpptest-lite |
| [ 91%] Built target cpptest-lite-project-build |
| [100%] Built target TestVC4C |
| <font color="#2AA1B3">Install the project...</font> |
| -- Install configuration: "Debug" |
| -- Installing: /usr/local/lib/cmake/mpark_variant/mpark_variant-targets.cmake |
| -- Installing: /usr/local/include/mpark |
| -- Installing: /usr/local/include/mpark/variant.hpp |
| -- Installing: /usr/local/include/mpark/lib.hpp |
| -- Installing: /usr/local/include/mpark/in_place.hpp |
| -- Installing: /usr/local/include/mpark/config.hpp |
| -- Installing: /usr/local/lib/cmake/mpark_variant/mpark_variant-config.cmake |
| -- Installing: /usr/local/lib/cmake/mpark_variant/mpark_variant-config-version.cmake |
| -- Installing: /usr/local/lib/libVC4CC.so.0.4.9999 |
| -- Installing: /usr/local/lib/libVC4CC.so.1.2 |
| -- Set runtime path of "/usr/local/lib/libVC4CC.so.0.4.9999" to "/usr/local/lib" |
| -- Installing: /usr/local/lib/libVC4CC.so |
| -- Installing: /usr/local/bin/vc4c |
| -- Set runtime path of "/usr/local/bin/vc4c" to "/usr/local/lib" |
| -- Installing: /usr/local/share/vc4cc/VC4CC-targets.cmake |
| -- Installing: /usr/local/share/vc4cc/VC4CC-targets-debug.cmake |
| -- Installing: /usr/local/include/vc4cc |
| -- Installing: /usr/local/include/vc4cc/CompilationError.h |
| -- Installing: /usr/local/include/vc4cc/VC4C.h |
| -- Installing: /usr/local/include/vc4cc/config.h |
| -- Installing: /usr/local/include/vc4cc/Compiler.h |
| -- Installing: /usr/local/include/vc4cc/Precompiler.h |
| -- Installing: /usr/local/include/vc4cc/tools.h |
| -- Installing: /usr/local/lib/libvc4c_testdata.a |
| -- Installing: /usr/local/share/vc4cc/TestData-target.cmake |
| -- Installing: /usr/local/share/vc4cc/TestData-target-debug.cmake |
| -- Installing: /usr/local/include/vc4cc/TestData.h |
</pre></html></WRAP> | </pre></html></WRAP> |
</WRAP> | </WRAP> |
| |
| 参考: [[git>doe300/VC4C/issues/166|VC4C build error (make compile error) · Issue #166 · doe300/VC4C]]\\ |
| |
==== VC4CL のビルド & インストール ==== | ==== VC4CL のビルド & インストール ==== |
<font color="#AFFF00"><b>$</b></font> <font color="#26A269">cd</font> <u style="text-decoration-style:single">../../VC4CL</u> | <font color="#AFFF00"><b>$</b></font> <font color="#26A269">cd</font> <u style="text-decoration-style:single">../../VC4CL</u> |
<font color="#AFFF00"><b>$</b></font> <font color="#26A269">mkdir</font> build <font color="#12488B"><b>&&</b></font> <font color="#26A269">cd</font> build | <font color="#AFFF00"><b>$</b></font> <font color="#26A269">mkdir</font> build <font color="#12488B"><b>&&</b></font> <font color="#26A269">cd</font> build |
<font color="#AFFF00"><b>$</b></font> <font color="#26A269">cmake</font><font color="#999999"> </font><font color="#999999"><u style="text-decoration-style:single">..</u></font> | <font color="#AFFF00"><b>$</b></font> <font color="#26A269">cmake</font> <font color="#A347BA">-DBUILD_ICD=ON</font> <u style="text-decoration-style:single">..</u> |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_result_hlong><html><pre> | <WRAP color_result_hlong><html><pre> |
-- Found OpenCL: /usr/lib/arm-linux-gnueabihf/libOpenCL.so (found version "3.0") | -- 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 | -- Found headers for OpenCL up to version 3.0 located in /usr/include |
-- No VC4C compiler library found! | -- VC4C library found: /home/dietpi/opencl/VC4C/build/src/libVC4CC.so |
-- VC4C compiler header found at: /home/dietpi/opencl/VC4C/include/VC4C.h | -- VC4C compiler header found at: /home/dietpi/opencl/VC4C/include/VC4C.h |
| -- VC4C test data library found: /home/dietpi/opencl/VC4C/build/test/libvc4c_testdata.a |
| -- VC4C test data header found: /home/dietpi/opencl/VC4C/build/test/TestData.h |
| -- Building with ICD support |
| -- Checking for one of the modules 'ocl-icd>=1.3' |
| -- Found Khronos ICD Loader in version 2.3.1 in /usr/lib/arm-linux-gnueabihf |
| -- Looking for clCreateProgramWithIL |
| -- Looking for clCreateProgramWithIL - found |
-- Looking for wsyncup in /usr/lib/arm-linux-gnueabihf/libcurses.so | -- 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 wsyncup in /usr/lib/arm-linux-gnueabihf/libcurses.so - found |
-- found clang-format: /usr/bin/clang-format | -- found clang-format: /usr/bin/clang-format |
-- Configuring done | -- 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 | -- Generating done |
CMake Generate step failed. Build files cannot be regenerated correctly. | -- Build files have been written to: /home/dietpi/opencl/VC4CL/build |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_result_hlong><html><pre> | <WRAP color_result_hlong><html><pre> |
| [ 0%] Built target GetGitCommit |
| [ 2%] <font color="#12488B"><b>Generating VC4CL.icd</b></font> |
| [ 2%] Built target generate_icd |
| [ 5%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/barriers.cpp.o</font> |
| [ 8%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/Buffer.cpp.o</font> |
| [ 11%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/CommandQueue.cpp.o</font> |
| [ 14%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/common.cpp.o</font> |
| [ 17%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/Context.cpp.o</font> |
| [ 20%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/Device.cpp.o</font> |
| [ 22%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/Event.cpp.o</font> |
| [ 25%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/executor.cpp.o</font> |
| [ 28%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/extensions.cpp.o</font> |
| [ 31%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/icd_loader.cpp.o</font> |
| [ 34%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/Image.cpp.o</font> |
| [ 37%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/Kernel.cpp.o</font> |
| [ 40%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/Memory.cpp.o</font> |
| [ 42%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/ObjectTracker.cpp.o</font> |
| [ 45%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/PerformanceCounter.cpp.o</font> |
| [ 48%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/Platform.cpp.o</font> |
| [ 51%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/Program.cpp.o</font> |
| <b>/home/dietpi/opencl/VC4CL/src/Program.cpp:</b> In function ‘<b>cl_int extractLog(std::string&, std::wstringstream&)</b>’: |
| <b>/home/dietpi/opencl/VC4CL/src/Program.cpp:69:46:</b> <font color="#A347BA"><b>warning: </b></font>argument 1 is null but the corresponding size argument 3 value is 4294967295 [<font color="#A347BA"><b>-Wnonnull</b></font>] |
| 69 | std::size_t numCharacters = <font color="#A347BA"><b>std::wcstombs(nullptr, logStream.str().data(), SIZE_MAX)</b></font>; |
| | <font color="#A347BA"><b>~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</b></font> |
| In file included from <b>/usr/include/c++/12/cstdlib:75</b>, |
| from <b>/usr/include/c++/12/ext/string_conversions.h:41</b>, |
| from <b>/usr/include/c++/12/bits/basic_string.h:3960</b>, |
| from <b>/usr/include/c++/12/string:53</b>, |
| from <b>/home/dietpi/opencl/VC4CL/src/vc4cl_config.h:17</b>, |
| from <b>/home/dietpi/opencl/VC4CL/src/icd_loader.h:15</b>, |
| from <b>/home/dietpi/opencl/VC4CL/src/types.h:10</b>, |
| from <b>/home/dietpi/opencl/VC4CL/src/ObjectTracker.h:10</b>, |
| from <b>/home/dietpi/opencl/VC4CL/src/Object.h:10</b>, |
| from <b>/home/dietpi/opencl/VC4CL/src/Device.h:10</b>, |
| from <b>/home/dietpi/opencl/VC4CL/src/Context.h:9</b>, |
| from <b>/home/dietpi/opencl/VC4CL/src/Program.h:11</b>, |
| from <b>/home/dietpi/opencl/VC4CL/src/Program.cpp:7</b>: |
| <b>/usr/include/stdlib.h:958:15:</b> <font color="#2AA1B3"><b>note: </b></font>in a call to function ‘<b>size_t wcstombs(char*, const wchar_t*, size_t)</b>’ declared with attribute ‘<b>access (read_only, 2)</b>’ |
| 958 | extern size_t <font color="#2AA1B3"><b>wcstombs</b></font> (char *__restrict __s, |
| | <font color="#2AA1B3"><b>^~~~~~~~</b></font> |
| <b>/home/dietpi/opencl/VC4CL/src/Program.cpp:69:46:</b> <font color="#A347BA"><b>warning: </b></font>argument 1 is null but the corresponding size argument 3 value is 4294967295 [<font color="#A347BA"><b>-Wnonnull</b></font>] |
| 69 | std::size_t numCharacters = <font color="#A347BA"><b>std::wcstombs(nullptr, logStream.str().data(), SIZE_MAX)</b></font>; |
| | <font color="#A347BA"><b>~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</b></font> |
| <b>/usr/include/stdlib.h:958:15:</b> <font color="#2AA1B3"><b>note: </b></font>in a call to function ‘<b>size_t wcstombs(char*, const wchar_t*, size_t)</b>’ declared with attribute ‘<b>access (read_only, 2)</b>’ |
| 958 | extern size_t <font color="#2AA1B3"><b>wcstombs</b></font> (char *__restrict __s, |
| | <font color="#2AA1B3"><b>^~~~~~~~</b></font> |
| [ 54%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/queue_handler.cpp.o</font> |
| [ 57%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/TextureFormat.cpp.o</font> |
| [ 60%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/unsupported.cpp.o</font> |
| [ 62%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/shared/BinaryHeader.cpp.o</font> |
| [ 65%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/hal/emulator.cpp.o</font> |
| [ 68%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/hal/hal.cpp.o</font> |
| [ 71%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/hal/Mailbox.cpp.o</font> |
| [ 74%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/hal/userland.cpp.o</font> |
| [ 77%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/hal/V3D.cpp.o</font> |
| [ 80%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/hal/VCHI.cpp.o</font> |
| [ 82%] <font color="#26A269"><b>Linking CXX shared library libVC4CL.so</b></font> |
| [ 82%] Built target VC4CL |
| [ 85%] <font color="#26A269">Building CXX object tools/CMakeFiles/v3d_info.dir/V3DInfo.cpp.o</font> |
| [ 88%] <font color="#26A269"><b>Linking CXX executable v3d_info</b></font> |
| [ 88%] Built target v3d_info |
| [ 91%] <font color="#26A269">Building CXX object tools/CMakeFiles/v3d_profile.dir/V3DProfile.cpp.o</font> |
| <b>/home/dietpi/opencl/VC4CL/tools/V3DProfile.cpp:</b> In function ‘<b>int main(int, char**)</b>’: |
| <b>/home/dietpi/opencl/VC4CL/tools/V3DProfile.cpp:239:45:</b> <font color="#A347BA"><b>warning: </b></font>conversion from ‘<b>unsigned int</b>’ to ‘<b>uint8_t</b>’ {aka ‘<b>unsigned char</b>’} may change value [<font color="#A347BA"><b>-Wconversion</b></font>] |
| 239 | newCounters[i] = v3d.getCounter(<font color="#A347BA"><b>i</b></font>); |
| | <font color="#A347BA"><b>^</b></font> |
| [ 94%] <font color="#26A269"><b>Linking CXX executable v3d_profile</b></font> |
| [ 94%] Built target v3d_profile |
| [ 97%] <font color="#26A269">Building CXX object tools/CMakeFiles/vc4cl_dump_analyzer.dir/DumpAnalyzer.cpp.o</font> |
| [100%] <font color="#26A269"><b>Linking CXX executable vc4cl_dump_analyzer</b></font> |
| [100%] Built target vc4cl_dump_analyzer |
| </pre></html></WRAP> |
| <WRAP color_command><html><pre> |
| <font color="#AFFF00"><b>$</b></font> <font color="#26A269">sudo</font> <font color="#26A269">make</font> install |
| </pre></html></WRAP> |
| <WRAP color_result_hlong><html><pre> |
| [ 0%] Built target GetGitCommit |
| [ 2%] Built target generate_icd |
| [ 5%] <font color="#26A269">Building CXX object src/CMakeFiles/VC4CL.dir/common.cpp.o</font> |
| [ 8%] <font color="#26A269"><b>Linking CXX shared library libVC4CL.so</b></font> |
| [ 82%] Built target VC4CL |
| [ 85%] <font color="#26A269"><b>Linking CXX executable v3d_info</b></font> |
| [ 88%] Built target v3d_info |
| [ 91%] <font color="#26A269"><b>Linking CXX executable v3d_profile</b></font> |
| [ 94%] Built target v3d_profile |
| [ 97%] <font color="#26A269"><b>Linking CXX executable vc4cl_dump_analyzer</b></font> |
| [100%] Built target vc4cl_dump_analyzer |
| <font color="#2AA1B3">Install the project...</font> |
| -- Install configuration: "Debug" |
| -- Installing: /etc/OpenCL/vendors/VC4CL.icd |
| -- Installing: /usr/local/lib/libVC4CL.so.0.4.9999 |
| -- Installing: /usr/local/lib/libVC4CL.so.1.2 |
| -- Set runtime path of "/usr/local/lib/libVC4CL.so.0.4.9999" to "/usr/local/lib" |
| -- Installing: /usr/local/lib/libVC4CL.so |
| -- Installing: /usr/local/share/vc4cl/VC4CL-targets.cmake |
| -- Installing: /usr/local/share/vc4cl/VC4CL-targets-debug.cmake |
| -- Installing: /usr/local/bin/v3d_info |
| -- Set runtime path of "/usr/local/bin/v3d_info" to "/usr/local/lib" |
| -- Installing: /usr/local/bin/v3d_profile |
| -- Set runtime path of "/usr/local/bin/v3d_profile" to "/usr/local/lib" |
| -- Installing: /usr/local/bin/vc4cl_dump_analyzer |
| -- Set runtime path of "/usr/local/bin/vc4cl_dump_analyzer" to "/usr/local/lib" |
</pre></html></WRAP> | </pre></html></WRAP> |
</WRAP> | </WRAP> |
| |
| ==== clinfo で動作確認😍 ==== |
| Raspbian GNU/Linux 12 (bookworm) armv6l\\ |
| Raspberry Pi Zero W Rev 1.1\\ |
| <WRAP color_term> |
| <WRAP color_command><html><pre> |
| <font color="#AFFF00"><b>$</b></font> <font color="#26A269">neofetch</font> |
| </pre></html></WRAP> |
| <WRAP color_result><html><pre class=BSc> |
| <font color="#26A269"><b> `.::///+:/-. --///+//-:``</b></font> <font color="#26A269"><b>dietpi</b></font>@<font color="#26A269"><b>dietpi-001</b></font> |
| <font color="#26A269"><b> `+oooooooooooo: `+oooooooooooo:</b></font> ----------------- |
| <font color="#26A269"><b> /oooo++//ooooo: ooooo+//+ooooo.</b></font> <font color="#C01C28"><b>OS</b></font>: Raspbian GNU/Linux 12 (bookworm) armv6l |
| <font color="#26A269"><b> `+ooooooo:-:oo- +o+::/ooooooo:</b></font> <font color="#C01C28"><b>Host</b></font>: Raspberry Pi Zero W Rev 1.1 |
| <font color="#26A269"><b> `:oooooooo+`` `.oooooooo+-</b></font> <font color="#C01C28"><b>Kernel</b></font>: 6.1.21+ |
| <font color="#26A269"><b> `:++ooo/. :+ooo+/.`</b></font> <font color="#C01C28"><b>Uptime</b></font>: 4 days, 1 hour, 16 mins |
| <font color="#26A269"><b> </b></font><font color="#C01C28"><b>...` `.----.` ``..</b></font> <font color="#C01C28"><b>Packages</b></font>: 1628 (dpkg) |
| <font color="#C01C28"><b> .::::-``:::::::::.`-:::-`</b></font> <font color="#C01C28"><b>Shell</b></font>: zsh 5.9 |
| <font color="#C01C28"><b> -:::-` .:::::::-` `-:::-</b></font> <font color="#C01C28"><b>Terminal</b></font>: /dev/pts/2 |
| <font color="#C01C28"><b> `::. `.--.` `` `.---.``.::`</b></font> <font color="#C01C28"><b>CPU</b></font>: BCM2835 (1) @ 1.100GHz |
| <font color="#C01C28"><b> .::::::::` -::::::::` `</b></font> <font color="#C01C28"><b>Memory</b></font>: 68MiB / 429MiB |
| <font color="#C01C28"><b> .::` .:::::::::- `::::::::::``::.</b></font> |
| <font color="#C01C28"><b>-:::` ::::::::::. ::::::::::.`:::-</b></font> <span style="background-color:#171421"><font color="#171421"> </font></span><span style="background-color:#C01C28"><font color="#C01C28"> </font></span><span style="background-color:#26A269"><font color="#26A269"> </font></span><span style="background-color:#A2734C"><font color="#A2734C"> </font></span><span style="background-color:#12488B"><font color="#12488B"> </font></span><span style="background-color:#A347BA"><font color="#A347BA"> </font></span><span style="background-color:#2AA1B3"><font color="#2AA1B3"> </font></span><span style="background-color:#D0CFCC"><font color="#D0CFCC"> </font></span> |
| <font color="#C01C28"><b>:::: -::::::::. `-:::::::: ::::</b></font> <span style="background-color:#5E5C64"><font color="#5E5C64"> </font></span><span style="background-color:#F66151"><font color="#F66151"> </font></span><span style="background-color:#33D17A"><font color="#33D17A"> </font></span><span style="background-color:#E9AD0C"><font color="#E9AD0C"> </font></span><span style="background-color:#2A7BDE"><font color="#2A7BDE"> </font></span><span style="background-color:#C061CB"><font color="#C061CB"> </font></span><span style="background-color:#33C7DE"><font color="#33C7DE"> </font></span><span style="background-color:#FFFFFF"><font color="#FFFFFF"> </font></span> |
| <font color="#C01C28"><b>-::- .-:::-.``....``.-::-. -::-</b></font> |
| <font color="#C01C28"><b> .. `` .::::::::. `..`..</b></font> |
| <font color="#C01C28"><b> -:::-` -::::::::::` .:::::`</b></font> |
| <font color="#C01C28"><b> :::::::` -::::::::::` :::::::.</b></font> |
| <font color="#C01C28"><b> .::::::: -::::::::. ::::::::</b></font> |
| <font color="#C01C28"><b> `-:::::` ..--.` ::::::.</b></font> |
| <font color="#C01C28"><b> `...` `...--..` `...`</b></font> |
| <font color="#C01C28"><b> .::::::::::</b></font> |
| <font color="#C01C28"><b> `.-::::-`</b></font> |
| |
| </pre></html></WRAP> |
| <WRAP color_command><html><pre> |
| <font color="#AFFF00"><b>$</b></font> <font color="#26A269">sudo</font> <font color="#26A269">clinfo</font> |
| </pre></html></WRAP> |
| <WRAP color_result_long><html><pre> |
| Number of platforms 1 |
| Platform Name OpenCL for the Raspberry Pi VideoCore IV GPU |
| Platform Vendor doe300 |
| Platform Version OpenCL 1.2 VC4CL 0.4.9999 (b5a6097) |
| Platform Profile EMBEDDED_PROFILE |
| Platform Extensions cl_khr_il_program cl_khr_spir cl_khr_create_command_queue cl_altera_device_temperature cl_altera_live_object_tracking cl_khr_icd cl_khr_extended_versioning cl_khr_spirv_no_integer_wrap_decoration cl_khr_suggested_local_work_size cl_vc4cl_performance_counters |
| Platform Extensions function suffix VC4CL |
| |
| Platform Name OpenCL for the Raspberry Pi VideoCore IV GPU |
| Number of devices 1 |
| Device Name VideoCore IV GPU |
| Device Vendor Broadcom |
| Device Vendor ID 0x14e4 |
| Device Version OpenCL 1.2 VC4CL 0.4.9999 (b5a6097) |
| Device Numeric Version 0x402000 (1.2.0) |
| Driver Version 0.4.9999 |
| Device OpenCL C Version OpenCL C 1.2 |
| Device OpenCL C Numeric Version 0x402000 (1.2.0) |
| Device Type GPU |
| Device Profile EMBEDDED_PROFILE |
| Device Available Yes |
| Compiler Available Yes |
| Linker Available Yes |
| Max compute units 1 |
| Available core IDs (ARM) 0 |
| Max clock frequency 300MHz |
| Core Temperature (Altera) 42 C |
| Device Partition (core) |
| Max number of sub-devices 0 |
| Supported partition types None |
| Supported affinity domains (n/a) |
| Max work item dimensions 3 |
| Max work item sizes 12x12x12 |
| Max work group size 12 |
| Preferred work group size multiple (kernel) 1 |
| Preferred / native vector sizes |
| char 16 / 16 |
| short 16 / 16 |
| int 16 / 16 |
| long 0 / 0 |
| half 0 / 0 (n/a) |
| float 16 / 16 |
| double 0 / 0 (n/a) |
| Half-precision Floating-point support (n/a) |
| Single-precision Floating-point support (core) |
| Denormals No |
| Infinity and NANs No |
| Round to nearest No |
| Round to zero Yes |
| Round to infinity No |
| IEEE754-2008 fused multiply-add No |
| Support is emulated in software No |
| Correctly-rounded divide and sqrt operations No |
| Double-precision Floating-point support (n/a) |
| Address bits 32, Little-Endian |
| Global memory size 67108864 (64MiB) |
| Error Correction support No |
| Max memory allocation 33554432 (32MiB) |
| Unified memory for Host and Device Yes |
| Minimum alignment for any data type 64 bytes |
| Alignment of base address 512 bits (64 bytes) |
| Global Memory cache type Read/Write |
| Global Memory cache size 32768 (32KiB) |
| Global Memory cache line size 64 bytes |
| Image support No |
| Local memory type Global |
| Local memory size 67108864 (64MiB) |
| Max number of constant args 32 |
| Max constant buffer size 67108864 (64MiB) |
| Max size of kernel argument 256 |
| Queue properties |
| Out-of-order execution No |
| Profiling Yes |
| Prefer user sync for interop Yes |
| Profiling timer resolution 1ns |
| Execution capabilities |
| Run OpenCL kernels Yes |
| Run native kernels No |
| IL version SPIR-V_1.5 SPIR_1.2 |
| ILs with version SPIR 0x402000 (1.2.0) |
| SPIR-V 0x405000 (1.5.0) |
| SPIR versions 1.2 |
| printf() buffer size 0 |
| Built-in kernels (n/a) |
| Built-in kernels with version (n/a) |
| Device Extensions cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_nv_pragma_unroll cl_arm_core_id cl_ext_atomic_counters_32 cl_khr_initialize_memory cl_arm_integer_dot_product_int8 cl_arm_integer_dot_product_accumulate_int8 cl_arm_integer_dot_product_accumulate_int16 cl_arm_integer_dot_product_accumulate_saturate_int8 cl_khr_expect_assume cl_khr_il_program cl_khr_spir cl_khr_create_command_queue cl_altera_device_temperature cl_altera_live_object_tracking cl_khr_icd cl_khr_extended_versioning cl_khr_spirv_no_integer_wrap_decoration cl_khr_suggested_local_work_size cl_vc4cl_performance_counters |
| Device Extensions with Version cl_khr_global_int32_base_atomics 0x400000 (1.0.0) |
| cl_khr_global_int32_extended_atomics 0x400000 (1.0.0) |
| cl_khr_local_int32_base_atomics 0x400000 (1.0.0) |
| cl_khr_local_int32_extended_atomics 0x400000 (1.0.0) |
| cl_khr_byte_addressable_store 0x400000 (1.0.0) |
| cl_nv_pragma_unroll 0 (0.0.0) |
| cl_arm_core_id 0x800000 (2.0.0) |
| cl_ext_atomic_counters_32 0x1400000 (5.0.0) |
| cl_khr_initialize_memory 0x400000 (1.0.0) |
| cl_arm_integer_dot_product_int8 0xc00000 (3.0.0) |
| cl_arm_integer_dot_product_accumulate_int8 0xc00000 (3.0.0) |
| cl_arm_integer_dot_product_accumulate_int16 0xc00000 (3.0.0) |
| cl_arm_integer_dot_product_accumulate_saturate_int8 0xc00000 (3.0.0) |
| cl_khr_expect_assume 0x400000 (1.0.0) |
| cl_khr_il_program 0x400000 (1.0.0) |
| cl_khr_spir 0x400000 (1.0.0) |
| cl_khr_create_command_queue 0x400000 (1.0.0) |
| cl_altera_device_temperature 0 (0.0.0) |
| cl_altera_live_object_tracking 0 (0.0.0) |
| cl_khr_icd 0x400000 (1.0.0) |
| cl_khr_extended_versioning 0x400000 (1.0.0) |
| cl_khr_spirv_no_integer_wrap_decoration 0 (0.0.0) |
| cl_khr_suggested_local_work_size 0x400000 (1.0.0) |
| cl_vc4cl_performance_counters 0 (0.0.0) |
| |
| NULL platform behavior |
| clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) OpenCL for the Raspberry Pi VideoCore IV GPU |
| clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [VC4CL] |
| clCreateContext(NULL, ...) [default] Success [VC4CL] |
| clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1) |
| Platform Name OpenCL for the Raspberry Pi VideoCore IV GPU |
| Device Name VideoCore IV GPU |
| clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform |
| clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1) |
| Platform Name OpenCL for the Raspberry Pi VideoCore IV GPU |
| Device Name VideoCore IV GPU |
| clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform |
| clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform |
| clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1) |
| Platform Name OpenCL for the Raspberry Pi VideoCore IV GPU |
| Device Name VideoCore IV GPU |
| |
| ICD loader properties |
| ICD loader Name OpenCL ICD Loader |
| ICD loader Vendor OCL Icd free software |
| ICD loader Version 2.3.1 |
| ICD loader Profile OpenCL 3.0 |
| </pre></html></WRAP> |
| </WRAP> |
| |
| ===== ベンチマーク ===== |
| つづく...🤪\\ |
| <WRAP color_term> |
| <WRAP color_command><html><pre> |
| <font color="#AFFF00"><b>$</b></font> <font color="#26A269">ll</font> <u style="text-decoration-style:single">/dev/vcio</u> |
| <font color="#AFFF00"><b>$</b></font> <font color="#26A269">ll</font> <u style="text-decoration-style:single">/dev/vchiq</u> |
| <font color="#AFFF00"><b>$</b></font> <font color="#26A269">ll</font> <u style="text-decoration-style:single">/dev/mem</u> |
| </pre></html></WRAP> |
| </WRAP> |
===== 参考文献 ===== | ===== 参考文献 ===== |
[[https://kenny-peng.com/2021/09/14/raspi_zero_opencl.html|Playing with the VideoCore IV GPU on a Raspberry Pi Zero using VC4CL | just for context by Kenny Peng]]\\ | [[https://kenny-peng.com/2021/09/14/raspi_zero_opencl.html|Playing with the VideoCore IV GPU on a Raspberry Pi Zero using VC4CL | just for context by Kenny Peng]]\\ |
[[https://abhitronix.github.io/2019/01/15/VC4CL-1/|VC4CL: Raspberry Pi OpenCL Implementation - AbhiTronix-Verse]]\\ | [[https://abhitronix.github.io/2019/01/15/VC4CL-1/|VC4CL: Raspberry Pi OpenCL Implementation - AbhiTronix-Verse]]\\ |
| |