Esri / deep-learning-frameworks

Installation support for Deep Learning Frameworks for the ArcGIS System
438 stars 107 forks source link

Tensorflow 2.13 does not support GPU on Windows #97

Open KDeser opened 4 days ago

KDeser commented 4 days ago

Doe ESRI have a recommended solution to run existing code that utilizes Keras + TF to run custom-developed GPU models? Will downgrading TF break any of the ESRI packages?

TF 2.13 is included in the Deep Learning Framework for Pro 3.3

cleebp commented 4 days ago

Hi we have a note on the readme here about this, unfortunately with the package updates for Pro 3.3 upgrading to python 3.11 and moving to cudatoolkit 11.8.0 our older GPU builds of tensorflow are no longer compatible with the deep learning environment and we had to upgrade to the CPU-only builds of TensorFlow 2.13. This is due to upstream tensorflow dropping support for native windows GPU support in tensorflow 2.10.

I don't think you will be able to downgrade tensorflow to a windows compatible gpu version and still stay on python 3.11 without breaking the conda environment. We recommend migrating any tf dependent code to pytorch if possible, if this is not an option staying on Pro 3.2 + deep learning has the last supported tensorflow windows gpu builds.

KDeser commented 4 days ago

Thanks. I was thinking that is probably the case.

Currently I'm not using any of ESRI's own DL packages or extensions, but can I assume that all of those fully support GPU acceleration at this point, or in other words, that they're using PyTorch under the hood?

scw commented 4 days ago

The vast majority of the models are PyTorch based, but also some using a variety of other GPU based packages such as mmcv and OpenCV. The limited places that interact with TensorFlow will still work, just be slower as they are constrained to CPU only execution. If you were in a context where you wanted the latest Pro but also wanted a GPU backed TensorFlow, it would be possible with separate environments, you could create an independent conda environment for hosting the old TensorFlow and older Python and have that operate independently, using subprocess to knit the two together if you needed execution from Pro, but that approach is somewhat brittle to maintain.