Intel® Optimized AI Frameworks
Receive community support for questions related to PyTorch* and TensorFlow* frameworks.
73 Discussions

Intel Core i7 (10th gen) trains Tensorflow models faster than Intel Iris Plus Graphics GPU

JacobHornbeck
Beginner
2,261 Views

I'm not totally sure that this question is supposed to be under this section, but that was the closest one I could find to it...

Intro

Recently I was able to get my GPU (Intel Iris Plus Graphics) to work with "accelerating" Tensorflow. It took many hours of research and following tutorials (most of which didn't help). But now that I finally got it working, it's training my models much slower than normally on my CPU... the GPU estimated time was saying 1-2 hours per epoch (my model is big, when running this in Google Colab with GPU, it is about 6 minutes per epoch), while the estimated time on CPU is around 40 minutes per epoch.

I really only have two main questions...

  1. Why?
  2. Is there anything I can do about it?

Why?

What might be causing my GPU to train my models slower than my CPU?
Does Tensorflow use both CPU and GPU?

  • If so, is there something I need to do to tell it to use both? Or is my GPU just not very good?
  • If not, is there a way to tell it to? Or is there some sort of other configuration I need to do to get my GPU running in a way that will be optimized for Tensorflow model training?

Is there anything I can do about it?

0 Kudos
1 Solution
JyothisV_Intel
Moderator
2,221 Views

Hi,

 

Good day to you.

 

Thanks for posting in Intel Communities.

 

>> What might be causing my GPU to train my models slower than my CPU?

Intel Iris Plus Graphics is an integrated GPU (iGPU) built into your Intel processor. It is not designed to train heavy TensorFlow models. Also, TensorFlow uses the CUDA backend for GPU processing. It does not support Intel GPUs as of now.

 

>> Does Tensorflow use both CPU and GPU? If not, is there a way to tell it to? Or is there some sort of other configuration I need to do to get my GPU running in a way that will be optimized for Tensorflow model training?

The current version of TensorFlow does not work with Intel GPUs. Thus, Intel Iris Plus Graphics is not supported.

 

>> Is there anything I can do about it?

As of now, you can further optimize the TensorFlow training performance on CPU by installing the Intel Distribution for Python and Intel optimized version of TensorFlow from the below links:

https://software.intel.com/content/www/us/en/develop/articles/oneapi-standalone-components.html#python

https://www.intel.com/content/www/us/en/developer/articles/guide/optimization-for-tensorflow-installation-guide.html

 

Another solution to reduce training time is to consider training the model using Intel DevCloud for oneAPI. Intel DevCloud for oneAPI is a cloud cluster composed of CPUs and GPUs and is preinstalled with several Intel-optimized toolkits. Do note that Intel optimized TensorFlow on Intel DevCloud supports training only using CPUs. Thus you won't not be able to run your training workloads on Intel GPUs. You can visit the below link to know more and get started:

https://devcloud.intel.com/oneapi/get_started/

 

If this resolves your issue, make sure to accept this as a solution. This would help others with a similar issue.

 

Regards,

Jyothis V James

 

View solution in original post

2 Replies
JyothisV_Intel
Moderator
2,222 Views

Hi,

 

Good day to you.

 

Thanks for posting in Intel Communities.

 

>> What might be causing my GPU to train my models slower than my CPU?

Intel Iris Plus Graphics is an integrated GPU (iGPU) built into your Intel processor. It is not designed to train heavy TensorFlow models. Also, TensorFlow uses the CUDA backend for GPU processing. It does not support Intel GPUs as of now.

 

>> Does Tensorflow use both CPU and GPU? If not, is there a way to tell it to? Or is there some sort of other configuration I need to do to get my GPU running in a way that will be optimized for Tensorflow model training?

The current version of TensorFlow does not work with Intel GPUs. Thus, Intel Iris Plus Graphics is not supported.

 

>> Is there anything I can do about it?

As of now, you can further optimize the TensorFlow training performance on CPU by installing the Intel Distribution for Python and Intel optimized version of TensorFlow from the below links:

https://software.intel.com/content/www/us/en/develop/articles/oneapi-standalone-components.html#python

https://www.intel.com/content/www/us/en/developer/articles/guide/optimization-for-tensorflow-installation-guide.html

 

Another solution to reduce training time is to consider training the model using Intel DevCloud for oneAPI. Intel DevCloud for oneAPI is a cloud cluster composed of CPUs and GPUs and is preinstalled with several Intel-optimized toolkits. Do note that Intel optimized TensorFlow on Intel DevCloud supports training only using CPUs. Thus you won't not be able to run your training workloads on Intel GPUs. You can visit the below link to know more and get started:

https://devcloud.intel.com/oneapi/get_started/

 

If this resolves your issue, make sure to accept this as a solution. This would help others with a similar issue.

 

Regards,

Jyothis V James

 

JyothisV_Intel
Moderator
2,213 Views

Hi,


Glad to know that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks and Regards,

Jyothis V James


0 Kudos
Reply