# Can latest version of Tensorflow be built to work on nodes with GPUs and nodes without them?

**URL:** <https://ask.cyberinfrastructure.org/t/can-latest-version-of-tensorflow-be-built-to-work-on-nodes-with-gpus-and-nodes-without-them/553>\
**Category:** Q&A\
**Tags:** parallelization, gpu, tensorflow, qow, researcher\
**Created:** [November 1, 2018, 1:33pm UTC](https://ask.cyberinfrastructure.org/t/can-latest-version-of-tensorflow-be-built-to-work-on-nodes-with-gpus-and-nodes-without-them/553 "2018-11-01T13:33:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ktrn](https://ask.cyberinfrastructure.org/user_avatar/ask.cyberinfrastructure.org/ktrn/32/554_2.png) [@ktrn](https://ask.cyberinfrastructure.org/u/ktrn)\
**Post date:** [November 1, 2018, 1:33pm UTC](https://ask.cyberinfrastructure.org/t/can-latest-version-of-tensorflow-be-built-to-work-on-nodes-with-gpus-and-nodes-without-them/553/1 "2018-11-01T13:33:45Z")

</div>

The earliest versions of Tensorflow could be built to support the nodes with or without GPUs, but starting from version r1.2 we have to build 2 separate versions of the tensorflow. Is there something we are missing. Is it still possible to build Tensorflow in such a way that would work in both environments - with and without GPUs (without creating 2 separate sets of binary files)?

---

<div class="post-metadata">

**Author:** ![shelly](https://ask.cyberinfrastructure.org/user_avatar/ask.cyberinfrastructure.org/shelly/32/182_2.png) [@shelly](https://ask.cyberinfrastructure.org/u/shelly)\
**Post date:** [March 3, 2020, 2:02pm UTC](https://ask.cyberinfrastructure.org/t/can-latest-version-of-tensorflow-be-built-to-work-on-nodes-with-gpus-and-nodes-without-them/553/3 "2020-03-03T14:02:45Z")

</div>

Please see:  
[https://www.tensorflow.org/install/pip?lang=python3](https://www.tensorflow.org/install/pip?lang=python3)

```auto
`tensorflow` —Latest stable release with CPU and [GPU support]
(https://www.tensorflow.org/install/gpu) *(Ubuntu and Windows)**

```

Tensorflow 2 is capable of working on both GPUs and CPUs with the same pip install (without 2 sets of binary files) as far as I am aware and from what I can tell with a VERY basic test.

---

<div class="post-metadata">

**Author:** ![sajid](https://ask.cyberinfrastructure.org/user_avatar/ask.cyberinfrastructure.org/sajid/32/351_2.png) [@sajid](https://ask.cyberinfrastructure.org/u/sajid)\
**Post date:** [March 3, 2020, 12:16am UTC](https://ask.cyberinfrastructure.org/t/can-latest-version-of-tensorflow-be-built-to-work-on-nodes-with-gpus-and-nodes-without-them/553/2 "2020-03-03T00:16:58Z")

</div>

You can compile TensorFlow for GPU support but configure it to run on CPU at runtime as explained in this thread (for both 1.x and 2.x releases) : [https://github.com/tensorflow/tensorflow/issues/31135](https://github.com/tensorflow/tensorflow/issues/31135).

If I may ask, is there a reason for doing this ?

[Next page](https://ask.cyberinfrastructure.org/t/can-latest-version-of-tensorflow-be-built-to-work-on-nodes-with-gpus-and-nodes-without-them/553.md?page=2)
