Vous n'êtes pas identifié(e).
L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT →
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
atelier:chantier:opencl-avec-amd [06/10/2021 09:09] Debian Alain ancienne révision (01/10/2021 07:22) restaurée |
atelier:chantier:opencl-avec-amd [12/12/2021 13:47] Debian Alain [Post Scriptum] |
||
---|---|---|---|
Ligne 21: | Ligne 21: | ||
* carte AMD RX 570 8GB ITX | * carte AMD RX 570 8GB ITX | ||
* carte AMD RX 6800 16GB | * carte AMD RX 6800 16GB | ||
- | le tout , fait sur linux [[doc:systeme:apt:sources.list:testing|debian testing bullseye]] et avec | + | le tout , fait sur linux [[doc:systeme:apt:sources.list:testing|debian testing bullseye]] / debian bookworm sid et avec |
- | * X.org GNOME 3.34.2 , 3.36.2 et 40.4 | + | * X.org GNOME 3.34.2 , 3.36.2 , 40.4 et 41 |
- | * blender 2.82a et 2.93.4 | + | * Blender 2.82a et 2.93.4 |
+ | * Darktable 3.6.1-1 | ||
* processeur AMD RYZEN 7 1700 X et AMD RYZEN 9 3900 X | * processeur AMD RYZEN 7 1700 X et AMD RYZEN 9 3900 X | ||
Ligne 58: | Ligne 59: | ||
=== Téléchargement de l'archive du pilote amdgpu-pro === | === Téléchargement de l'archive du pilote amdgpu-pro === | ||
- | - Soit : (version 19.50 pour ubuntu 18.04 LTS) :<code user>wget --referer=https://www.amd.com/ -P $HOME/Téléchargements/ https://drivers.amd.com/drivers/linux/19.50/amdgpu-pro-19.50-967956-ubuntu-18.04.tar.xz</code> | + | - Soit : (version 19.50 pour ubuntu 18.04 LTS , RX 500) :<code user>wget --referer=https://www.amd.com/ -P $HOME/Téléchargements/ https://drivers.amd.com/drivers/linux/19.50/amdgpu-pro-19.50-967956-ubuntu-18.04.tar.xz</code> |
- | - Soit : (version 20.10 pour ubuntu 18.04 LTS) :<code user> wget --referer=https://www.amd.com/ -P $HOME/Téléchargements/ https://drivers.amd.com/drivers/linux/amdgpu-pro-20.10-1048554-ubuntu-18.04.tar.xz</code> | + | - Soit : (version 20.10 pour ubuntu 18.04 LTS , RX 500) :<code user> wget --referer=https://www.amd.com/ -P $HOME/Téléchargements/ https://drivers.amd.com/drivers/linux/amdgpu-pro-20.10-1048554-ubuntu-18.04.tar.xz</code> |
+ | - Soit : (version 21.30 pour ubuntu 20.04.3 LTS , RX 6000) :<code user> wget --referer=https://www.amd.com/ -P $HOME/Téléchargements/ https://drivers.amd.com/drivers/linux/amdgpu-pro-21.30-1290604-ubuntu-20.04.tar.xz</code> | ||
Au cas où ces liens ne fonctionnent pas, vous pouvez vous connecter en graphique là : | Au cas où ces liens ne fonctionnent pas, vous pouvez vous connecter en graphique là : | ||
Ligne 65: | Ligne 67: | ||
* Ou en manuel : \\ https://www.amd.com/fr/support/graphics/radeon-500-series/radeon-rx-500-series/radeon-rx-550 | * Ou en manuel : \\ https://www.amd.com/fr/support/graphics/radeon-500-series/radeon-rx-500-series/radeon-rx-550 | ||
* Ou encore là : \\ https://www.amd.com/fr/support/graphics/radeon-500-series/radeon-rx-500-series/radeon-rx-570 | * Ou encore là : \\ https://www.amd.com/fr/support/graphics/radeon-500-series/radeon-rx-500-series/radeon-rx-570 | ||
+ | * voire , ici : \\ https://www.amd.com/fr/support/graphics/amd-radeon-6000-series/amd-radeon-6800-series/amd-radeon-rx-6800 | ||
- Cherchez la ligne <code>+ Ubuntu X86 64-bit</code>et trouvez la case ''Téléchargement'' sur laquelle vous cliquez. | - Cherchez la ligne <code>+ Ubuntu X86 64-bit</code>et trouvez la case ''Téléchargement'' sur laquelle vous cliquez. | ||
- Vous téléchargez ensuite l'archive dans le répertoire ''~/Téléchargements'' de votre Debian. | - Vous téléchargez ensuite l'archive dans le répertoire ''~/Téléchargements'' de votre Debian. | ||
Ligne 74: | Ligne 77: | ||
- installer aussi clinfo et mesa-utils :<code user>sudo apt install clinfo mesa-utils </code> | - installer aussi clinfo et mesa-utils :<code user>sudo apt install clinfo mesa-utils </code> | ||
- | ==== Scripts ==== | + | ==== Scripts (RX 500) ==== |
Créer les scripts suivants : | Créer les scripts suivants : | ||
Ligne 196: | Ligne 199: | ||
fonctionne, en théorie , pour RX 5000 ET RX 6000 . | fonctionne, en théorie , pour RX 5000 ET RX 6000 . | ||
prise en charge du noyau 5.11 (en théorie). | prise en charge du noyau 5.11 (en théorie). | ||
- | toujours non fonctionnel sur debian sid . (noyau 5.14) | + | |
+ | maintenant fonctionnel sur debian sid . (noyau 5.15.6 (kernel.org)) | ||
[[https://github.com/kytulendu| -- site github de kytulendu -- ]] | [[https://github.com/kytulendu| -- site github de kytulendu -- ]] | ||
Ligne 208: | Ligne 212: | ||
<note tip> merci à kytulendu </note> | <note tip> merci à kytulendu </note> | ||
+ | |||
+ | ===== Commande AMD (RX 6000)===== | ||
+ | |||
+ | Télécharger l'archive 21.30 | ||
+ | <code user> wget --referer=https://www.amd.com/ -P $HOME/Téléchargements/ https://drivers.amd.com/drivers/linux/amdgpu-pro-21.30-1290604-ubuntu-20.04.tar.xz</code> | ||
+ | |||
+ | se placer dans le bon répertoire : | ||
+ | <code user>cd ~/Téléchargements/ </code> | ||
+ | |||
+ | décompacter l'archive : | ||
+ | <code user>tar -xJf amdgpu-pro-21.30-1290604-ubuntu-20.04.tar.xz </code> | ||
+ | |||
+ | se placer dans le bon dossier : | ||
+ | <code user>cd ~/Téléchargements/amdgpu-pro-21.30-1290604-ubuntu-20.04 </code> | ||
+ | |||
+ | appliquer la commande : | ||
+ | [[https://community.amd.com/t5/drivers-software/opencl-linux-debian-bullseye-sid/m-p/441901#M138183|mon fil sur AMD]] | ||
+ | <code user>sudo ./amdgpu-install --opencl=legacy --headless --no-dkms </code> | ||
+ | <note>merci roesjka mais selon les derniers développements , cette commande installe le pilote legacy , donc , à priori , pour les générations "vega" et pré - "vega" . </note> | ||
+ | |||
+ | [[https://community.amd.com/t5/drivers-software/install-drivers-21-30-to-get-opencl-rocr-support-on-ubuntu-20-04/m-p/492118| lien deepdelirum ]] | ||
+ | <code user>sudo ./amdgpu-install --opencl=rocr --headless</code> | ||
+ | vous pourrez obtenir ceci (malheureusement) : | ||
+ | <code>Des erreurs ont été rencontrées pendant l'exécution : | ||
+ | amdgpu-dkms | ||
+ | amdgpu-pro-rocr-opencl | ||
+ | E: Sub-process /usr/bin/dpkg returned an error code (1)</code> | ||
+ | |||
+ | une autre commande | ||
+ | vérifier l'installation : | ||
+ | <code user>clinfo </code> | ||
+ | |||
+ | <note important>Malheureusement , à ce jour , OpenCL pour RX6000 ne fonctionne pas encore (noyau 5.15.0-2-amd64 bookworm/sid) </note> | ||
+ | |||
+ | pour désinstaller : | ||
+ | <code user>sudo amdgpu-uninstall </code> | ||
+ | ==== archive au format .DEB ==== | ||
+ | |||
+ | AMD vient de créer une archive au format DEB . | ||
+ | à tester : | ||
+ | |||
+ | <code user> wget --referer=https://www.amd.com/ -P $HOME/Téléchargements/ https://repo.radeon.com/amdgpu-install/21.40.1/ubuntu/focal/amdgpu-install_21.40.1.40501-1_all.deb </code> | ||
+ | |||
+ | archive 21.40.1 , en théorie pour AMD RX 6000 . a vérifier . | ||
+ | aux dernières nouvelles , sur ma config , s'installe mais n'est pas fonctionnelle . | ||
+ | |||
+ | [[https://amdgpu-install.readthedocs.io/en/21.40/install-script.html|La Documentation officielle A.M.D. (AMDGPU) ]] | ||
+ | |||
+ | [[https://rocmdocs.amd.com/en/latest/Current_Release_Notes/Current-Release-Notes.html|La Documentation officielle A.M.D. (Rocm) ]] | ||
+ | |||
+ | ce paquet deb installe le sources suivant : | ||
+ | |||
+ | <file apt_sources amdgpu-proprietary.list> | ||
+ | # Enabling this repository requires acceptance of the following license: | ||
+ | # /usr/share/amdgpu-install/AMDGPUPROEULA | ||
+ | deb https://repo.radeon.com/amdgpu/21.40.1/ubuntu focal proprietary | ||
+ | </file> | ||
+ | |||
+ | <code user>amdgpu-install --opencl=rocr --no-dkms</code> | ||
+ | <code>Lecture des listes de paquets... Fait | ||
+ | Construction de l'arbre des dépendances... Fait | ||
+ | Lecture des informations d'état... Fait | ||
+ | E: Impossible de trouver le paquet amdgpu-lib | ||
+ | E: Impossible de trouver le paquet amdgpu-lib32 | ||
+ | E: Impossible de trouver le paquet rocm-hip-runtime | ||
+ | E: Impossible de trouver le paquet rocm-opencl-runtime | ||
+ | </code> | ||
+ | |||
+ | |||
===== Utilisation ===== | ===== Utilisation ===== | ||
Ligne 770: | Ligne 843: | ||
Device Name Ellesmere | Device Name Ellesmere | ||
</code> | </code> | ||
+ | |||
+ | ==== AMD RX 6800 16GB GDDR6 ==== | ||
+ | lspci -nnkd::0300 | ||
+ | <code user>0a:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] [1002:73bf] (rev c3) | ||
+ | Subsystem: Sapphire Technology Limited Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] [1da2:e437] | ||
+ | Kernel driver in use: amdgpu | ||
+ | Kernel modules: amdgpu | ||
+ | </code> | ||
+ | |||
+ | glxinfo -B | ||
+ | <code user>name of display: :0 | ||
+ | display: :0 screen: 0 | ||
+ | direct rendering: Yes | ||
+ | Extended renderer info (GLX_MESA_query_renderer): | ||
+ | Vendor: AMD (0x1002) | ||
+ | Device: AMD Radeon RX 6800 (SIENNA_CICHLID, DRM 3.42.0, 5.14.0-3-amd64, LLVM 12.0.1) (0x73bf) | ||
+ | Version: 21.2.4 | ||
+ | Accelerated: yes | ||
+ | Video memory: 16384MB | ||
+ | Unified memory: no | ||
+ | Preferred profile: core (0x1) | ||
+ | Max core profile version: 4.6 | ||
+ | Max compat profile version: 4.6 | ||
+ | Max GLES1 profile version: 1.1 | ||
+ | Max GLES[23] profile version: 3.2 | ||
+ | Memory info (GL_ATI_meminfo): | ||
+ | VBO free memory - total: 15158 MB, largest block: 15158 MB | ||
+ | VBO free aux. memory - total: 16286 MB, largest block: 16286 MB | ||
+ | Texture free memory - total: 15158 MB, largest block: 15158 MB | ||
+ | Texture free aux. memory - total: 16286 MB, largest block: 16286 MB | ||
+ | Renderbuffer free memory - total: 15158 MB, largest block: 15158 MB | ||
+ | Renderbuffer free aux. memory - total: 16286 MB, largest block: 16286 MB | ||
+ | Memory info (GL_NVX_gpu_memory_info): | ||
+ | Dedicated video memory: 16384 MB | ||
+ | Total available memory: 32752 MB | ||
+ | Currently available dedicated video memory: 15158 MB | ||
+ | OpenGL vendor string: AMD | ||
+ | OpenGL renderer string: AMD Radeon RX 6800 (SIENNA_CICHLID, DRM 3.42.0, 5.14.0-3-amd64, LLVM 12.0.1) | ||
+ | OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.2.4 | ||
+ | OpenGL core profile shading language version string: 4.60 | ||
+ | OpenGL core profile context flags: (none) | ||
+ | OpenGL core profile profile mask: core profile | ||
+ | |||
+ | OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.2.4 | ||
+ | OpenGL shading language version string: 4.60 | ||
+ | OpenGL context flags: (none) | ||
+ | OpenGL profile mask: compatibility profile | ||
+ | |||
+ | OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.4 | ||
+ | OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20 | ||
+ | </code> | ||
+ | |||
+ | OpenCL enfin prêt pour RX6000 (RX6800) noyau 5.15.6 minimum : | ||
+ | clinfo : | ||
+ | <code user>alain@sid:~$ clinfo | ||
+ | Number of platforms 1 | ||
+ | Platform Name AMD Accelerated Parallel Processing | ||
+ | Platform Vendor Advanced Micro Devices, Inc. | ||
+ | Platform Version OpenCL 2.0 AMD-APP (3314.0) | ||
+ | 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 gfx1030 | ||
+ | Device Vendor Advanced Micro Devices, Inc. | ||
+ | Device Vendor ID 0x1002 | ||
+ | Device Version OpenCL 2.0 | ||
+ | Driver Version 3314.0 (HSA1.1,LC) | ||
+ | Device OpenCL C Version OpenCL C 2.0 | ||
+ | Device Type GPU | ||
+ | Device Board Name (AMD) Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] | ||
+ | Device PCI-e ID (AMD) 0x73bf | ||
+ | Device Topology (AMD) PCI-E, 0000:0a:00.0 | ||
+ | Device Profile FULL_PROFILE | ||
+ | Device Available Yes | ||
+ | Compiler Available Yes | ||
+ | Linker Available Yes | ||
+ | Max compute units 30 | ||
+ | SIMD per compute unit (AMD) 4 | ||
+ | SIMD width (AMD) 32 | ||
+ | SIMD instruction width (AMD) 1 | ||
+ | Max clock frequency 2475MHz | ||
+ | Graphics IP (AMD) 10.3 | ||
+ | Device Partition (core) | ||
+ | Max number of sub-devices 30 | ||
+ | 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 | ||
+ | Preferred work group size multiple (kernel) 32 | ||
+ | Wavefront width (AMD) 32 | ||
+ | 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 17163091968 (15.98GiB) | ||
+ | Global free memory (AMD) 16760832 (15.98GiB) 16760832 (15.98GiB) | ||
+ | Global memory channels (AMD) 8 | ||
+ | Global memory banks per channel (AMD) 4 | ||
+ | Global memory bank width (AMD) 256 bytes | ||
+ | Error Correction support No | ||
+ | Max memory allocation 14588628168 (13.59GiB) | ||
+ | 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 14588628168 (13.59GiB) | ||
+ | Preferred total size of global vars 17163091968 (15.98GiB) | ||
+ | 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 29631 | ||
+ | Max size for 1D images from buffer 134217728 pixels | ||
+ | Max 1D or 2D image array size 8192 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 16384x16384x8192 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 1703726280 (1.587GiB) | ||
+ | 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 14588628168 (13.59GiB) | ||
+ | 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 (Thu Jan 1 01:00:00 1970) | ||
+ | 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) 30 | ||
+ | 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 gfx1030 | ||
+ | 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 gfx1030 | ||
+ | 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 gfx1030 | ||
+ | |||
+ | ICD loader properties | ||
+ | ICD loader Name OpenCL ICD Loader | ||
+ | ICD loader Vendor OCL Icd free software | ||
+ | ICD loader Version 2.2.14 | ||
+ | ICD loader Profile OpenCL 3.0 | ||
+ | </code> | ||
+ | |||
==== Solution Alternative ==== | ==== Solution Alternative ==== |