AMD Ryzen™ 5 3500U如何在20.04下如何安装显卡驱动?

CPU/显卡/打印机/USB设备等硬件问题
回复
TOM3550
帖子: 9
注册时间: 2023-12-12 16:31
系统: ubuntu18.04

AMD Ryzen™ 5 3500U如何在20.04下如何安装显卡驱动?

#1

帖子 TOM3550 » 2024-01-05 16:14

AMD Ryzen™ 5 3500U工控小主机,显卡是Radeon™ Vega 8 Graphics,安装的系统是ubuntu server 20.04,安装完成后,sudo radeontop发现显卡占用率一直100%,安装了mesa-opencl-icd以及ocl-icd-libopencl1后,sudo clinfo也能发现设备,但一跑程序就报错,有办法解决吗?
头像
astolia
论坛版主
帖子: 6451
注册时间: 2008-09-18 13:11

Re: AMD Ryzen™ 5 3500U如何在20.04下如何安装显卡驱动?

#2

帖子 astolia » 2024-01-05 17:21

开源驱动是和内核一起的,要用新驱动就安装新内核。
闭源驱动在 https://www.amd.com/en/support/linux-drivers
另外,还是那句话,遇到报错最好把报错信息发上来
TOM3550
帖子: 9
注册时间: 2023-12-12 16:31
系统: ubuntu18.04

Re: AMD Ryzen™ 5 3500U如何在20.04下如何安装显卡驱动?

#3

帖子 TOM3550 » 2024-01-09 14:27

astolia 写了: 2024-01-05 17:21 开源驱动是和内核一起的,要用新驱动就安装新内核。
闭源驱动在 https://www.amd.com/en/support/linux-drivers
另外,还是那句话,遇到报错最好把报错信息发上来
版主好,情况是这样,安装了mesa-opencl-icd ocl-icd-libopencl1

sudo clinfo
Number of platforms 1
Platform Name Clover
Platform Vendor Mesa
Platform Version OpenCL 1.1 Mesa 21.2.6
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix MESA

Platform Name Clover
Number of devices 1
Device Name AMD Radeon(TM) Vega 8 Graphics (RAVEN, DRM 3.42.0, 5.15.0-91-generic, LLVM 12.0.0)
Device Vendor AMD
Device Vendor ID 0x1002
Device Version OpenCL 1.1 Mesa 21.2.6
Driver Version 21.2.6
Device OpenCL C Version OpenCL C 1.1
Device Type GPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Max compute units 8
Max clock frequency 1200MHz
Max work item dimensions 3
Max work item sizes 256x256x256
Max work group size 256
=== CL_PROGRAM_BUILD_LOG ===
fatal error: cannot open file '/usr/local//usr/lib/clc/gfx902-amdgcn-mesa-mesa3d.bc': No such file or directory
Preferred work group size multiple <getWGsizes:1200: create kernel : error -46>
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 2 / 2 (cl_khr_fp64)
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 (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 3221225472 (3GiB)
Error Correction support No
Max memory allocation 2254857830 (2.1GiB)
Unified memory for Host and Device No
Minimum alignment for any data type 128 bytes
Alignment of base address 32768 bits (4096 bytes)
Global Memory cache type None
Image support No
Local memory type Local
Local memory size 32768 (32KiB)
Max number of constant args 16
Max constant buffer size 67108864 (64MiB)
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 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 cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64 cl_khr_extended_versioning

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_DEFAULT) Success (1)
Platform Name Clover
Device Name AMD Radeon(TM) Vega 8 Graphics (RAVEN, DRM 3.42.0, 5.15.0-91-generic, LLVM 12.0.0)
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 Radeon(TM) Vega 8 Graphics (RAVEN, DRM 3.42.0, 5.15.0-91-generic, LLVM 12.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 Radeon(TM) Vega 8 Graphics (RAVEN, DRM 3.42.0, 5.15.0-91-generic, LLVM 12.0.0)

ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.2.11
ICD loader Profile OpenCL 2.1

看起来,应该正常,但是运行程序后,
terminate called after throwing an instance of 'OpenCLHelpers::CompileError'
what(): CL_INVALID_BUILD_OPTIONS
BUILD LOG FOR conv2dNCHWProgram ON DEVICE 0

不知道发生了什么?

运行5.7版本的sudo apt-get install ./amdgpu_intall_*.deb后,安装amdgpu-install -y --opencl=rocr,legacy,提示找不到文件
头像
astolia
论坛版主
帖子: 6451
注册时间: 2008-09-18 13:11

Re: AMD Ryzen™ 5 3500U如何在20.04下如何安装显卡驱动?

#4

帖子 astolia » 2024-01-10 9:32

TOM3550 写了: 2024-01-09 14:27 不知道发生了什么?
这么明晃晃的错误你看不见吗?还“看起来,应该正常”。不知道fatal error的意思就赶紧去查一下字典
TOM3550 写了: 2024-01-09 14:27 fatal error: cannot open file '/usr/local//usr/lib/clc/gfx902-amdgcn-mesa-mesa3d.bc': No such file or directory
从'/usr/local//usr/lib/‘这个路径来看,你肯定有东西安装时搞错路径了。如果你不知道哪一步在指定的路径,也可以在/usr/local下建立一个到/usr的软链接,让这个错误路径变成正确的
gfx902-amdgcn-mesa-mesa3d.bc这个文件是从libclc-13开始有的。ubuntu 20.04上的libclc-12里只有gfx902-amdgcn--.bc。你可以自己建立一个到gfx902-amdgcn--.bc的软链接。
TOM3550
帖子: 9
注册时间: 2023-12-12 16:31
系统: ubuntu18.04

Re: AMD Ryzen™ 5 3500U如何在20.04下如何安装显卡驱动?

#5

帖子 TOM3550 » 2024-01-11 22:30

astolia 写了: 2024-01-10 9:32
TOM3550 写了: 2024-01-09 14:27 不知道发生了什么?
这么明晃晃的错误你看不见吗?还“看起来,应该正常”。不知道fatal error的意思就赶紧去查一下字典
TOM3550 写了: 2024-01-09 14:27 fatal error: cannot open file '/usr/local//usr/lib/clc/gfx902-amdgcn-mesa-mesa3d.bc': No such file or directory
从'/usr/local//usr/lib/‘这个路径来看,你肯定有东西安装时搞错路径了。如果你不知道哪一步在指定的路径,也可以在/usr/local下建立一个到/usr的软链接,让这个错误路径变成正确的
gfx902-amdgcn-mesa-mesa3d.bc这个文件是从libclc-13开始有的。ubuntu 20.04上的libclc-12里只有gfx902-amdgcn--.bc。你可以自己建立一个到gfx902-amdgcn--.bc的软链接。
:Cry :Cry 大写的尴尬,好的,版主,我再试试。
pengsir
帖子: 137
注册时间: 2015-07-24 8:29
系统: ubuntu

Re: AMD Ryzen™ 5 3500U如何在20.04下如何安装显卡驱动?

#6

帖子 pengsir » 2024-04-17 19:02

升级操作系统不就可以了!
回复