<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic OpenCL Number of platforms 0 in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/OpenCL-Number-of-platforms-0/m-p/2067497#M15536</link>
    <description>&lt;P&gt;I'm using Layerscape LS1028ARDB, LSDK v21.08, kernel 5.10.35.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This post is related to&amp;nbsp;&lt;A href="https://community.nxp.com/t5/Layerscape/ls1028ardb-OpenCL-clinfo-Number-of-platforms-is-0/m-p/1579037/highlight/true" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/Layerscape/ls1028ardb-OpenCL-clinfo-Number-of-platforms-is-0/m-p/1579037/highlight/true&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am trying to make sure my OpenCV application is using OpenCL.&lt;/P&gt;&lt;P&gt;I run the following:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$ cat /boot/config-5.15.0-1007-ls | grep MXC_GPU_VIV&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CONFIG_MXC_GPU_VIV=y&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It looks like use of GPU should be enabled in my kernel build.&lt;/P&gt;&lt;P&gt;However, when I run clinfo, I get&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Number of platforms 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run dmesg | grep -i galcore I see:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.750350] galcore f0c0000.gpu: Adding to iommu group 14&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.755946] Galcore version 6.4.3.p2.336687&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I missing something here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Mar 2025 19:16:25 GMT</pubDate>
    <dc:creator>noahw</dc:creator>
    <dc:date>2025-03-24T19:16:25Z</dc:date>
    <item>
      <title>OpenCL Number of platforms 0</title>
      <link>https://community.nxp.com/t5/Layerscape/OpenCL-Number-of-platforms-0/m-p/2067497#M15536</link>
      <description>&lt;P&gt;I'm using Layerscape LS1028ARDB, LSDK v21.08, kernel 5.10.35.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This post is related to&amp;nbsp;&lt;A href="https://community.nxp.com/t5/Layerscape/ls1028ardb-OpenCL-clinfo-Number-of-platforms-is-0/m-p/1579037/highlight/true" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/Layerscape/ls1028ardb-OpenCL-clinfo-Number-of-platforms-is-0/m-p/1579037/highlight/true&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am trying to make sure my OpenCV application is using OpenCL.&lt;/P&gt;&lt;P&gt;I run the following:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$ cat /boot/config-5.15.0-1007-ls | grep MXC_GPU_VIV&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CONFIG_MXC_GPU_VIV=y&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It looks like use of GPU should be enabled in my kernel build.&lt;/P&gt;&lt;P&gt;However, when I run clinfo, I get&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Number of platforms 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run dmesg | grep -i galcore I see:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.750350] galcore f0c0000.gpu: Adding to iommu group 14&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.755946] Galcore version 6.4.3.p2.336687&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I missing something here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 19:16:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/OpenCL-Number-of-platforms-0/m-p/2067497#M15536</guid>
      <dc:creator>noahw</dc:creator>
      <dc:date>2025-03-24T19:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: OpenCL Number of platforms 0</title>
      <link>https://community.nxp.com/t5/Layerscape/OpenCL-Number-of-platforms-0/m-p/2075050#M15580</link>
      <description>&lt;P&gt;I downloaded LSDK 21.08 pre-built images&lt;/P&gt;
&lt;P&gt;$ wget &lt;A href="https://www.nxp.com/lgfiles/sdk/lsdk2108/firmware_ls1028ardb_sdboot.img" target="_blank"&gt;https://www.nxp.com/lgfiles/sdk/lsdk2108/firmware_ls1028ardb_sdboot.img&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;$ wget &lt;A href="https://www.nxp.com/lgfiles/sdk/lsdk2108/firmware_ls1028ardb_sdboot.img" target="_blank"&gt;https://www.nxp.com/lgfiles/sdk/lsdk2108/&lt;/A&gt;boot_LS_arm64_lts_5.10.tgz&lt;/P&gt;
&lt;P&gt;$&amp;nbsp; wget &lt;A href="https://www.nxp.com/lgfiles/sdk/lsdk2108/rootfs_lsdk2108_ubuntu_desktop_arm64.tgz" target="_blank"&gt;https://www.nxp.com/lgfiles/sdk/lsdk2108/rootfs_lsdk2108_ubuntu_desktop_arm64.tgz&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Deploy them to SD card.&lt;/P&gt;
&lt;P&gt;$ flex-installer -i pf -d /dev/sdb&lt;/P&gt;
&lt;P&gt;$&amp;nbsp;flex-installer -b&amp;nbsp;boot_LS_arm64_lts_5.10.tgz -f&amp;nbsp;&lt;A href="https://www.nxp.com/lgfiles/sdk/lsdk2108/firmware_ls1028ardb_sdboot.img" target="_blank"&gt;firmware_ls1028ardb_sdboot.img&lt;/A&gt;&amp;nbsp;-r &lt;A href="https://www.nxp.com/lgfiles/sdk/lsdk2108/rootfs_lsdk2108_ubuntu_desktop_arm64.tgz" target="_blank"&gt;rootfs_lsdk2108_ubuntu_desktop_arm64.tgz&amp;nbsp;&amp;nbsp;&lt;/A&gt;&lt;A href="https://www.nxp.com/lgfiles/sdk/lsdk2108/rootfs_lsdk2108_ubuntu_desktop_arm64.tgz" target="_blank"&gt;-d /dev/sdb&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Note:/dev/sdb is SD device name on the host PC.&lt;/P&gt;
&lt;P&gt;Boot from SD card on LS1028ARDB, I got the following information.&lt;/P&gt;
&lt;P&gt;root@localhost:~# apt-get install clinfo&lt;/P&gt;
&lt;P&gt;root@localhost:~# clinfo&lt;BR /&gt;clinfo: /usr/lib/libOpenCL.so.1: no version information available (required by clinfo)&lt;BR /&gt;Number of platforms 1&lt;BR /&gt;Platform Name Vivante OpenCL Platform&lt;BR /&gt;Platform Vendor Vivante Corporation&lt;BR /&gt;Platform Version OpenCL 1.2 V6.4.3.p2.336687&lt;BR /&gt;Platform Profile FULL_PROFILE&lt;BR /&gt;Platform Extensions cl_khr_icd&lt;BR /&gt;Platform Extensions function suffix viv&lt;/P&gt;
&lt;P&gt;Platform Name Vivante OpenCL Platform&lt;BR /&gt;Number of devices 1&lt;BR /&gt;Device Name Vivante OpenCL Device GC7000UL.6202.0000&lt;BR /&gt;Device Vendor Vivante Corporation&lt;BR /&gt;Device Vendor ID 0x564956&lt;BR /&gt;Device Version OpenCL 1.2&lt;BR /&gt;Driver Version OpenCL 1.2 V6.4.3.p2.336687&lt;BR /&gt;Device OpenCL C Version OpenCL C 1.2&lt;BR /&gt;Device Type GPU&lt;BR /&gt;Device Profile FULL_PROFILE&lt;BR /&gt;Device Available Yes&lt;BR /&gt;Compiler Available Yes&lt;BR /&gt;Linker Available Yes&lt;BR /&gt;Max compute units 1&lt;BR /&gt;Max clock frequency 600MHz&lt;BR /&gt;Device Partition (core)&lt;BR /&gt;Max number of sub-devices 0&lt;BR /&gt;Supported partition types (n/a)&lt;BR /&gt;Supported affinity domains (n/a)&lt;BR /&gt;Max work item dimensions 3&lt;BR /&gt;Max work item sizes 512x512x512&lt;BR /&gt;Max work group size 512&lt;BR /&gt;Preferred work group size multiple 8&lt;BR /&gt;Preferred / native vector sizes&lt;BR /&gt;char 4 / 4&lt;BR /&gt;short 4 / 4&lt;BR /&gt;int 4 / 4&lt;BR /&gt;long 4 / 4&lt;BR /&gt;half 0 / 0 (cl_khr_fp16)&lt;BR /&gt;float 4 / 4&lt;BR /&gt;double 0 / 0 (n/a)&lt;BR /&gt;Half-precision Floating-point support &amp;lt;printDeviceInfo:68: get CL_DEVICE_HALF_FP_CONFIG : error -30&amp;gt;&lt;BR /&gt;Single-precision Floating-point support (core)&lt;BR /&gt;Denormals No&lt;BR /&gt;Infinity and NANs Yes&lt;BR /&gt;Round to nearest Yes&lt;BR /&gt;Round to zero Yes&lt;BR /&gt;Round to infinity No&lt;BR /&gt;IEEE754-2008 fused multiply-add No&lt;BR /&gt;Support is emulated in software No&lt;BR /&gt;Correctly-rounded divide and sqrt operations No&lt;BR /&gt;Double-precision Floating-point support (n/a)&lt;BR /&gt;Address bits 32, Little-Endian&lt;BR /&gt;Global memory size 268435456 (256MiB)&lt;BR /&gt;Error Correction support Yes&lt;BR /&gt;Max memory allocation 134217728 (128MiB)&lt;BR /&gt;Unified memory for Host and Device Yes&lt;BR /&gt;Minimum alignment for any data type 128 bytes&lt;BR /&gt;Alignment of base address 2048 bits (256 bytes)&lt;BR /&gt;Global Memory cache type Read/Write&lt;BR /&gt;Global Memory cache size 16384 (16KiB)&lt;BR /&gt;Global Memory cache line size 64 bytes&lt;BR /&gt;Image support Yes&lt;BR /&gt;Max number of samplers per kernel 16&lt;BR /&gt;Max size for 1D images from buffer 65536 pixels&lt;BR /&gt;Max 1D or 2D image array size 8192 images&lt;BR /&gt;Max 2D image size 8192x8192 pixels&lt;BR /&gt;Max 3D image size 8192x8192x8192 pixels&lt;BR /&gt;Max number of read image args 128&lt;BR /&gt;Max number of write image args 8&lt;BR /&gt;Local memory type Global&lt;BR /&gt;Local memory size 32768 (32KiB)&lt;BR /&gt;Max number of constant args 9&lt;BR /&gt;Max constant buffer size 65536 (64KiB)&lt;BR /&gt;Max size of kernel argument 1024&lt;BR /&gt;Queue properties&lt;BR /&gt;Out-of-order execution Yes&lt;BR /&gt;Profiling Yes&lt;BR /&gt;Prefer user sync for interop Yes&lt;BR /&gt;Profiling timer resolution 1000ns&lt;BR /&gt;Execution capabilities&lt;BR /&gt;Run OpenCL kernels Yes&lt;BR /&gt;Run native kernels No&lt;BR /&gt;printf() buffer size 1048576 (1024KiB)&lt;BR /&gt;Built-in kernels (n/a)&lt;BR /&gt;Device Extensions cl_khr_byte_addressable_store cl_khr_gl_sharing cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics&lt;/P&gt;
&lt;P&gt;NULL platform behavior&lt;BR /&gt;clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) No platform&lt;BR /&gt;clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [viv]&lt;BR /&gt;clCreateContext(NULL, ...) [default] Success [viv]&lt;BR /&gt;clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1)&lt;BR /&gt;Platform Name Vivante OpenCL Platform&lt;BR /&gt;Device Name Vivante OpenCL Device GC7000UL.6202.0000&lt;BR /&gt;clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform&lt;BR /&gt;clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1)&lt;BR /&gt;Platform Name Vivante OpenCL Platform&lt;BR /&gt;Device Name Vivante OpenCL Device GC7000UL.6202.0000&lt;BR /&gt;clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform&lt;BR /&gt;clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform&lt;BR /&gt;clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1)&lt;BR /&gt;Platform Name Vivante OpenCL Platform&lt;BR /&gt;Device Name Vivante OpenCL Device GC7000UL.6202.0000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2025 09:48:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/OpenCL-Number-of-platforms-0/m-p/2075050#M15580</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2025-04-07T09:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: OpenCL Number of platforms 0</title>
      <link>https://community.nxp.com/t5/Layerscape/OpenCL-Number-of-platforms-0/m-p/2078679#M15605</link>
      <description>&lt;P&gt;Thanks, it was because I needed the desktop Ubuntu image instead of main.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2025 00:11:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/OpenCL-Number-of-platforms-0/m-p/2078679#M15605</guid>
      <dc:creator>noahw</dc:creator>
      <dc:date>2025-04-11T00:11:47Z</dc:date>
    </item>
  </channel>
</rss>

