@esistgut
I will take a better look the next days. I think this package is missing a lot of libraries. I noticed that when I tried to compile Pytorch myself. I will then make a new release. Thanks for your feedback!
Git Clone URL: | https://aur.archlinux.org/opencl-amd-dev.git (read-only, click to copy) |
---|---|
Package Base: | opencl-amd-dev |
Description: | OpenCL SDK / HIP SDK / ROCM Compiler. This package needs at least 20GB of disk space. |
Upstream URL: | http://www.amd.com |
Licenses: | custom:AMD |
Conflicts: | composablekernel-dev, hipblas, hipblas-common-dev, hipblas-dev, hipblaslt, hipblaslt-dev, hipcub, hipcub-dev, hipfft, hipfft-dev, hipfort, hipfort-dev, hipify-clang, hiprand, hiprand-dev, hipsolver, hipsolver-dev, hipsparse, hipsparse-dev, hipsparselt, hipsparselt-dev, hiptensor, hiptensor-dev, migraphx, migraphx-dev, miopen, miopen-hip, miopen-hip-dev, mivisionx, mivisionx-dev, openmp-extras-dev, rccl, rccl-dev, rocalution, rocalution-dev, rocblas, rocblas-dev, rocfft, rocfft-dev, rocm-developer-tools, rocm-hip-libraries, rocm-hip-runtime-dev, rocm-hip-sdk, rocm-llvm, rocm-ml-libraries, rocm-ml-sdk, rocm-opencl-sdk, rocprim, rocprim-dev, rocprofiler-compute, rocprofiler-sdk, rocprofiler-sdk-roctx, rocprofiler-systems, rocrand, rocrand-dev, rocsolver, rocsolver-dev, rocsparse, rocsparse-dev, rocthrust, rocthrust-dev, rocwmma-dev, rpp, rpp-dev |
Provides: | composablekernel-dev, half, hipblas, hipblas-common-dev, hipblas-dev, hipblaslt, hipblaslt-dev, hipcub, hipcub-dev, hipfft, hipfft-dev, hipfort, hipfort-dev, hipify-clang, hiprand, hiprand-dev, hipsolver, hipsolver-dev, hipsparse, hipsparse-dev, hipsparselt, hipsparselt-dev, hiptensor, hiptensor-dev, migraphx, migraphx-dev, miopen, miopen-hip, miopen-hip-dev, mivisionx, mivisionx-dev, openmp-extras-dev, rccl, rccl-dev, rocalution, rocalution-dev, rocblas, rocblas-dev, rocfft, rocfft-dev, rocm-developer-tools, rocm-hip-libraries, rocm-hip-runtime-dev, rocm-hip-sdk, rocm-llvm, rocm-ml-libraries, rocm-ml-sdk, rocm-opencl-sdk, rocprim, rocprim-dev, rocprofiler-compute, rocprofiler-sdk, rocprofiler-sdk-roctx, rocprofiler-systems, rocrand, rocrand-dev, rocsolver, rocsolver-dev, rocsparse, rocsparse-dev, rocthrust, rocthrust-dev, rocwmma-dev, rpp, rpp-dev |
Submitter: | luciddream |
Maintainer: | luciddream |
Last Packager: | luciddream |
Votes: | 9 |
Popularity: | 0.26 |
First Submitted: | 2021-12-26 15:01 (UTC) |
Last Updated: | 2025-04-11 22:54 (UTC) |
@esistgut
I will take a better look the next days. I think this package is missing a lot of libraries. I noticed that when I tried to compile Pytorch myself. I will then make a new release. Thanks for your feedback!
(venv) esistgut@nibiru:~/coding/python/fastai$ cat check.py
import torch
print(torch.cuda.is_available())
(venv) esistgut@nibiru:~/coding/python/fastai$ python check.py
"hipErrorNoBinaryForGpu: Unable to find code object for all current devices!"
Aborted (core dumped)
(venv) esistgut@nibiru:~/coding/python/fastai$ HSA_OVERRIDE_GFX_VERSION=1030 python check.py
False
Sadly when I try to train some models I get the following error:
terminate called after throwing an instance of 'c10::HIPError'
what(): HIP error: hipErrorNoDevice
Exception raised from deviceCount at /pytorch/aten/src/ATen/hip/impl/HIPGuardImplMasqueradingAsCUDA.h:102 (most recent call first):
I exported HSA_OVERRIDE_GFX_VERSION=1030 for my 5700XT and Pytorch demo runs correctly:
xxx@home ~> python3.9 test.py
tensor([[0.7564, 0.9492, 0.3519],
[0.2405, 0.4661, 0.9351],
[0.6362, 0.6414, 0.1716],
[0.4208, 0.5748, 0.9710],
[0.7452, 0.1493, 0.2885]])
Yes, good find, that guy is saying that patching pytorch with https://github.com/pytorch/pytorch/pull/67294 - should make it work for your GPU. I will also give it a try later
https://www.reddit.com/r/Amd/comments/rd7mmi/heres_something_you_dont_see_every_day_pytorch/ as far as I can tell it should work on gfx1030, people are patching it to add support for other Navi GPUs. Could it be that pytorch installed from pip can't find ROCm stuff in /opt ? I'm not sure, I'm no expert.
There is an issue here that has some suggestions. I will try to take a better look later tonight.
I'm having the same error as you do. I think it's normal because ROCM doesn't support RDNA GPUs yet. I'm not 100% sure though, so I'm open to suggestions :)
You can verify that HIP is working though by running some samples in the package. /opt/rocm/hip/
This is my rocminfo:
ROCk module is loaded
=====================
HSA System Attributes
=====================
Runtime Version: 1.1
System Timestamp Freq.: 1000.000000MHz
Sig. Max Wait Duration: 18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count)
Machine Model: LARGE
System Endianness: LITTLE
==========
HSA Agents
==========
*******
Agent 1
*******
Name: AMD Ryzen 7 3700X 8-Core Processor
Uuid: CPU-XX
Marketing Name: AMD Ryzen 7 3700X 8-Core Processor
Vendor Name: CPU
Feature: None specified
Profile: FULL_PROFILE
Float Round Mode: NEAR
Max Queue Number: 0(0x0)
Queue Min Size: 0(0x0)
Queue Max Size: 0(0x0)
Queue Type: MULTI
Node: 0
Device Type: CPU
Cache Info:
L1: 32768(0x8000) KB
Chip ID: 0(0x0)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 3600
BDFID: 0
Internal Node ID: 0
Compute Unit: 16
SIMDs per CU: 0
Shader Engines: 0
Shader Arrs. per Eng.: 0
WatchPts on Addr. Ranges:1
Features: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: FINE GRAINED
Size: 32848796(0x1f53b9c) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 2
Segment: GLOBAL; FLAGS: KERNARG, FINE GRAINED
Size: 32848796(0x1f53b9c) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 3
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 32848796(0x1f53b9c) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
ISA Info:
*******
Agent 2
*******
Name: gfx1030
Uuid: GPU-XX
Marketing Name: AMD Radeon RX 6900 XT
Vendor Name: AMD
Feature: KERNEL_DISPATCH
Profile: BASE_PROFILE
Float Round Mode: NEAR
Max Queue Number: 128(0x80)
Queue Min Size: 4096(0x1000)
Queue Max Size: 131072(0x20000)
Queue Type: MULTI
Node: 1
Device Type: GPU
Cache Info:
L1: 16(0x10) KB
L2: 4096(0x1000) KB
L3: 131072(0x20000) KB
Chip ID: 29631(0x73bf)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 2660
BDFID: 2816
Internal Node ID: 1
Compute Unit: 80
SIMDs per CU: 2
Shader Engines: 8
Shader Arrs. per Eng.: 2
WatchPts on Addr. Ranges:4
Features: KERNEL_DISPATCH
Fast F16 Operation: FALSE
Wavefront Size: 32(0x20)
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Max Waves Per CU: 32(0x20)
Max Work-item Per CU: 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 4294967295(0xffffffff)
y 4294967295(0xffffffff)
z 4294967295(0xffffffff)
Max fbarriers/Workgrp: 32
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 16760832(0xffc000) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 2
Segment: GROUP
Size: 64(0x40) KB
Allocatable: FALSE
Alloc Granule: 0KB
Alloc Alignment: 0KB
Accessible by all: FALSE
ISA Info:
ISA 1
Name: amdgcn-amd-amdhsa--gfx1030
Machine Models: HSA_MACHINE_MODEL_LARGE
Profiles: HSA_PROFILE_BASE
Default Rounding Mode: NEAR
Default Rounding Mode: NEAR
Fast f16: TRUE
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 4294967295(0xffffffff)
y 4294967295(0xffffffff)
z 4294967295(0xffffffff)
FBarrier Max Size: 32
*** Done ***
I installed python 3.9 from the AUR package and then installed pytorch with the same command you posted but it is not working:
(venv) esistgut@nibiru:~/coding/python/fastai$ python --version
Python 3.9.9
(venv) esistgut@nibiru:~/coding/python/fastai$ cat asd.py
import torch
if torch.opencl.is_available():
device = torch.device("opencl")
else:
device = torch.device("cpu")
print(device)
(venv) esistgut@nibiru:~/coding/python/fastai$ python asd.py
"hipErrorNoBinaryForGpu: Unable to find code object for all current devices!"
Aborted (core dumped)
Pinned Comments
luciddream commented on 2022-01-12 16:47 (UTC) (edited on 2025-04-11 22:57 (UTC) by luciddream)
Latest release: 6.4.0. It uses 12.67GB of disk.