Environment
- R version 4.5.3
- torch version: 0.16.3
-
- BLAS used: Intel MKL replacing default Rblas.dll/Rlapack.dll
Description
Replacing R's default Rblas.dll and Rlapack.dll with an optimized BLAS (Intel MKL) causes R session to abort when performing
basic torch operations. I run a R torch code twice, once with the by-default libraries and once with the MKL surrogates. Whenever I use the surrogates I get R session abortions when using simple operations like torch_exp on a scalar torch_tensor (a real scalar, not a NA or character or whatever). I cannot reproduce the error easily as when I just open an R session and run
library(torch)
x <- torch_tensor(1.0)
torch_exp(x)
it does work...
Notes
I'm not skilled at all in torch/blas implementation so I cannot explain what happens. I (very naively) asked to an AI, answer: "The likely cause is BLAS
symbol interposition: libtorch embeds its own BLAS internally but exports those symbols with default visibility, allowing the system
BLAS loaded by R to override them at runtime."
Environment
Description
Replacing R's default Rblas.dll and Rlapack.dll with an optimized BLAS (Intel MKL) causes R session to abort when performing
basic torch operations. I run a R torch code twice, once with the by-default libraries and once with the MKL surrogates. Whenever I use the surrogates I get R session abortions when using simple operations like torch_exp on a scalar torch_tensor (a real scalar, not a NA or character or whatever). I cannot reproduce the error easily as when I just open an R session and run
library(torch)
x <- torch_tensor(1.0)
torch_exp(x)
it does work...
Notes
I'm not skilled at all in torch/blas implementation so I cannot explain what happens. I (very naively) asked to an AI, answer: "The likely cause is BLAS
symbol interposition: libtorch embeds its own BLAS internally but exports those symbols with default visibility, allowing the system
BLAS loaded by R to override them at runtime."