Im new in Python and Theano library. I want to install Theano on windows 7-64. I have a display adapters :
Intel(R) HD Graphics 3000 which is not compatible with NVIDA.
My QUESTIONS:
1-Is obligatory to install CUDA to i can use Theano?
2- Even if i have an Ubuntu opearting system, with the same display adapters, CUDA still mandatory?
Any help!
Thanks
You do not need CUDA to run Theano.
Theano can run on either CPU or GPU. If you want to run on GPU you must (currently) use CUDA which means you must be using a NVIDIA display adapter. Without CUDA/NVIDIA you must run on CPU.
There is no disadvantage to running on CPU other than speed -- Theano can be much faster on GPU but everything that runs on a GPU will also run on a CPU as long as it has been coded generically (the default and standard method for Theano code).
Related
I am running a Python program that uses Torch. I'm using the Torch nightly build (which supports MPS/M1) and putting my tensors on mps, indicating that the M1 processor is being used as a GPU. However, Activity Monitor lists the "Kind" of my Python process as "Intel" rather than "Apple" (see image).
I am assuming this slows down my program. Any clue why this is happening, and how I can make sure Python runs as "Apple" rather than "Intel?
I confirmed that the GPU is being used (via Activity Monitor), and that my tensors are on MPS (rather than CPU or CUDA). I expected the program kind to be "Apple", but it is "Intel" instead.
Try running the Python program with the arch argument if you want it to run on the M1 CPU rather than the Intel processor:
python -m arch -arch arm64 my_program.py
The Intel CPU will be used if software needs functionality that the M1 processor does not provide. The maximum size of integers that the Python interpreter can handle may be checked using the sys.maxsize property to see if the M1 processor is in use. The Python interpreter is operating on a 32-bit architecture, which may not be optimal for the M1 CPU, if the value is less than 2^63-1. You might try utilizing a 64-bit Python interpreter in this situation.
I'm trying to compare Windows x64 and Ubuntu aarch64 of our code, that uses PyTorch C++ 1.5.1.
When most of the process in our code is running from same speed to twice faster on Ubuntu than on Windows, all calls to PyTorch are running 3 times slower.
I try to find any information on PyTorch for arm64, if it has been as optimized as on x64? As there is no MKL, pytorch goes with eigen and openblas. Is it a reason for this slowdown?
Thank you,
Gérald
I am trying to install using the instructions here
I have a compatible nVIDIA GEFORCE 920M GPU and the CRUD DNN toolkit and the driver both installed on the System.
when I do the step on the python program to test tensorflow installation on GPU:
import tensorflow as tf
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
The output I get is:
>>> sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
2017-05-28 09:38:01.349304: W c:\tf_jenkins\home\workspace\release-
win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45]
The TensorFlow library wasn't compiled to use SSE instructions, but these
are available on your machine and could speed up CPU computations.
2017-05-28 09:38:01.349459: W c:\tf_jenkins\home\workspace\release-
win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45]
The TensorFlow library wasn't compiled to use SSE2 instructions, but these
are available on your machine and could speed up CPU computations.
2017-05-28 09:38:01.349583: W c:\tf_jenkins\home\workspace\release-
win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45]
The TensorFlow library wasn't compiled to use SSE3 instructions, but these
are available on your machine and could speed up CPU computations.
2017-05-28 09:38:01.349705: W c:\tf_jenkins\home\workspace\release-
win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45]
The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these
are available on your machine and could speed up CPU computations.
2017-05-28 09:38:01.354312: I c:\tf_jenkins\home\workspace\release-
win\device\cpu\os\windows\tensorflow\core\common_runtime\direct_session.cc:257] Device mapping:
My pin pointed questions to you are:
Why is the nVIDIA GPU not getting detected when all librariries and toolkits are installed without errors?
Why is it the output saying "TensorFlow library wasn't compiled to use SSE4.1 instructions, but these
are available on your machine and could speed up CPU computations" and how do i rectify this?
Please give a step by step solution. None other.
Thanks in advance for your answers.
Okay my pinpointed answers:
Why is the nVIDIA GPU not getting detected when all librariries and toolkits are installed without errors?
Ans: Go to NVidia GEFORCE Application and update the driver then the libraries will start getting detected and the errors will go away.
Why is it the output saying "TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations" and how do i rectify this?
Ans: Once you have done the above update the TensorFlow Library will stop giving the SSE errors. This will resolve your issue.
Please give a step by step solution. None other.
Ans: Given above should work it has worked for me.
I am training a model in Theano 0.9 and Lasagne 0.1 and want to run it on GPU. I've set THEANO_FLAGS as follows:
THEANO_FLAGS=device=gpu0,force_device=True,floatX=float64
Theano prints it is using GPU
Using gpu device 0: GeForce GTX 980 Ti (CNMeM is disabled, cuDNN 4007)
However, I noticed it's not, profiling shows that it's using CorrMM operation which is according to the docs
CorrMM This is a CPU-only 2d correlation implementation taken from caffe’s cpp implementation and also used by Torch.
I have CUDA Toolkit 7.5 installed, Tensorflow works perfectly on GPU.
For some reason Theano is falling back to CPU, it is supposed to cause an error due to force_device flag but it's not.
I am not sure where the problem is as I'm new to Theano, I appreciate your help.
Issue is floatX=float64.
Use floatX=float32. GPU supports 32 bit only yet.
My OpenCV CUDA program runs fine using a single NVidia 580GTX, but when using another, it gives the following error:
OpenCV Error: Gpu API call (invalid device ordinal) in mallocPitch
I know I need TBB to assign a GPU its job, but even though I installed OpenCV with TBB support (followed the willowgarage website), it says TBB support is required (CMake key 'WITH_TBB' must be true). Any help would really be appreciated since I need this to complete my computer science Master's project.
Thanks!
Ok its solved. turns out it was build 7232 that was the problem, since it works with the latest opencv build(7292) with no problems. Thanks all for the support