Bug 111404 - OpenCL device doesn't support "Image support"
Summary: OpenCL device doesn't support "Image support"
Status: RESOLVED DUPLICATE of bug 87738
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: 18.0
Hardware: Other Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-15 07:31 UTC by vans88
Modified: 2019-08-16 05:55 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vans88 2019-08-15 07:31:11 UTC
When enumerating OpenCL platforms and devices with the clinfo command, I found that OpenCL devices (AMD Radeon HD 8470) do not support OpenCL images. 
  I don't understand why this problem occurs. I don't even understand whether this is a fault in the graphics card itself or the graphics card driver, or ignore several options when compiling mesa.

*********************************************************************************
[root@localhost /]# clinfo
Number of platforms                               1
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 18.0.5
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   Clover
Number of devices                                 1
  Device Name                                     AMD CAICOS (DRM 2.49.0 / 3.10.84-21.fc21.loongson.18.mips64el, LLVM 8.0.0)
  Device Vendor                                   AMD
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.1 Mesa 18.0.5
  Driver Version                                  18.0.5
  Device OpenCL C Version                         OpenCL C 1.1
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Max compute units                               2
  Max clock frequency                             775MHz
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
  Preferred work group size multiple              64
  Preferred / native vector sizes
    char                                                16 / 16
    short                                                8 / 8
    int                                                  4 / 4
    long                                                 2 / 2
    half                                                 0 / 0        (n/a)
    float                                                4 / 4
    double                                               0 / 0        (n/a)
  Half-precision Floating-point support           (n/a)
  Single-precision Floating-point support         (core)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    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                              1073741824 (1024MiB)
  Error Correction support                        No
  Max memory allocation                           751619276 (716.8MiB)
  Unified memory for Host and Device              No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       131072 bits (16384 bytes)
  Global Memory cache type                        None
#####################################################################
  Image support                                   No
####################################################################
  Local memory type                               Local
  Local memory size                               32768 (32KiB)
  Max constant buffer size                        751619276 (716.8MiB)
  Max number of constant args                     15
  Max size of kernel argument                     1024
  Queue properties
    Out-of-order execution                        No
    Profiling                                     Yes
  Profiling timer resolution                      0ns
  Execution capabilities
    Run OpenCL kernels                            Yes
    Run native kernels                            No
  Device Available                                Yes
  Compiler Available                              Yes
  Device Extensions                               cl_khr_byte_addressable_store cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Clover
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [MESA]
  clCreateContext(NULL, ...) [default]            Success [MESA]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 Clover
    Device Name                                   AMD CAICOS (DRM 2.49.0 / 3.10.84-21.fc21.loongson.18.mips64el, LLVM 8.0.0)
  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                                 Clover
    Device Name                                   AMD CAICOS (DRM 2.49.0 / 3.10.84-21.fc21.loongson.18.mips64el, LLVM 8.0.0)

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.7
  ICD loader Profile                              OpenCL 1.2



*********************************************************************************
#Platform information
[root@localhost /]# lscpu
Architecture:          mips64
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Model name:            ICT Loongson-3A R3 (Loongson-3A3000) @ 1399MHz
CPU max MHz:           1399.9860
CPU min MHz:           349.9960
NUMA node0 CPU(s):     0-3
[root@localhost /]# cat /proc/boardinfo
BIOS Information
Vendor                  : Kunlun
Version                 : Kunlun-A1701-V3.1.2-20171012
BIOS ROMSIZE            : 1024
Release date            : 20171012

Base Board Information
Manufacturer            : LEMOTE
Board name              : LEMOTE-LS3A3000-RS780E-1w-V0.1-pc
Family                  : LOONGSON3

[root@localhost /]# uname -a
Linux localhost 3.10.84-21.fc21.loongson.18.mips64el #1 SMP PREEMPT Tue Apr 16 18:41:34 CST 2019 mips64 mips64 mips64 GNU/Linux
[root@localhost /]#

*********************************************************************************
#opencl packages

[root@localhost /]# rpm -qa | grep mesa |grep -w 18
mesa-libOpenCL-18.0.5-4.fc21.loongson.mips64el
mesa-libOpenCL-devel-18.0.5-4.fc21.loongson.mips64el
mesa-filesystem-18.0.5-4.fc21.loongson.mips64el
mesa-libgbm-devel-18.0.5-4.fc21.loongson.mips64el
mesa-libgbm-18.0.5-4.fc21.loongson.mips64el
mesa-dri-drivers-18.0.5-4.fc21.loongson.mips64el
mesa-vdpau-drivers-18.0.5-4.fc21.loongson.mips64el
[root@localhost /]#

*********************************************************************************

#AMD Video Card  
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Caicos XT [Radeon HD 7470/8470 / R5 235 OEM]

#AMD official Info about HD8470 features
https://www.techpowerup.com/gpu-specs/radeon-hd-8470-oem.c1978


Anyone can give some hints about this?
Comment 1 vans88 2019-08-15 07:37:50 UTC
  When I filtered the mesa source code with keyword "PIPE_COMPUTE_CAP_IMAGES_SUPPORTED", I found the following code information.

********************************************************************************
[root@localhost mesa-18.0.5]# grep "PIPE_COMPUTE_CAP_IMAGES_SUPPORTED" . -rn
./src/gallium/drivers/softpipe/sp_screen.c:551:   case PIPE_COMPUTE_CAP_IMAGES_SUPPORTED:
./src/gallium/drivers/freedreno/freedreno_screen.c:705: case PIPE_COMPUTE_CAP_IMAGES_SUPPORTED:
./src/gallium/drivers/r600/r600_pipe_common.c:1120:     case PIPE_COMPUTE_CAP_IMAGES_SUPPORTED:
./src/gallium/drivers/nouveau/nv50/nv50_screen.c:444:   case PIPE_COMPUTE_CAP_IMAGES_SUPPORTED:
./src/gallium/drivers/nouveau/nvc0/nvc0_screen.c:518:   case PIPE_COMPUTE_CAP_IMAGES_SUPPORTED:
./src/gallium/drivers/radeonsi/si_get.c:864:    case PIPE_COMPUTE_CAP_IMAGES_SUPPORTED:
./src/gallium/docs/source/screen.rst:560:* ``PIPE_COMPUTE_CAP_IMAGES_SUPPORTED``: Whether images are supported
./src/gallium/include/pipe/p_defines.h:920:   PIPE_COMPUTE_CAP_IMAGES_SUPPORTED,
./src/gallium/state_trackers/clover/core/device.cpp:185:                                      PIPE_COMPUTE_CAP_IMAGES_SUPPORTED)[0];

********************************************************************************
I also found a similar bug submission as follows, but it is not clear whether the relevant patch provided in the article has been officially verified by mesa and is applicable to the version of mesa 18.0.5.

https://bugs.freedesktop.org/show_bug.cgi?id=87738
Comment 2 vans88 2019-08-16 05:55:58 UTC

*** This bug has been marked as a duplicate of bug 87738 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.