Operating System: Arch Linux 6.8.8
Interface Version: CmdStan 2.34.1
Compiler/Toolkit: gcc (GCC) 13.2.1 20240417
CPU: Intel(R) Core™ Processor i9-10900K 10/20 3.70GHz [Turbo 5.2GHz] 20MB Cache LGA1200
GPU: PowerColor Hellhound Radeon RX 7800 XT 16GB GDDR6 PCIe 4.0 Graphics Card GPU
Hello,
I am trying to get GPU support working on Arch Linux for a simple test model. I am monitoring CPU and GPU usage using the btop package. As far as I can tell, the GPU is not being used after compiling from R with stan_opencl=TRUE and using opencl_ids = c(2, 0) in the sampling statement. My guess is some kind of GPU driver issue, but it’s beyond my knowledge. I would greatly appreciate any help or insight from the community.
Here is the btop monitor during sampling - looks like all of the computation is going to one CPU core, no GPU usage.
I included my test results in the attached html file. I also included a text file with all of the packages installed on my system. It may be worth mentioning that I am able to use CPU multithreading by setting stan_threads=TRUE when compiling.
Output from clinfo -l
Platform #0: Portable Computing Language `-- Device #0: cpu-haswell-Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz
Platform #1: AMD Accelerated Parallel Processing`-- Device #0: gfx1101
Platform #2: Clover \`-- Device #0: AMD Radeon RX 7800 XT (radeonsi, navi32, LLVM 17.0.6, DRM 3.57, 6.8.8-arch1-1)
Test model with support for multi-threading based on data input use_reduce_sum
functions {
real partsum_sn(array[] real x_slice, int start, int end) {
return std_normal_lpdf(to_vector(x_slice));
}
}
data {
int<lower=0> N;
int use_reduce_sum;
}
parameters {
vector[N] x;
}
model {
if (use_reduce_sum) {
target += reduce_sum(partsum_sn, to_array_1d(x), 1);
} else {
target += std_normal_lpdf(x);
}
}
Test results (1.3 MB)
List of packages installed (34.3 KB)