Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

printDeviceInfo:688: get 0x40E0 size : error -30 #6

Closed
magnumripper opened this issue Sep 21, 2014 · 6 comments
Closed

printDeviceInfo:688: get 0x40E0 size : error -30 #6

magnumripper opened this issue Sep 21, 2014 · 6 comments

Comments

@magnumripper
Copy link
Contributor

After #5 was fixed, that old Ubuntu (or whatever) machine I tested build clinfo just fine, but it fails at run-time with this message (after printing lots of information):

printDeviceInfo:688: get 0x40E0 size : error -30

The offending code

    if (*has_spir) {
        SHOW_STRING(clGetDeviceInfo, CL_DEVICE_SPIR_VERSIONS, INDENT "SPIR versions", dev);
    }

Not sure why *has_spir was true... where is it set?

@magnumripper
Copy link
Contributor Author

Indeed, it lists all devices (including CPU) of the AMD platform, but fails when listing the CPU device of the Intel platform.

$ ./clinfo 
Number of platforms                               3
  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 1.2 AMD-APP (1311.2)
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
  Platform Extensions function suffix             AMD

  Platform Name                                   Intel(R) OpenCL
  Platform Vendor                                 Intel(R) Corporation
  Platform Version                                OpenCL 1.2 LINUX
  Platform Profile                                FULL_PROFILE
  Platform 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_khr_spir cl_khr_fp64 

  Platform Name                                   NVIDIA CUDA
  Platform Vendor                                 NVIDIA Corporation
  Platform Version                                OpenCL 1.1 CUDA 4.2.1
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll 
  Platform Extensions function suffix             NV

  Platform Name                                   AMD Accelerated Parallel Processing
Number of devices                                 3
  Device Name                                     Tahiti
  Device Vendor                                   Advanced Micro Devices, Inc.
  Device Version                                  OpenCL 1.2 AMD-APP (1311.2)
  Driver Version                                  1311.2 (VM)
  Device OpenCL C Version                         OpenCL C 1.2 
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Board Name (AMD)                         AMD Radeon HD 7900 Series  
  Device Topology (AMD)                           PCI-E, 86:00.0
  Max compute units                               32
  SIMD per compute units (AMD)                    4
  SIMD width (AMD)                                16
  SIMD instruction width (AMD)                    1
  Max clock frequency                             1000MHz
  Device Partition                                (core)
    Max number of sub-devices                     32
    Supported partition types                     
  Max work item dimensions                        3
    Max work item size[0]                         256
    Max work item size[1]                         256
    Max work item size[2]                         256
  Max work group size                             256
  Preferred work group size multiple              64
  Wavefront width (AMD)                           64
  Preferred / native vector sizes                 
    char                                                 4 / 4       
    short                                                2 / 2       
    int                                                  1 / 1       
    long                                                 1 / 1       
    half                                                 1 / 1        (n/a)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision   Floating-point support         (n/a)
  Single-precision Floating-point support        
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Correctly-rounded divide and sqrt operations  Yes
    Support is emulated in software               No
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Correctly-rounded divide and sqrt operations  No
    Support is emulated in software               No
  Address bits                                    32, Little-Endian
  Global memory size                              3111124992 ( 2.897GB)
  Free global memory (AMD)                        3039107 ( 2.898MB)
  Free global memory (AMD)                        2867428 ( 2.735MB)
  Global memory channels (AMD)                    12
  Global memory banks per channel (AMD)           16
  Global memory bank width (AMD)                  256 bytes
  Error Correction support                        No
  Max memory allocation                           1073741824 (  1024MB)
  Unified memory for Host and Device              No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       2048 bits (256 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        16384 (    16KB)
  Global Memory cache line                        64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max 1D image size                             65536 pixels
    Max 1D or 2D image array size                 2048 images
    Base address alignment for 2D image buffers   256
    Pitch alignment for 2D image buffers          256
    Max 2D image size                             16384x16384 pixels
    Max 3D image size                             2048x2048x2048 pixels
    Max number of read image args                 128
    Max number of write image args                8
  Local memory type                               Local
  Local memory size                               32768 (    32KB)
  Local memory size per CU (AMD)                  65536 (    64KB)
  Local memory banks (AMD)                        32
  Max constant buffer size                        65536 (    64KB)
  Max number of constant args                     8
  Max size of kernel argument                     1024
  Max number of atomic counters                   8
  Queue properties                                
    Out-of-order execution                        No
    Profiling                                     Yes
  Profiling timer resolution                      1ns
  Profiling timer offset since Epoch (AMD)        1410544752470290166ns (Fri Sep 12 21:59:12 2014)
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
  Prefer user sync for interops                   Yes
  printf() buffer size                            1048576 (  1024KB)
  Device Built-in kernels                         
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                No
  Device Extensions                               cl_khr_fp64 cl_amd_fp64 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_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_atomic_counters_32 cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer 

  Device Name                                     Tahiti
  Device Vendor                                   Advanced Micro Devices, Inc.
  Device Version                                  OpenCL 1.2 AMD-APP (1311.2)
  Driver Version                                  1311.2 (VM)
  Device OpenCL C Version                         OpenCL C 1.2 
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Board Name (AMD)                         AMD Radeon HD 7900 Series  
  Device Topology (AMD)                           PCI-E, 87:00.0
  Max compute units                               32
  SIMD per compute units (AMD)                    4
  SIMD width (AMD)                                16
  SIMD instruction width (AMD)                    1
  Max clock frequency                             1000MHz
  Device Partition                                (core)
    Max number of sub-devices                     32
    Supported partition types                     
  Max work item dimensions                        3
    Max work item size[0]                         256
    Max work item size[1]                         256
    Max work item size[2]                         256
  Max work group size                             256
  Preferred work group size multiple              64
  Wavefront width (AMD)                           64
  Preferred / native vector sizes                 
    char                                                 4 / 4       
    short                                                2 / 2       
    int                                                  1 / 1       
    long                                                 1 / 1       
    half                                                 1 / 1        (n/a)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision   Floating-point support         (n/a)
  Single-precision Floating-point support        
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Correctly-rounded divide and sqrt operations  Yes
    Support is emulated in software               No
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Correctly-rounded divide and sqrt operations  No
    Support is emulated in software               No
  Address bits                                    32, Little-Endian
  Global memory size                              3111124992 ( 2.897GB)
  Free global memory (AMD)                        3039064 ( 2.898MB)
  Free global memory (AMD)                        2867428 ( 2.735MB)
  Global memory channels (AMD)                    12
  Global memory banks per channel (AMD)           16
  Global memory bank width (AMD)                  256 bytes
  Error Correction support                        No
  Max memory allocation                           1073741824 (  1024MB)
  Unified memory for Host and Device              No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       2048 bits (256 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        16384 (    16KB)
  Global Memory cache line                        64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max 1D image size                             65536 pixels
    Max 1D or 2D image array size                 2048 images
    Base address alignment for 2D image buffers   256
    Pitch alignment for 2D image buffers          256
    Max 2D image size                             16384x16384 pixels
    Max 3D image size                             2048x2048x2048 pixels
    Max number of read image args                 128
    Max number of write image args                8
  Local memory type                               Local
  Local memory size                               32768 (    32KB)
  Local memory size per CU (AMD)                  65536 (    64KB)
  Local memory banks (AMD)                        32
  Max constant buffer size                        65536 (    64KB)
  Max number of constant args                     8
  Max size of kernel argument                     1024
  Max number of atomic counters                   8
  Queue properties                                
    Out-of-order execution                        No
    Profiling                                     Yes
  Profiling timer resolution                      1ns
  Profiling timer offset since Epoch (AMD)        1410544752470290166ns (Fri Sep 12 21:59:12 2014)
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
  Prefer user sync for interops                   Yes
  printf() buffer size                            1048576 (  1024KB)
  Device Built-in kernels                         
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                No
  Device Extensions                               cl_khr_fp64 cl_amd_fp64 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_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_atomic_counters_32 cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer 

  Device Name                                     Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
  Device Vendor                                   GenuineIntel
  Device Version                                  OpenCL 1.2 AMD-APP (1311.2)
  Driver Version                                  1311.2 (sse2,avx)
  Device OpenCL C Version                         OpenCL C 1.2 
  Device Type                                     CPU
  Device Profile                                  FULL_PROFILE
  Device Board Name (AMD)                         
  Device Topology (AMD)                           (n/a)
  Max compute units                               32
  Max clock frequency                             2601MHz
  Device Partition                                (core, cl_ext_device_fission)
    Max number of sub-devices                     32
    Supported partition types                     equally, by counts, by affinity domain
    Supported affinity domains                    L1 cache, L2 cache, L3 cache, next partitionable
    Supported partition types (ext)               equally, by counts, by affinity domain
    Supported affinity domains (ext)              L3 cache, L2 cache, L1 cache, next fissionable
  Max work item dimensions                        3
    Max work item size[0]                         1024
    Max work item size[1]                         1024
    Max work item size[2]                         1024
  Max work group size                             1024
  Preferred work group size multiple              1
  Preferred / native vector sizes                 
    char                                                16 / 16      
    short                                                8 / 8       
    int                                                  4 / 4       
    long                                                 2 / 2       
    half                                                 4 / 4        (n/a)
    float                                                8 / 8       
    double                                               4 / 4        (cl_khr_fp64)
  Half-precision   Floating-point support         (n/a)
  Single-precision Floating-point support        
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Correctly-rounded divide and sqrt operations  Yes
    Support is emulated in software               No
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Correctly-rounded divide and sqrt operations  No
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              135296135168 (   126GB)
  Error Correction support                        No
  Max memory allocation                           33824033792 (  31.5GB)
  Unified memory for Host and Device              Yes
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       1024 bits (128 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        32768 (    32KB)
  Global Memory cache line                        64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max 1D image size                             65536 pixels
    Max 1D or 2D image array size                 2048 images
    Max 2D image size                             8192x8192 pixels
    Max 3D image size                             2048x2048x2048 pixels
    Max number of read image args                 128
    Max number of write image args                8
  Local memory type                               Global
  Local memory size                               32768 (    32KB)
  Max constant buffer size                        65536 (    64KB)
  Max number of constant args                     8
  Max size of kernel argument                     4096 (     4KB)
  Queue properties                                
    Out-of-order execution                        No
    Profiling                                     Yes
  Profiling timer resolution                      1ns
  Profiling timer offset since Epoch (AMD)        1410544752470290166ns (Fri Sep 12 21:59:12 2014)
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            Yes
  Prefer user sync for interops                   Yes
  printf() buffer size                            65536 (    64KB)
  Device Built-in kernels                         
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                No
  Device Extensions                               cl_khr_fp64 cl_amd_fp64 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_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_device_fission cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt 

  Platform Name                                   Intel(R) OpenCL
Number of devices                                 2
  Device Name                                            Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
  Device Vendor                                   Intel(R) Corporation
  Device Version                                  OpenCL 1.2 (Build 76921)
  Driver Version                                  1.2.0.76921
  Device OpenCL C Version                         OpenCL C 1.2 
  Device Type                                     CPU
  Device Profile                                  FULL_PROFILE
  Max compute units                               32
  Max clock frequency                             2600MHz
  Device Partition                                (core)
    Max number of sub-devices                     32
    Supported partition types                     by counts, equally, by name (Intel extension)
  Max work item dimensions                        3
    Max work item size[0]                         8192
    Max work item size[1]                         8192
    Max work item size[2]                         8192
  Max work group size                             8192
3 errors generated.
getWGsizes:148: build program : error -11
  Preferred work group size multiple              <detection failed>
  Preferred / native vector sizes                 
    char                                                 1 / 16      
    short                                                1 / 8       
    int                                                  1 / 4       
    long                                                 1 / 2       
    half                                                 0 / 0        (n/a)
    float                                                1 / 8       
    double                                               1 / 4        (cl_khr_fp64)
  Half-precision   Floating-point support         (n/a)
  Single-precision Floating-point support        
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Correctly-rounded divide and sqrt operations  No
    Support is emulated in software               No
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Correctly-rounded divide and sqrt operations  No
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              135296135168 (   126GB)
  Error Correction support                        No
  Max memory allocation                           33824033792 (  31.5GB)
  Unified memory for Host and Device              Yes
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       1024 bits (128 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        262144 (   256KB)
  Global Memory cache line                        64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             480
    Max 1D image size                             2114002112 pixels
    Max 1D or 2D image array size                 2048 images
    Max 2D image size                             16384x16384 pixels
    Max 3D image size                             2048x2048x2048 pixels
    Max number of read image args                 480
    Max number of write image args                480
  Local memory type                               Global
  Local memory size                               32768 (    32KB)
  Max constant buffer size                        131072 (   128KB)
  Max number of constant args                     480
  Max size of kernel argument                     3840 (  3.75KB)
  Queue properties                                
    Out-of-order execution                        Yes
    Profiling                                     Yes
    Intel local thread execution                  Yes
  Profiling timer resolution                      1ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            Yes
printDeviceInfo:688: get 0x40E0 size : error -30

Apparently, the Intel platform says it supports cl_khr_spir yet returns "invalid value" when queried with CL_DEVICE_SPIR_VERSIONS. So it's a driver bug and I guess you should just handle it.

On a side note, we also have a problem on the same last platform/device with getWGsizes:148: build program : error -11 [right before listing Preferred work group size multiple] but that is a soft problem listed to stderr without bailing. That may be another issue but I haven't looked into it yet. This too only happens with the Intel/CPU device, not the [same physical] AMD/CPU device.

@magnumripper
Copy link
Contributor Author

Hmm, actually the platform says it supports cl_khr_spir - but does the device support it? That was not yet listed when error occured.

@magnumripper
Copy link
Contributor Author

OK that was not it. The device does claim to support cl_khr_spir.

@Oblomov
Copy link
Owner

Oblomov commented Sep 22, 2014

Thanks for the report. For the getWGsizes issues, it's something that I've seen happening with the beignet driver failing to creat a context, but it seems that in your case it's something worse (-11 is a failure to build the program). That's definitely better to have on its own bug report.

For the CL_DEVICE_SPIR_VERSIONS, we should be resilient to this kind of errors. Looks like it's time for that rehaul of the code that I've been planning on doing to make all property retrievals catch errors without killing the program.

@magnumripper
Copy link
Contributor Author

Works fine in 8ecdc1b

@Oblomov
Copy link
Owner

Oblomov commented Sep 23, 2014

Cool. Next thing will be to investigate the -11 on the program build. Could you open a separate ticket for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants