Very slow sampling. Use my new computer with AMD cpu

Hello PYMV team.recently i get a new computer with AMD R7-5800H and RTX-3060 .But when i ran the old code on the new computer, I found that the sampling was very slow(only use 10mins before,but now it need 10 hours) .Anyone seen this problem before?
The code follows below

with pm.Model() as model:
    ℓ1 = pm.Gamma('ℓ1', 4, 4)
    ℓ2 = pm.Gamma('ℓ2', 4, 4)
    ℓ3 = pm.Gamma('ℓ3', 4, 4)
    ℓ4 = pm.Gamma("ℓ4", alpha=2, beta=1)
    η1 = pm.HalfCauchy("η1", beta=1)
    η2 = pm.HalfCauchy("η2", beta=1)

    cov = η1 ** 2 * pm.gp.cov.Matern52(2, ls=[ℓ1,ℓ2],active_dims=[0,2])+η2 ** 2 * pm.gp.cov.Matern52(2, ls=[ℓ3,ℓ4],active_dims=[1,2])
    gp = pm.gp.Latent(cov_func=cov)

    f = gp.prior("f", X=x)

    σ = pm.HalfCauchy("σ", beta=5)
    ν = pm.Gamma("ν", alpha=2, beta=0.1)
    y_ = pm.StudentT("y", mu=f, lam=1.0 / σ, nu=ν, observed=y)
    #y_ = gp.marginal_likelihood("y", X=x, y=y, noise=σ)

    trace = pm.sample(1000, chains=1, cores=1, return_inferencedata=True)

Are you getting any BLAS warnings when you import PyMC?

Yes. i get this.


WARNING (theano.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain`
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions

Your installation is suboptimal. Did you try following the instructions here: GitHub - pymc-devs/pymc: Probabilistic Programming in Python: Bayesian Modeling and Probabilistic Machine Learning with Aesara?

1 Like

Oh, i install it by anaconda ,just following the Installation Guide . But maybe i don’t have a recent version of MinGW? I’ll try install it again.Thanks.