Kind regards,
I am currently utilizing ArrayFire in a simulation, and a part of the algorithm requires sampling from a multivariate normal distribution with mean M_i and covariance matrix S_i. Each sample has its own mean and covariance. To generate multivariate samples, I am using the Cholesky decomposition; however, it cannot be used in batch mode.
My algorithm requires generating millions of samples from small multivariate normals (7 to 10 dimensions). Is there any alternative to make it faster?
I have extracted and attached the part of the code that gives the error, thanks in advance.
Error message:
terminate called after throwing an instance of 'af::exception'
what(): ArrayFire Exception (Invalid batch configuration:207):
In function af_cholesky
In file src/api/c/cholesky.cpp:41
cholesky can not be used in batch mode
0# af_cholesky in /home/carlos/ArrayFire-3.9.0-Linux/lib64/libafcuda.so.3
1# af::cholesky(af::array&, af::array const&, bool) in /home/carlos/ArrayFire-3.9.0-Linux/lib64/libafcuda.so.3
2# 0x000055D0A9886579 in ./model
3# 0x00007F43E5445CD0 in /usr/lib/libc.so.6
4# __libc_start_main in /usr/lib/libc.so.6
5# 0x000055D0A9886A65 in ./model
af::info:
ArrayFire v3.9.0 (CUDA, 64-bit Linux, build b59a1ae53)
Platform: CUDA Runtime 12.2, Driver: 535.129.03
[0] NVIDIA GeForce RTX 3060, 12011 MB, CUDA Compute 8.6