New OpenCL application for AMD GPUs


Message boards : News : New OpenCL application for AMD GPUs

Message board moderation

To post messages, you must log in.
Previous · 1 · 2 · 3
AuthorMessage
magic_sam

Send message
Joined: 16 Nov 22
Posts: 19
Credit: 7,503,644
RAC: 0
Message 8107 - Posted: 11 Oct 2023, 17:15:28 UTC
Hello all,

Am I the only one with GPU tasks getting stuck at 0.01% on 7900 XTX ?

See here for details: https://asteroidsathome.net/boinc/forum_thread.php?id=973&postid=8103

Best regards, Samuel
ID: 8107 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Lamberto Vitali

Send message
Joined: 14 Jun 23
Posts: 85
Credit: 5,914
RAC: 0
Message 8108 - Posted: 11 Oct 2023, 17:22:42 UTC

Last modified: 11 Oct 2023, 17:24:28 UTC
Judging by https://asteroidsathome.net/boinc/gpu_list.php your card isn't mentioned. So either not many people are using one here, or nobody with one has managed to complete a task. I'm not sure if that lists every card used or only the popular ones.
I see yours last worked on 30 Sept. Not sure if the list I linked to above shows back that far.
ID: 8108 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Simon Jäkle

Send message
Joined: 11 Sep 12
Posts: 12
Credit: 5,798,909
RAC: 2
Message 8111 - Posted: 13 Oct 2023, 8:37:32 UTC - in response to Message 8105.  
As of friday october 13th, i have A@H work units on my Amd radeon rx vega 11 (gpu) again.
ID: 8111 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
spRocket

Send message
Joined: 7 Dec 24
Posts: 2
Credit: 426,555
RAC: 23,251
Message 8687 - Posted: 20 Dec 2024, 17:49:06 UTC
I'm having a bit of trouble with Fedora 40 on a Ryzen 7 4700U APU. It will happily request GPU tasks, but they immediately error out on starting:

<core_client_version>7.20.2</core_client_version>
<![CDATA[
<message>
process exited with code 2 (0x2, -254)</message>
<stderr_txt>
BOINC client version 7.20.2
BOINC GPU type 'ATI', deviceId=0, slot=6
Application: ../../projects/asteroidsathome.net_boinc/period_search_10218_x86_64-pc-linux-gnu__opencl_101_amd_linux
Version: 102.18.0.0
Platform name: AMD Accelerated Parallel Processing
Platform vendor: Advanced Micro Devices, Inc.
OpenCL device C version: OpenCL C 2.0  | OpenCL 2.0 
OpenCL device Id: 0
OpenCL device name: gfx900 27GB
Device driver version: 3188.4 (HSA1.1,LC)
Multiprocessors: 7
Max Samplers: 5686
Max work item dimensions: 3
Resident blocks per multiprocessor: 5686
Grid dim: 79604 = 2 * 7 * 5686
Block dim: 128
Binary build log for gfx900:
Error: Failed to compile opencl source (from CL or HIP source to LLVM IR).
 (-2)
 Error creating queue: out of host memory(-6)

</stderr_txt>
]]>


Except that I have 64 GB RAM and have explicitly reserved 8 GB for video in the BIOS. Here's what I get from clinfo:

Number of platforms                               1
  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.0 AMD-APP (3188.4)
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd cl_amd_event_callback 
  Platform Extensions function suffix             AMD

  Platform Name                                   AMD Accelerated Parallel Processing
Number of devices                                 1
  Device Name                                     gfx900
  Device Vendor                                   Advanced Micro Devices, Inc.
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 2.0 
  Driver Version                                  3188.4 (HSA1.1,LC)
  Device OpenCL C Version                         OpenCL C 2.0 
  Device Type                                     GPU
  Device Board Name (AMD)                         AMD Radeon Graphics
  Device PCI-e ID (AMD)                           0x1636
  Device Topology (AMD)                           PCI-E, 0000:05:00.0
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               7
  SIMD per compute unit (AMD)                     4
  SIMD width (AMD)                                16
  SIMD instruction width (AMD)                    1
  Max clock frequency                             1600MHz
  Graphics IP (AMD)                               9.0
  Device Partition                                (core)
    Max number of sub-devices                     7
    Supported partition types                     None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             1024x1024x1024
  Max work group size                             256
  Preferred work group size (AMD)                 256
  Max work group size (AMD)                       1024
=== CL_PROGRAM_BUILD_LOG ===
Error: AMD HSA Code Object loading failed: HSA_STATUS_ERROR_OUT_OF_RESOURCES: The runtime failed to allocate the necessary resources. This error may also occur when the core runtime library needs to spawn threads or create internal OS-specific events.
  Preferred work group size multiple (kernel)     <getWGsizes:1980: create kernel : error -46>
  Wavefront width (AMD)                           64
  Preferred / native vector sizes                 
    char                                                 4 / 4       
    short                                                2 / 2       
    int                                                  1 / 1       
    long                                                 1 / 1       
    half                                                 1 / 1        (cl_khr_fp16)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     No
    Infinity and NANs                             No
    Round to nearest                              No
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  Yes
  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
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              29437693952 (27.42GiB)
  Global free memory (AMD)                        28747748 (27.42GiB) 28747748 (27.42GiB)
  Global memory channels (AMD)                    4
  Global memory banks per channel (AMD)           4
  Global memory bank width (AMD)                  256 bytes
  Error Correction support                        No
  Max memory allocation                           25022039859 (23.3GiB)
  Unified memory for Host and Device              No
  Shared Virtual Memory (SVM) capabilities        (core)
    Coarse-grained buffer sharing                 Yes
    Fine-grained buffer sharing                   Yes
    Fine-grained system sharing                   No
    Atomics                                       No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       1024 bits (128 bytes)
  Preferred alignment for atomics                 
    SVM                                           0 bytes
    Global                                        0 bytes
    Local                                         0 bytes
  Max size for global variable                    25022039859 (23.3GiB)
  Preferred total size of global vars             29437693952 (27.42GiB)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        16384 (16KiB)
  Global Memory cache line size                   64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             5686
    Max size for 1D images from buffer            65536 pixels
    Max 1D or 2D image array size                 2048 images
    Base address alignment for 2D image buffers   256 bytes
    Pitch alignment for 2D image buffers          256 pixels
    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
    Max number of read/write image args           64
  Max number of pipe args                         16
  Max active pipe reservations                    16
  Max pipe packet size                            3547203379 (3.304GiB)
  Local memory type                               Local
  Local memory size                               65536 (64KiB)
  Local memory size per CU (AMD)                  65536 (64KiB)
  Local memory banks (AMD)                        32
  Max number of constant args                     8
  Max constant buffer size                        25022039859 (23.3GiB)
  Preferred constant buffer size (AMD)            16384 (16KiB)
  Max size of kernel argument                     1024
  Queue properties (on host)                      
    Out-of-order execution                        No
    Profiling                                     Yes
  Queue properties (on device)                    
    Out-of-order execution                        Yes
    Profiling                                     Yes
    Preferred size                                262144 (256KiB)
    Max size                                      8388608 (8MiB)
  Max queues on device                            1
  Max events on device                            1024
  Prefer user sync for interop                    Yes
  Number of P2P devices (AMD)                     0
  Profiling timer resolution                      1ns
  Profiling timer offset since Epoch (AMD)        0ns (Wed Dec 31 18:00:00 1969)
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Thread trace supported (AMD)                  No
    Number of async queues (AMD)                  8
    Max real-time compute queues (AMD)            8
    Max real-time compute units (AMD)             7
  printf() buffer size                            4194304 (4MiB)
  Built-in kernels                                (n/a)
  Device Extensions                               cl_khr_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_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_media_ops cl_amd_media_ops2 cl_khr_image2d_from_buffer cl_khr_subgroups cl_khr_depth_images cl_amd_copy_buffer_p2p cl_amd_assembly_program 

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  AMD Accelerated Parallel Processing
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [AMD]
  clCreateContext(NULL, ...) [default]            Success [AMD]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 AMD Accelerated Parallel Processing
    Device Name                                   gfx900
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 AMD Accelerated Parallel Processing
    Device Name                                   gfx900
  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                                 AMD Accelerated Parallel Processing
    Device Name                                   gfx900

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.3.2
  ICD loader Profile                              OpenCL 3.0


Could this be some sort of permission issue?
ID: 8687 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profile Keith Myers
Avatar

Send message
Joined: 16 Nov 22
Posts: 139
Credit: 155,211,048
RAC: 409,626
Message 8688 - Posted: 20 Dec 2024, 18:37:14 UTC - in response to Message 8687.  
Could be a permission issue. I don't know anything about AMD gpu drivers but it looks like access to or missing whatever is the AMD equivalent of a compiler like what nvcc does for Nvidia cards.

A proud member of the OFA (Old Farts Association)
ID: 8688 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ahorek's team
Volunteer developer
Volunteer tester

Send message
Joined: 1 Jan 13
Posts: 97
Credit: 10,431,188
RAC: 1,697
Message 8691 - Posted: 20 Dec 2024, 22:33:21 UTC
1/ HSA_STATUS_ERROR_OUT_OF_RESOURCES is likely due to outdated drivers https://askubuntu.com/questions/1435708/hsa-status-error-out-of-resources-rocm5-1-1-ubuntu-22-04
could you try more recent drivers if there are any for Vegas?

2/ "out of host memory" means the selected intensity is too high
your driver reports CL_DEVICE_MAX_SAMPLERS = 5686, but we expect 16, 32 etc.
Grid dim: 79604 = 2 * 7 * 5686
in comparison with 7900 xtx
Grid dim: 1536 = 2 * 48 * 16

The driver refuses to compile the application since the required intensity is insanely high.

This issue can be resolved in the app by modifying how we calculate the optimal intensity for the target GPU. We should likely avoid using CL_DEVICE_MAX_SAMPLERS in the formula.
ID: 8691 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Previous · 1 · 2 · 3

Message boards : News : New OpenCL application for AMD GPUs