run opencl in microsoft vc using amd app or intel - visual-c++

In my computer with Windows 7 OS I have two versions of the OpenCL SDKS's from these vendors:
Intel
AMD.
I build my application using vs and add this path of lib for intel or amd.
the library and include file
C:\Program Files (x86)\Intel\OpenCL SDK\3.0\include
C:\Program Files (x86)\Intel\OpenCL SDK\3.0\lib
C:\Program Files (x86)\AMD APP\include
C:\Program Files (x86)\AMD APP\lib\x86
when use intel lib run gpu ok when use amd lib run gpu ok
the question what difference between them ????
can i install only intel sdk that enough to run opencl for cpu and gpu
my laptop have cpu : intel core i7 2.2GH gpu : amd radeon hd 6700M
the specification clinfo clinfo device cpu-gpu info
any help please

The SDK gets you the include files (e.g, cl.h) and library (OpenCL.lib, which loads OpenCL.dll at runtime). It does NOT select which devices your program can access. Therefore using either SDK should get you access to both devices, as well as any OpenCL GPU devices in your system.
Your program can then select from the available platforms and devices to select which one (or ones) it runs kernels on.

As per as AMD concern, AMD APP SDK compiler will be able to detect and run your OpenCL code even on Intel CPU, but vice-a-verse may not be true.
You can install only AMD SDK and use it for OpenCL Development.
Also Do check on which GPU is getting used by the kernel because even after having AMD GPU and only AMD SDK, It may run your code on CPU (This could happen due to priority).

Related

Android studio error running emulator screen shot provided

Keep getting this error and have tried pretty much everything I have found on this website and no luck.SS
It means that the hardware acceleration is either disabled or not available for your cpu.
Most intel chips and amd chips have this feature. All AMD Ryzen cpus have this feature. Check the website for your cpu if it is available.
Now if it is disabled then you can go to bios to enable it.
If you are on amd cpu then it won't work with windows os. Windows os can support only intel cpus for hardware acceleration using haxm or recently on Ryzen cpus with windows 10 latest april update and hyper-v enabled.
If you are using amd cpus before the ryzen series, you can switch to any linux distro which will be fine, at it has kvm for hardware acceleration.

Is it possible to get OpenCL on Windows Linux Subsystem?

I'v been trying for the past day to get Tensorflow built with OpenCL on the Linux Subsystem.
I followed this guide. But when typing clinfo it says
Number of platforms 0
Then typing /usr/local/computecpp/bin/computecpp_info gives me
OpenCL error -1001: Unable to retrieve number of platforms. Device Info:
Cannot find any devices on the system. Please refer to your OpenCL vendor documentation.
Note that OPENCL_VENDOR_PATH is not defined. Some vendors may require this environment variable to be set.
Am I doing anything wrong? Is it even possible to install OpenCL on Windows Linux Subsystem?
Note:
I'm using an AMD R9 390X from MSI, 64bit Windows Home Edition
With the launch of WSL2, CUDA programs are now supported in WSL (more information here), however there is still no support for OpenCL as of this writing: https://github.com/microsoft/WSL/issues/6951.
According to a Microsoft representative in this forum post, Windows Subsystem for Linux does not support OpenCL or CUDA GPU programs, and support is not currently planned. To experiment with TensorFlow/OpenCL it would probably be easiest to install Linux in a dual-boot configuration.
You could use the Intel OpenCL SDK for the CPU, https://software.intel.com/en-us/articles/opencl-drivers.

Intel HAXM is required to run this AVD Your CPU does not support VT-x

I know there are a lot of similar questions out there, and I am new to Android world. I get the following errors as I try to run app (Shift + F10)
Intel HAXM is required to run this AVD.
Your CPU does not support VT-x.
Unfortunately, your computer does not support hardware accelerated virtualization.
Here are some of your options:
User a physical device for testing
Develop on a windows/osx computer with an intel processor that supports VT-x and NX
Develop on a linux computer that supports VT-x or SVM
Use an Android Virtual Device Based on an ARM system image
(This is 10x slower that hardware accelerated virtualization)
When I do dxdiag on this computer(windows 10) I get the following. Its long but the system information is as below. I am not able to determine if my PC can be used to develop android application. Can someone please help me? Is virtualization required to develop android apps?
In here it is suggested that we have to enable VT-x in bios, but I dont see anything of that sort in my bios. Is there a way out of my predicament?
System Information
Time of this report: 12/29/2016, 15:24:38
Machine name: DESKTOP-DTQ75J3
Machine Id: {8D78413A-33B7-4359-BB61-8841CC747D2C}
Operating System: Windows 10 Enterprise 64-bit (10.0, Build 14393) (14393.rs1_release_inmarket.161208-2252)
Language: English (Regional Setting: English)
System Manufacturer: Gigabyte Technology Co., Ltd.
System Model: G41M-Combo
BIOS: Award Modular BIOS v6.00PG
Processor: Intel(R) Core(TM)2 Duo CPU E7400 # 2.80GHz (2 CPUs), ~2.8GHz
Memory: 4096MB RAM
Available OS Memory: 4060MB RAM
Page File: 4199MB used, 2548MB available
Windows Dir: C:\WINDOWS
DirectX Version: DirectX 12
DX Setup Parameters: Not found
User DPI Setting: Using System DPI
System DPI Setting: 96 DPI (100 percent)
DWM DPI Scaling: Disabled
Miracast: Not Available
Microsoft Graphics Hybrid: Not Supported
DxDiag Version: 10.00.14393.0000 64bit Unicode
Make an AVD With ARM Instead of HAXM -
Go to Tools -> Android -> AVD Manager
Click "Create Virtual Device"
Select which device you want to use from the list (i.e Nexus 5) and click "Next".
Here you're given a list of android release versions. Look at the ABI column. "Armeabi-v7a" ABI is what to look for, for whichever API Level you want.
Hit "Next" and modify name/size if you want, click "Finish" when done.
Courtesy: user2636417's answer to "Android Studio - How Can I Make an AVD With ARM Instead of HAXM?"
According to Android Documentation, to run an emulator the development system's CPU should support one of the following virtualization extensions technologies:
Intel Virtualization Technology (VT, VT-x, vmx)
AMD Virtualization (AMD-V, SVM) -- only supported for Linux
Your CPU is Intel(R) Core(TM)2 Duo CPU E7400, which according to the manufacturer may or may not support Intel Virtualization Technology (VT-x). For example, SLGW3 has VT-x, while the SLB9Y and SLGQ8 do not. Looks like your particular CPU doesn't have VT-x, hence the error.
The workaround is to use an alternative Android Emulator, e.g. Genymotion.

On which CPU processor is OpenCL kernel running

I want to determine exactly how AMD schedules its OpenCL kernels on the CPU and I could not find any OpenCL function to determine the physical processor/core id on which it is running.
I could only find the following links related to my problem:
Getting the machine serial number and CPU ID using C/C++ in Linux
How to know on which physical processor and on which physical core my code is running
NUMA Get Current Node/Core
I tried the above but none of the solutions worked. I saw that OpenCL kernels do not support C99 headers like stddef.h which is required for sched.h or even fopen().
Is there any way I can see exactly how the openCL kernels have been assigned to each CPU core/processor?
Note: I am using Ubuntu 14.04, gcc version 4.8.2 and AMD APP SDK 3.0.
Thanks for your help!

Getting started with OpenCL with intel HD graphics in WIndows 7

I found this link with drivers and runtimes.
And also as per this , OpenCL codebuilder is now part of INDE/Media server Studio and these are not free (Though they come with trial version)
So my ultimate question is how to get started with OpenCL with Intel HD Graphics?
There is a starter edition of the Intel INDE suite, which is free (and is not just a trial). This contains their core OpenCL SDK. The Media Server Studio may contain some additional tools to aid OpenCL development on Intel HD Graphics, but is certainly not required in order to develop or run OpenCL programs.
You don't actually need any OpenCL SDK to get started with OpenCL development. You need a driver/runtime in order to run OpenCL programs (these are freely available, as per your first link). To develop OpenCL programs you just need the headers and a library to link against, which are both also freely available (more info in this answer).
Which programming language would you like to use? In Java you can start with a simple Java SE application and integrate the JavaCL package. You do not need any further vendor specific drivers.

Resources