# Different precision between gpu and cpu

**URL:** <https://discourse.pymc.io/t/different-precision-between-gpu-and-cpu/1185>\
**Category:** Questions\
**Tags:** gpu\
**Created:** [May 7, 2018, 2:51am UTC](https://discourse.pymc.io/t/different-precision-between-gpu-and-cpu/1185 "2018-05-07T02:51:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhomass](https://avatars.discourse-cdn.com/v4/letter/b/5f8ce5/32.png) [@bhomass](https://discourse.pymc.io/u/bhomass)\
**Post date:** [May 7, 2018, 2:51am UTC](https://discourse.pymc.io/t/different-precision-between-gpu-and-cpu/1185/1 "2018-05-07T02:51:18Z")

</div>

I have a model which crashes when running on gpu with -inf energy. printing the model.basicRVs shows  
GPU:  
lambdas -0.8162259  
beta0 -2.2579138  
beta1 -2.2579138  
theta -0.9031655  
gamma -2.7094965  
alpha -0.45158276  
lh -inf

CPU:  
lambdas -0.8162258188773639  
beta0 -2.257913526447274  
beta1 -2.257913526447274  
theta -0.9031654105789096  
gamma -2.7094962317367286  
alpha -0.4515827052894548  
lh -33042.4568470425

It appears CPU is using higher precision. How do I set higher gpu precision?

---

<div class="post-metadata">

**Author:** ![bhomass](https://avatars.discourse-cdn.com/v4/letter/b/5f8ce5/32.png) [@bhomass](https://discourse.pymc.io/u/bhomass)\
**Post date:** [May 7, 2018, 3:06am UTC](https://discourse.pymc.io/t/different-precision-between-gpu-and-cpu/1185/2 "2018-05-07T03:06:59Z")

</div>

I read that using float64 on gpu’s is not a good idea. I still like to know how I could set it.
