How do install pyopencl using INDE instead of OpenCL SDK? - gpu

I'm a python newbie and I'm trying to install pyopencl. I've found Andreas Klöckner's website. And I'm trying to use the Windows 7 64bit, Python 2.7, Visual Studio 2010, Intel OpenCL SDK 1.5 directions to install. The problem is that Intel OpenCL SDK has been integrated into INDE. So I'm wondering what the equivalent library file is for C:\Program Files (x86)\Intel\OpenCL SDK\1.5\include and C:\Program Files (x86)\Intel\OpenCL SDK\1.5\lib\x64 ? After installing INDE, I didn't see anything under that specific file location.
Under C:\Intel\INDE, if I just look for folders that contain libraries I saw the code_builder_5.0.0.43 (contains OpenCL), IDEintegration (contains a bunch of stuff), the media_raw_accelerator_1.0.3, media_sdk_6.0.0.308. Anyone know which one I should be using?

It's 'C:\Intel\INDE\code_builder_5.0.0.43\include' and 'C:\Intel\INDE\code_builder_5.0.0.43\lib\x64'

Let me add a few points that could be useful to others who want to use PyOpenCL on Windows. First, if you are not a Python developer, you will want to use the Intel OpenCL Code Builder. When you install the INDE Suite, you integrate in Visual Studio and you get all the syntax highlighting amongst others. This video gives a great overview: http://bcove.me/xrcs5bze
The latest OpenCL 2.0 (as of time of writing) is now part of OpenCL Code Builder. In order to access the OpenCL framework to use with PyOpenCL, do the following installation on Windows (if not yet done):
Detailed instructions can be found here: http://wiki.tiker.net/PyOpenCL/Installation/Windows
Install Visual Studio
Install Python 2.7
Install NumPy
Install PyOpenCL
Install Intel INDE (OpenCL Code Builder component)
Once this is done, locate the siteconf.py file and edit accordingly. On my machine, I have INDE Update 2 which comes with OpenCL Code Builder 5.1.0.25 installed.
Thus, the following lines are edited:
CL_INC_DIR = [r'C:\Intel\INDE\code_builder_5.1.0.25\include']
CL_LIB_DIR = [r'C:\Intel\INDE\code_builder_5.1.0.25\lib\x64', r'C:\Intel\INDE\code_builder_5.1.0.25\lib\x86']
I hope that helped.

Related

Does PyInstaller include CUDA

I am working on a Python script (I use Python 3.7.3) that uses tensorflow-gpu (1.14.0) and used PyInstaller 3.5 to convert this script to an executable. I am using CUDA 10.0 and cuDNN 7.6.1 and my graphics card is a NVIDIA GeForce GTX 960M. I recently deinstalled CUDA to test if the executable of the Python script still runs and surprisingly it still runs via GPU, which does not work when I now run the Python script directly.
My question is, can this executable be run on systems without the CUDA toolkit but with a CUDA-capable graphics card?
According to this documentation PyInstaller will make and store a private copy of all of the dependent external libraries which Python code relies on when building a single file executable.
Therefore it is safe to assume that your executable runs irrespective of the installation status of the CUDA toolkit because it has a full private copy of the necessary CUDA libraries internally which it uses when the executable is run.
According to the GitHub issues in the official repository (here and here for example) CUDA libraries are usually dynamically loaded at run-time and not at link-time, so they are typically not included in the final exe file (or folder) with the result that the exe file won't work on a machine without CUDA installed. The solution (please refer to the linked issues too) is to put the DLLs necessary to run the exe in its dist folder (if generated without the --onefile option) or install the CUDA runtime on the target machine.
The behaviour that you're experimenting maybe it's due to the specific version of TF, that loads the libraries in a different fashion with respect to what described above, but it's not the expected behaviour nowadays.

Latest CMake and LLVM on Windows 10

All
latest LLVM is 7.0 and it is working quite well on Windows 10 x64, building native executables etc.
latest CMake is 3.12.x.
I have VS 2017 Pro installed as well.
Downloaded them both and tried to make simple project with it on Windows, and it didn't work, even if I set CC/CXX, linker pointing to lld, failing on compiling test problem, not finding rc (resource compiler).
Tried targeting GNU make as well as Ninja as build system.
Is this a supported configuration? If yes, how to make it work?
Basically, I would like to use CMake/LLVM with editor/terminal like I'm doing it on Linux
Run CMake from Developer Command Prompt.
That should make rc available in your PATH, and then CMake should be able to find it.

ValueError: Symbol table not found

I'm trying to install scikit-learn; following the instructions, I downloaded the source and attempted to install it with python setup.py install, however the installation is interrupted at:
File "C:\Users\Alpine\Anaconda\lib\site-packages\numpy\distutils\mingw32ccompi
ler.py", line 278, in generate_def
raise ValueError("Symbol table not found")
ValueError: Symbol table not found
I've also tried using easy_install -U scikit-learn, although end up with the same error.
Using conda install scikit-learn appeared to install the conda-3.4.1-py27_0.tar.bz2 and numpy-1.8.1-py27_0.tar.bz2 packages, and for safe measure I ran conda update anaconda, although I'm still receiving the same error.
Would anybody know how to work around this?
This solution will take care of "symbol table not found" error from numpy (or any other package ) on windows machine
sklearn people have provided good solution for this over here
http://scikit-learn.org/stable/developers/advanced_installation.html#building-on-windows
you can find instruction for Linux and mac on same page
now just follow these steps
32-bit Python
For 32-bit python it is possible use the standalone installers for microsoft visual c++ express 2008 for Python 2 or Microsoft Visual C++ Express 2010 for Python 3.
Once installed you should be able to build scikit-learn without any particular configuration by running the following command in the scikit-learn folder:
python setup.py install
64-bit Python
For the 64-bit architecture, you either need the full Visual Studio or the free Windows SDKs that can be downloaded from the links below.
The Windows SDKs include the MSVC compilers both for 32 and 64-bit architectures. They come as a GRMSDKX_EN_DVD.iso file that can be mounted as a new drive with a setup.exe installer in it.
**For Python 2 you need SDK v7.0: MS Windows SDK for Windows 7 and .NET Framework 3.5 SP1 -> https://www.microsoft.com/en-us/download/details.aspx?id=18950
For Python 3 you need SDK v7.1: MS Windows SDK for Windows 7 and .NET Framework 4** -> (can't post link as i need atleast 10 reputation point )
Both SDKs can be installed in parallel on the same host. To use the Windows SDKs, you need to setup the environment of a cmd console launched with the following flags (at least for SDK v7.0):
cmd /E:ON /V:ON /K
Then configure the build environment with:
SET DISTUTILS_USE_SDK=1
SET MSSdk=1
"C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup\WindowsSdkVer.exe" -q -version:v7.0
"C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\SetEnv.cmd" /x64 /release
after typing above commands in cmd as soon as you hit enter the window will be changed lil bit ( font color changed to green ) now go to directory where you have downloaded sklearn zip file from git hub then un-zip it
and go to directory where you can find setup.py
run command
python setup.py install
if it's not recognizing python then you migh have missed this command
cmd /E:ON /V:ON /K
so till now if u have done everything correct then your package will be installed without any difficulties

Porting Qt5 app to Qt4

Yes the title is correct...we are going BACK to qt4. We recently built a decent size app with Qt5. We now been told that the app must support RH 6 and RH 5 distros.
Since RH6 ships with Qt 4.6.2 and Rh 5 ships with Qt 3.3.6, I'm concerned about having to make lots of modifications to port back to older versions of Qt.
Can the latest versionf of Qt 4.x and 3.x understand new syntax of Qt5 (eg: connect is slightly different)? If not, can someone suggest how best to undertake this? Are we looking at ifdef'ing our way out of this? (and if so, is there an easy reference for how to do this)
Consider building qt5 libraries and deploying them (only ones you actually use) together with your project. This link can help to build.
I actually built them today on my CentOS 6.5 64-bit with this configuration command:
./configure -prefix /opt/my_prod/Qt-5.2.1 -release -nomake examples -dbus -qt-xcb -no-c++11
However I did not built all libs listed on the link and did not apply patches.
Then I built a small test app and ran it on CentOS and then on Ubuntu 12.04 (to which Qt5 libs I copied manually).

Installing Curl IDE/RTE on AMD processors

Trying to move my development environment to Linux. And new to Curl. Can't get it to install the IDE & RTE packages on an AMD HP PC running Ubuntu x64. I tried to install the Debian package via the package installer and get "Error: Wrong architecture - i386". Tried using the --force-architecture switch but it errors out.
I'm assuming Curl IDE will just run under Intel processors? Anyone have any luck with this issue and can advise?
It's been a while since I ran linux, but try looking for the x64 version. There are also x64 to x86 compatibility libraries available that should make 32 bit programs work for most situations.
The ubuntu forums are a much better place for this question, however.