#1082845 rocm-opencl-icd: CommandLine Error: Option 'sanitizer-early-opt-ep' registered more than once! #1082845
- Package:
- rocm-opencl-icd
- Source:
- rocm-opencl-icd
- Description:
- ROCm implementation of OpenCL API - ICD runtime
- Submitter:
- Frederic-Emmanuel Picca
- Date:
- 2024-10-03 00:54:01 UTC
- Severity:
- normal
Dear Maintainer,
I just installed rocm-opencl-icd and try to run the clpeak program.
But I get this error message
$ clpeak
: CommandLine Error: Option 'sanitizer-early-opt-ep' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Abandon
the hardware is
$ 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
Mwaitx: DISABLED
DMAbuf Support: YES
==========
HSA Agents
==========
*******
Agent 1
*******
Name: AMD Ryzen 5 4500U with Radeon Graphics
Uuid: CPU-XX
Marketing Name: AMD Ryzen 5 4500U with Radeon Graphics
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)
ASIC Revision: 0(0x0)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 2375
BDFID: 0
Internal Node ID: 0
Compute Unit: 6
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: 7539416(0x730ad8) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 2
Segment: GLOBAL; FLAGS: KERNARG, FINE GRAINED
Size: 7539416(0x730ad8) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 3
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 7539416(0x730ad8) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
ISA Info:
*******
Agent 2
*******
Name: gfx90c
Uuid: GPU-XX
Marketing Name: AMD Radeon Graphics
Vendor Name: AMD
Feature: KERNEL_DISPATCH
Profile: BASE_PROFILE
Float Round Mode: NEAR
Max Queue Number: 128(0x80)
Queue Min Size: 64(0x40)
Queue Max Size: 131072(0x20000)
Queue Type: MULTI
Node: 1
Device Type: GPU
Cache Info:
L1: 16(0x10) KB
L2: 1024(0x400) KB
Chip ID: 5686(0x1636)
ASIC Revision: 0(0x0)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 1500
BDFID: 1024
Internal Node ID: 1
Compute Unit: 6
SIMDs per CU: 4
Shader Engines: 1
Shader Arrs. per Eng.: 1
WatchPts on Addr. Ranges:4
Features: KERNEL_DISPATCH
Fast F16 Operation: TRUE
Wavefront Size: 64(0x40)
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Max Waves Per CU: 40(0x28)
Max Work-item Per CU: 2560(0xa00)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 4294967295(0xffffffff)
y 4294967295(0xffffffff)
z 4294967295(0xffffffff)
Max fbarriers/Workgrp: 32
Packet Processor uCode:: 472
SDMA engine uCode:: 40
IOMMU Support:: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 3769708(0x39856c) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 2
Segment: GLOBAL; FLAGS:
Size: 3769708(0x39856c) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 3
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--gfx90c:xnack-
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 ***
Hi Frederic-Emmanuel, the clang libraries are loaded in the same program, but I'm not clear on what's pulling them in. IIRC, Kari had to mark the mesa-opencl-icd as a conflict of the rocm-opencl-icd package due to a problem like this one. That surprised me, as just having both packages installed on the system would cause the problem. I'm still not sure why that is. In any case, it works on my machine. I cannot reproduce the bug, so it will require more investigation to determine why you're encountering this problem and I am not. cgmb@scorbunny:~$ clpeak Platform: AMD Accelerated Parallel Processing Device: gfx906:sramecc+:xnack- Driver version : 3590.0 (HSA1.1,LC) (Linux x64) Compute units : 60 Clock frequency : 1801 MHz Global memory bandwidth (GBPS) float : 767.18 float2 : 804.05 float4 : 785.04 float8 : 779.17 float16 : 596.06 Single-precision compute (GFLOPS) float : 13597.88 float2 : 13077.49 float4 : 12752.28 float8 : 12658.15 float16 : 12519.22 Half-precision compute (GFLOPS) half : 6663.12 half2 : 24404.30 half4 : 24140.63 half8 : 23903.13 half16 : 24237.96 Double-precision compute (GFLOPS) double : 3312.10 double2 : 3221.78 double4 : 3217.00 double8 : 3176.58 double16 : 3170.24 Integer compute (GIOPS) int : 4355.16 int2 : 4351.48 int4 : 4365.67 int8 : 4352.32 int16 : 4311.61 Integer compute Fast 24bit (GIOPS) int : 12316.54 int2 : 11368.70 int4 : 10943.03 int8 : 10985.45 int16 : 10581.34 Transfer bandwidth (GBPS) enqueueWriteBuffer : 16.92 enqueueReadBuffer : 16.69 enqueueWriteBuffer non-blocking : 16.78 enqueueReadBuffer non-blocking : 16.64 enqueueMapBuffer(for read) : 244032.22 memcpy from mapped ptr : 16.61 enqueueUnmap(after write) : 357913.94 memcpy to mapped ptr : 16.49 Kernel launch latency : -1493179648.00 us Sincerely, Cory Bloor
Hello, What kind of investigation ?. I can test a few things. another point It would be great if the rocm-opencl-icd package was instrumented to extract relavant information for debuging automatically, https://sources.debian.org/src/reportbug/13.0.1/doc/README.developers/ thanks Fred
Hi Fred, Thanks. Does this clpeak work for you? Or are you experiencing this same bug? We could try reviewing the package lists of systems where it works and where it doesn't, in case this stems from an incompatibility between installed packages. Or, someone who is experiencing the crash could try to debug, by looking through the libraries loaded into the crashing process and/or debugging when the options are registered. With that said, I think my plan is to reach out to more knowledgeable developers upstream. I'm hoping that they have some suggestions. You're referring to "Add attachments from the bugscript"? That's an interesting option, although I'm not sure what information to collect. Sincerely, Cory Bloor
Le 2024-09-30 08:57, Cordell Bloor a écrit :
Hello
I am the one who reported the bug, so yes I am affected by this same bug
;)
I do not have time today but I will try to investigate this.
I think that the output of
- lspci
- rocm-info
could be a good start
cheers
Fred
When I recompile clpeak, it works...
So it seems that the issue is in clpeak
Test project /tmp/clpeak-1.1.2/obj-x86_64-linux-gnu
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1
Start 1: clpeak_test_run
1: Test command:
/home/picca/tmp/clpeak-1.1.2/obj-x86_64-linux-gnu/clpeak
1: Working Directory: /home/picca/tmp/clpeak-1.1.2/obj-x86_64-linux-gnu
1: Test timeout computed to be: 10000000
1:
1: Platform: AMD Accelerated Parallel Processing
1: Device: gfx90c:xnack-
1: Driver version : 3590.0 (HSA1.1,LC) (Linux x64)
1: Compute units : 6
1: Clock frequency : 1500 MHz
1:
1: Global memory bandwidth (GBPS)
1: float : 15.60
1: float2 : 15.58
1: float4 : 17.05
1: float8 : 18.45
1: float16 : 18.06
1:
1: Single-precision compute (GFLOPS)
1: float : 1103.20
1: float2 : 1102.38
1: float4 : 1098.42
1: float8 : 1090.52
1: float16 : 1073.20
1:
1: Half-precision compute (GFLOPS)
1: half : 1104.12
1: half2 : 2116.23
1: half4 : 2123.43
1: half8 : 2094.10
1: half16 : 2048.29
1:
1: Double-precision compute (GFLOPS)
1: double : 71.04
1: double2 : 70.81
1: double4 : 70.80
1: double8 : 70.34
1: double16 : 70.42
1:
1: Integer compute (GIOPS)
1: int : 225.82
1: int2 : 225.59
1: int4 : 225.31
1: int8 : 225.06
1: int16 : 224.10
1:
1: Integer compute Fast 24bit (GIOPS)
1: int : 1056.93
1: int2 : 1051.22
1: int4 : 1051.37
1: int8 : 1037.44
1: int16 : 939.23
1:
1: Transfer bandwidth (GBPS)
1: enqueueWriteBuffer : 8.38
1: enqueueReadBuffer : 8.70
1: enqueueWriteBuffer non-blocking : 8.65
1: enqueueReadBuffer non-blocking : 8.71
1: enqueueMapBuffer(for read) : 12156.92
1: memcpy from mapped ptr : 8.63
1: enqueueUnmap(after write) : 79639.61
1: memcpy to mapped ptr : 8.65
1:
1: Kernel launch latency : 14.63 us
1:
1:
1: Platform: Portable Computing Language
1: Device: cpu-haswell-AMD Ryzen 5 4500U with Radeon Graphics
1: Driver version : 6.0+debian (Linux x64)
1: Compute units : 6
1: Clock frequency : 2375 MHz
1: 64 warnings generated.
1:
1: Global memory bandwidth (GBPS)
1: float : 14.73
1: float2 : 14.60
1: float4 : 15.98
1: float8 : 12.29
1: float16 : 14.40
1:
1: Single-precision compute (GFLOPS)
1: float : 7.96
1: float2 : 16.10
1: float4 : 32.47
1: float8 : 65.57
1: float16 : 128.78
1:
1: No half precision support! Skipped
1:
1: Double-precision compute (GFLOPS)
1: double : 7.98
1: double2 : 15.96
1: double4 : 32.40
1: double8 : 62.80
1: double16 : 123.23
1:
1: Integer compute (GIOPS)
1: int : 11.94
1: int2 : 21.54
1: int4 : 44.47
1: int8 : 88.77
1: int16 : 167.00
1:
1: Integer compute Fast 24bit (GIOPS)
1: int : 12.00
1: int2 : 21.76
1: int4 : 43.90
1: int8 : 88.93
1: int16 : 159.47
1:
1: Transfer bandwidth (GBPS)
1: enqueueWriteBuffer : 9.13
1: enqueueReadBuffer : 9.30
1: enqueueWriteBuffer non-blocking : 9.56
1: enqueueReadBuffer non-blocking : 9.49
1: enqueueMapBuffer(for read) : 15449.52
1: memcpy from mapped ptr : 8.82
1: enqueueUnmap(after write) : 20297.58
1: memcpy to mapped ptr : 9.41
1:
1: Kernel launch latency : 10.06 us
1:
1/1 Test #1: clpeak_test_run .................. Passed 173.09 sec
100% tests passed, 0 tests failed out of 1
Hi Fred, That's an excellent idea. We should certainly look into that. It's often quite important to know what GPU the user is having trouble with. Not always, of course, but often enough that it's worth collecting that data automatically. As long as the user has a good way to opt-out of sharing that information, I'm on board. Sincerely, Cory Bloor