LLVM ERROR
Installing and running a simple example gives
> library(devtools)
> dev_mode(TRUE)
Dev mode: ON
d>
d> library(gpuR)
d> A <- gpuMatrix(rnorm(10000), 100, 100)
d> A %*% A
LLVM ERROR: Cannot select: 0x47b28c0: f64 = fpow 0x478f110, 0x44c0330 [ORD=12] [ID=59]
0x478f110: f64 = bitcast 0x47b02d0 [ORD=6] [ID=56]
0x47b02d0: i64,ch = load 0x49617d0, 0x478efe8, 0x487c510<LD8[%69(addrspace=1)](tbaa=<0x3ed1378>)> [ORD=6] [ID=54]
0x478efe8: i64 = add 0x478ec70, 0x4201038 [ORD=5] [ID=51]
0x478ec70: i64,ch = CopyFromReg 0x49617d0, 0x4590138 [ORD=5] [ID=26]
0x4590138: i64 = Register %vreg69 [ID=4]
0x4201038: i64 = shl 0x44c10f0, 0x47b1098 [ORD=5] [ID=48]
0x44c10f0: i64 = sign_extend 0x4746ea8 [ORD=4] [ID=45]
0x4746ea8: i32 = add 0x478f908, 0x4748358 [ORD=3] [ID=40]
0x478f908: i32,ch = CopyFromReg 0x49617d0, 0x482f660 [ORD=3] [ID=25]
0x482f660: i32 = Register %vreg23 [ID=3]
0x4748358: i32 = mul 0x49a1950, 0x47b0e48 [ORD=2] [ID=36]
0x49a1950: i32,ch = CopyFromReg 0x49617d0, 0x487c888 [ORD=2] [ID=23]
0x487c888: i32 = Register %vreg29 [ID=1]
0x47b0e48: i32,ch = CopyFromReg 0x49617d0, 0x49a1cc8 [ORD=2] [ID=24]
0x49a1cc8: i32 = Register %vreg73 [ID=2]
0x47b1098: i32 = Constant<3> [ID=22]
0x487c510: i64 = undef [ID=5]
0x44c0330: f64 = bitcast 0x44c8f08 [ORD=11] [ID=58]
0x44c8f08: i64,ch = load 0x49617d0, 0x458eb60, 0x487c510<LD8[%74(addrspace=1)](tbaa=<0x3ed1378>)> [ORD=11] [ID=55]
0x458eb60: i64 = add 0x458f940, 0x47b19d8 [ORD=10] [ID=52]
0x458f940: i64,ch = CopyFromReg 0x49617d0, 0x4746c58 [ORD=10] [ID=29]
0x4746c58: i64 = Register %vreg75 [ID=8]
0x47b19d8: i64 = shl 0x47b20a8, 0x47b1098 [ORD=10] [ID=49]
0x47b20a8: i64 = sign_extend 0x49a24e0 [ORD=9] [ID=46]
0x49a24e0: i32 = add 0x458f4a0, 0x487d1c8 [ORD=8] [ID=41]
0x458f4a0: i32,ch = CopyFromReg 0x49617d0, 0x482f410 [ORD=8] [ID=28]
0x482f410: i32 = Register %vreg24 [ID=7]
0x487d1c8: i32 = mul 0x49a1950, 0x4748480 [ORD=7] [ID=37]
0x49a1950: i32,ch = CopyFromReg 0x49617d0, 0x487c888 [ORD=2] [ID=23]
0x487c888: i32 = Register %vreg29 [ID=1]
0x4748480: i32,ch = CopyFromReg 0x49617d0, 0x47b0648 [ORD=7] [ID=27]
0x47b0648: i32 = Register %vreg79 [ID=6]
0x47b1098: i32 = Constant<3> [ID=22]
0x487c510: i64 = undef [ID=5]
In function: element_op
~ $
d> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Arch Linux
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] gpuR_1.0.2 devtools_1.10.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.3 assertive.sets_0.0-1
[3] assertive.data.us_0.0-1 assertive.types_0.0-1
[5] assertive.properties_0.0-1 digest_0.6.9
[7] assertive.base_0.0-3 assertive.models_0.0-1
[9] assertive.code_0.0-1 assertive.strings_0.0-1
[11] assertive.matrices_0.0-1 assertive.reflection_0.0-1
[13] assertive.data_0.0-1 assertive_0.3-1
[15] assertive.datetimes_0.0-1 tools_3.2.3
[17] assertive.numbers_0.0-1 assertive.files_0.0-1
[19] assertive.data.uk_0.0-1 memoise_1.0.0
[21] knitr_1.12.3
@izahn Thanks for the note, I assume this was installed from the 'develop' branch? Could you also provide GPU device used (found in the output of gpuInfo()).
Yes, develop branch, installed mostly following the instructions in thr R-help crowd sourcing request. Here is gpuInfo():
d> gpuInfo()
$deviceName
[1] "AMD OLAND (DRM 2.43.0, LLVM 3.7.0)"
$deviceVendor
[1] "AMD"
$numberOfCores
[1] 6
$maxWorkGroupSize
[1] 256
$maxWorkItemDim
[1] 3
$maxWorkItemSizes
[1] 256 256 256
$deviceMemory
[1] 1073741824
$clockFreq
[1] 825
$localMem
[1] 32768
$maxAllocatableMem
[1] 268435456
$available
[1] "yes"
$deviceExtensions
[1] "cl_khr_global_int32_base_atomics"
[2] "cl_khr_global_int32_extended_atomics"
[3] "cl_khr_local_int32_base_atomics"
[4] "cl_khr_local_int32_extended_atomics"
[5] "cl_khr_byte_addressable_store"
[6] "cl_khr_fp64"
@izahn also, what OS are you using?
I'm on Arch Linux:
Sys.info()[c(1:3, 5)]
sysname
"Linux"
release
"4.4.1-2-ARCH"
version
"#1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016"
machine
"x86_64"
Other possibly interesting stuff:
> system("pacman -Qs opencl")
local/libclc 0.2.0+274+4346c30-1
Library requirements of the OpenCL C programming language
local/ocl-icd 2.2.8-1
OpenCL ICD Bindings
local/opencl-headers 2:2.1.20151224-1
OpenCL (Open Computing Language) header files
local/opencl-mesa 11.1.1-1
OpenCL support for AMD/ATI Radeon mesa drivers
> system("pacman -Qs video-ati")
local/xf86-video-ati 1:7.6.1-1 (xorg-drivers xorg)
X.org ati video driver
> system("pacman -Qs llvm")
local/clang 3.7.1-1
C language family frontend for LLVM
local/llvm 3.7.1-1
Low Level Virtual Machine
local/llvm-libs 3.7.1-1
Low Level Virtual Machine (runtime libraries)
local/openmp 3.7.0-1
LLVM OpenMP Runtime Library
This is also happening to me when installing with install.packages("gpuR") and also with the development branch, which I installed with devtools::install_github("cdeterman/gpuR", ref = "develop").
I'm running Debian GNU/Linux;
> library(gpuR)
Number of platforms: 2
- platform: Mesa: OpenCL 1.1 Mesa 17.3.1
- context device index: 0
- AMD Radeon (TM) R9 380 Series (TONGA / DRM 3.19.0 / 4.14.0-trunk-amd64, LLVM 5.0.1)
- platform: The pocl project: OpenCL 2.0 pocl 0.14, LLVM 3.9.1
- context device index: 0
- pthread-AMD FX-8320E Eight-Core Processor
checked all devices
completed initialization
gpuR 2.0.2
Attaching package: ‘gpuR’
The following objects are masked from ‘package:base’:
colnames, pmax, pmin, svd
>
> A <- gpuMatrix(rnorm(10000), 100, 100)
> A %*% A
LLVM ERROR: Cannot select: 0x5604a92b2be0: f64 = fpow 0x5604a9217eb0, 0x5604a87f7ba0
0x5604a9217eb0: f64 = bitcast 0x5604a92449a0
0x5604a92449a0: v2i32,ch = load<LD8[%arrayidx(addrspace=1)](tbaa=<0x5604a9290b98>)> 0x5604a936d5a8, 0x5604a9244a08, undef:i64
0x5604a9244a08: i64 = add 0x5604a87f22e8, 0x5604a9242d30
0x5604a87f22e8: i64,ch = CopyFromReg 0x5604a936d5a8, Register:i64 %vreg72
0x5604a87f2e48: i64 = Register %vreg72
0x5604a9242d30: i64 = shl 0x5604a87f84f8, Constant:i32<3>
0x5604a87f84f8: i64 = zero_extend 0x5604a9242bf8
0x5604a9242bf8: i32 = add 0x5604a87fe6f8, 0x5604a9242ed0
0x5604a87fe6f8: i32,ch = CopyFromReg 0x5604a936d5a8, Register:i32 %vreg15
0x5604a918a880: i32 = Register %vreg15
0x5604a9242ed0: i32 = mul 0x5604a87f9f00, 0x5604a923b778
0x5604a87f9f00: i32,ch = CopyFromReg 0x5604a936d5a8, Register:i32 %vreg21
0x5604a923b230: i32 = Register %vreg21
0x5604a923b778: i32,ch = CopyFromReg 0x5604a936d5a8, Register:i32 %vreg76
0x5604a87fe0e0: i32 = Register %vreg76
0x5604a87f49f0: i32 = Constant<3>
0x5604a9190498: i64 = undef
0x5604a87f7ba0: f64 = bitcast 0x5604a87fa788
0x5604a87fa788: v2i32,ch = load<LD8[%arrayidx21(addrspace=1)](tbaa=<0x5604a9290b98>)> 0x5604a936d5a8, 0x5604a64fd0f8, undef:i64
0x5604a64fd0f8: i64 = add 0x5604a65014e0, 0x5604a918f800
0x5604a65014e0: i64,ch = CopyFromReg 0x5604a936d5a8, Register:i64 %vreg78
0x5604a92406f8: i64 = Register %vreg78
0x5604a918f800: i64 = shl 0x5604a91939f8, Constant:i32<3>
0x5604a91939f8: i64 = zero_extend 0x5604a91905d0
0x5604a91905d0: i32 = add 0x5604a6500ab8, 0x5604a87f4b28
0x5604a6500ab8: i32,ch = CopyFromReg 0x5604a936d5a8, Register:i32 %vreg16
0x5604a87f4718: i32 = Register %vreg16
0x5604a87f4b28: i32 = mul 0x5604a87f9f00, 0x5604a87fc538
0x5604a87f9f00: i32,ch = CopyFromReg 0x5604a936d5a8, Register:i32 %vreg21
0x5604a923b230: i32 = Register %vreg21
0x5604a87fc538: i32,ch = CopyFromReg 0x5604a936d5a8, Register:i32 %vreg82
0x5604a64fcf58: i32 = Register %vreg82
0x5604a87f49f0: i32 = Constant<3>
0x5604a9190498: i64 = undef
In function: element_op
d> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux buster/sid
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=C
[4] LC_COLLATE=C LC_MONETARY=C LC_MESSAGES=C
[7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=C LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] gpuR_2.0.2 devtools_1.13.1
loaded via a namespace (and not attached):
[1] Rcpp_0.12.14 assertive.sets_0.0-3
[3] codetools_0.2-15 assertive.data.us_0.0-1
[5] assertive.types_0.0-3 assertive.properties_0.0-4
[7] digest_0.6.13 withr_1.0.2
[9] assertive.base_0.0-7 assertive.models_0.0-1
[11] assertive.code_0.0-1 stringi_1.1.5
[13] assertive.strings_0.0-3 assertive.matrices_0.0-1
[15] assertive.reflection_0.0-4 assertive.datetimes_0.0-2
[17] assertive.data_0.0-1 assertive_0.3-5
[19] tools_3.4.3 assertive.numbers_0.0-2
[21] compiler_3.4.3 assertive.files_0.0-2
[23] assertive.data.uk_0.0-1 memoise_1.1.0
[25] knitr_1.17
dpkg -l llvm\*|grep ii
ii llvm-3.3-runtime 1:3.3-16 amd64 Modular compiler and toolchain technologies, IR interpreter
ii llvm-3.6 1:3.6.2-4 amd64 Modular compiler and toolchain technologies
ii llvm-3.6-dev 1:3.6.2-4 amd64 Modular compiler and toolchain technologies, libraries and headers
ii llvm-3.6-runtime 1:3.6.2-4 amd64 Modular compiler and toolchain technologies, IR interpreter
ii llvm-3.8 1:3.8.1-27 amd64 Modular compiler and toolchain technologies
ii llvm-3.8-dev 1:3.8.1-27 amd64 Modular compiler and toolchain technologies, libraries and headers
ii llvm-3.8-runtime 1:3.8.1-27 amd64 Modular compiler and toolchain technologies, IR interpreter
ii llvm-3.9 1:3.9.1-19 amd64 Modular compiler and toolchain technologies
ii llvm-3.9-dev 1:3.9.1-19 amd64 Modular compiler and toolchain technologies, libraries and headers
ii llvm-3.9-runtime 1:3.9.1-19 amd64 Modular compiler and toolchain technologies, IR interpreter
ii llvm-4.0 1:4.0.1-8 amd64 Modular compiler and toolchain technologies
ii llvm-4.0-dev 1:4.0.1-8 amd64 Modular compiler and toolchain technologies, libraries and headers
ii llvm-4.0-runtime 1:4.0.1-8 amd64 Modular compiler and toolchain technologies, IR interpreter
uname -a
Linux socrates 4.14.0-trunk-amd64 #1 SMP Debian 4.14-1~exp1 (2017-11-17) x86_64 GNU/Linux
dpkg -l xserver-xorg-video-radeon
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-======================================================================-========================================-========================================-=================================================================================================================================================
ii xserver-xorg-video-radeon 1:7.10.0-1 amd64 X.Org X server -- AMD/ATI Radeon display driver
Part of information from glxinfo:
Extended renderer info (GLX_MESA_query_renderer):
Vendor: X.Org (0x1002)
Device: AMD Radeon (TM) R9 380 Series (TONGA / DRM 3.19.0 / 4.14.0-trunk-amd64, LLVM 5.0.1) (0x6938)
Version: 17.3.1
Accelerated: yes
Video memory: 4073MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.5
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL vendor string: X.Org
OpenGL renderer string: AMD Radeon (TM) R9 380 Series (TONGA / DRM 3.19.0 / 4.14.0-trunk-amd64, LLVM 5.0.1)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.3.1
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
...
OpenGL version string: 3.0 Mesa 17.3.1
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
From Xorg.0.log:
[ 29.924] (II) AMDGPU: Driver for AMD Radeon:
All GPUs supported by the amdgpu kernel driver
...
[ 29.957] (--) AMDGPU(0): Chipset: "AMD Radeon (TM) R9 380 Series" (ChipID = 0x6938)