There was an error while loading. Please reload this page.
1 parent 3fd4e6d commit 2d88df4Copy full SHA for 2d88df4
1 file changed
pymc/model/transform/optimization.py
@@ -418,8 +418,9 @@ def model_to_float32(model: Model) -> Model:
418
variables are unaffected. Explicit `.astype("float64")` casts are redirected
419
to float32.
420
421
- This can substantially speed up sampling on CPUs (via SIMD vectorization and
422
- halved memory traffic) and especially on GPUs, at the cost of precision.
+ This can speed up sampling at the cost of precision — most on GPUs and for
+ compute-bound models; on CPU backends gains depend on how memory- and
423
+ BLAS-bound the model's logp is.
424
425
Compile and sample under ``floatX="float32"``, otherwise constants introduced
426
when building logp graphs will upcast intermediate computations back to float64:
0 commit comments