Tensor dot product using batched_dot giving error

I am using pytensor batched_dot scan to multiply a tensor of shape (X,Y,Z) with matrix of shape (Y,Z). I want the final product to have shape (X,Y). I planned to use batched_dot but got the below error

.pytensor/compiledir_Linux-5.10-amzn2.x86_64-x86_64-with-glibc2.17-x86_64-3.8.11-64/tmpgwfgby2j/mbac13d27c3e2bdce3d5bc031b91c621a29f7883f3597e67f0dd72245e2913160.so: undefined symbol: dgemm_

When I run python -c “import pytensor; print(pytensor.config)”, I get
WARNING (pytensor.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
I am using the below versions

Is there a way to get the above multiplication without using batched_dot? or is there a way to solve the above pytensor error?

Setting os.environ[“PYTENSOR_FLAGS”]="blas__ldflags= -L/opt/omniai/work/instance1/jupyter/ssm-env/lib -lblas " helped

1 Like