Intel SGX development on older generation of Intel processor - c++

Is it possible to do Intel SGX development on the older generation of Intel processor that does not have SGX support with some simulation environment?
I tried to install SGX SDK which installed correctly but could not able to install SGX PSW as supporting Intel SGX processor is a hard requirement for it.
https://software.intel.com/en-us/documentation/sgx-sdk-installation/platform-software-installation
I wanted to develop and learn simple SGX application.

You may try OpenSGX and QEMU.
OpenSGX is an experimental software that emulates Intel SGX hardware components at the
instruction level and provides new system software components
necessarily required for full TEE exploration. You may check some recent papers from 2016 and 2017.
QEMU SGX is an experimental QEMU version that supports SGX. You may check some slides from 2014.
You may also use the SGX SDK in Simulation mode - try the sample enclaves from the SDK directory, you don't need the SGX PSW to run them.
Apparently, Intel has an emulator (mentioned in 2015 by Microsoft) but it is not available to the public. In addition, because that emulator was not performant, Microsoft decided to create their own emulator/windows driver (that is not available neither) to implement their Haven project.

Related

Setting up openCL SDKs

I have a task on uni starts with setting the visual studio environment to :
OpenCL SDKs:
AMD – AMD APP (Accelerated Parallel Processing)
NVIDIA – CUDA (Compute Unified Device Architecture)
Intel – Intel SDK for OpenCL Applications
OpenCL uses an “Installable Client Driver” (ICD), model
To allow platforms from different vendors to co-exist
Applications can choose a platform at runtime
And I don't know how to do it ..
i need halp and thanks
I checked by running Regedit for the settings but I only found the default
In order to make OpenCL available for pre-compiled programs you simply need to install the Nvidia, AMD or Intel GPU drivers, depending on which GPU you have (not that older Intel integrated GPUs don't support OpenCL).
For CPU OpenCL support you can install the Intel runtime (Intel only) or POCL (open source, all modern CPUs supported, but you need to compile it from source). Unfortunately AMD does not provide APP SDK with CPU support anymore (although a simple web search will still get you the executables).
All of the above automatically register the respective ICD, so you don't have to do anything special about it.
For developing OpenCL applications you need a standalone OpenCL ICD loader (.lib/.a and .dll) and the OpenCL headers (.h), which you can get from those links, though you need to compile the former. These are also provided in ready to use, binary form in OpenCL SDKs such as the ones provided by Intel (which includes Intel's OpenCL CPU runtime) or AMD.

Offload support for Intel® Graphics Technology has been removed in Intel C++ Compiler 19.0 beta

Documentation for Intel® C++ Compiler 19.0 Beta for Windows (and Linux) claims: Offload support for Intel® Graphics Technology has been removed.
Can someone verify that it applies to OpenMP offload directives for Intel integrated GPUs (Intel® Graphics Technology)?
Intel(R) C++ Compiler 19.0 Release Notes clarifies the removal of Offload support for Intel(R) Graphics Technology: https://software.intel.com/en-us/articles/intel-c-compiler-190-for-linux-release-notes-for-intel-parallel-studio-xe-2019#support_removed
By using the Intel® SDK for OpenCL Application, you could achieve the same goal but it will demand a rewrite to some of your code to be offloaded. See this link (https://software.intel.com/en-us/intel-opencl/download) for the free download and how to get started.
You can use Intel(R) TBB Flow Graph which supports opencl_node when it comes to heterogeneous programming for Intel(R) Processor Graphics. More information on this available at https://software.intel.com/en-us/blogs/2015/12/09/opencl-node-overview
You can use OpenMP 4.5/5.0 TARGET feature to offload computation to Intel Integrated Graphics (at this time Gen 9 through Gen 11). Although you will need to download and install the Intel oneAPI Base Toolkit AND the Intel oneAPI HPC Toolkit.

GCN ISA assembly in OpenCL program for both Windows and Linux

I have a requirement to optimize an OpenCL program for AMD GPUs.
I would like to try rewriting some of the core OpenCL kernels in GCN ISA assembly, but I have to support both Windows and Linux.
I have found the ROCm Platform which looks like it can do the job for Linux, but does not support Windows.
Is there a tool chain I can use to accomplish this?
Yes, RGA (Radeon GPU Analyzer) is what you are looking for.
Version 1.4 of the product added support for OpenCL on top of AMD's LLVM-based Lightning Compiler, the OpenCL compiler for the ROCm platform.
Version 2.0 added a graphical user interface.
RGA acts as an offline compiler, so your machine doesn't have to be ROCm-capable.
Check out the RGA Releases page for more info and download links.

Where can I find openCL sdk for graphic card HD4400

I looked at intel web site and it sems that they replaced opencl aapplication development SDK with a new software that only support new HD graphic cards (5th generation).
My laptop has HD4400, where can I find Intel SDK for it?
I know that I can use any SDK, but I believe Intel one is pretty good for Opencl, as NVIDA is trying to force everybody to use CUDA which I am not interested to do.
I am developing on windows using visual studio 2013 and I like the Intel integrated tools for VS for opencl development.
You can use Starter Edition of OpenCL Code Builder from Intel, which should include the SDK. To be able to run you programs on the iGPU, you need to install the driver/runtime from https://software.intel.com/en-us/articles/opencl-drivers.

OpenCL development on Intel CPU/GPU under Linux

I have an intel i7 haswell cpu, and I would like to start exploring OpenCL development. In particular, I am interested to run OpenCL code on the integrated GPU.
Unfortunately, by now, I was not able to find any SDK on Intel's site..
May you provide some links, together with a summary of the current status of OpenCL tools for the Linux platform and Intel hardware?
I think this would be useful to many other people..
Thanks a lot!
Intel does not provide free support for OpenCL on their iGPUs under Linux - you have to buy the Intel Media Server Studio, minimum $499. On Windows, you can download a free driver to get OpenCL capability for the iGPU: https://software.intel.com/en-us/articles/opencl-drivers#philinux.
Note that you can use any OpenCL SDK you want - it doesn't have to be Intel. The SDK is only useful for building your program. For running an OpenCL program, you need an appropriate runtime (driver) from the manufacturer. The AMD SDK will give you access to the CPU as an OpenCL device, but not the iGPU.
There is Open Source OpenCL implementation for Intel GPUs on Linux called Beignet, maintained by bunch of guys from Intel.
Sadly, couldn't personally try and check if Your's GPU is properly supported, but on their wiki they states:
Supported Targets
4th Generation Intel Core Processors "Haswell", need kernel patch currently, see the "Known Issues" section.
Beignet: self-test failed" and almost all unit tests fail. Linux 3.15 and 3.16 (commits f0a346b to c9224fa) enable the register whitelist by default but miss some registers needed for Beignet.
This can be fixed by upgrading Linux, or by disabling the whitelist:
# echo 0 > /sys/module/i915/parameters/enable_cmd_parser
On Haswell hardware, Beignet 1.0.1 to 1.0.3 also required the above workaround on later Linux versions, but this should not be required in current (after 83f8739) git master.
So, it's worth a shoot. Btw, it worked well on my 3rd generation HD4000.
Also, toolchain and driver in question includes bunch of GPU-support test cases.
For anyone who comes across this question as I did, the existing answers have some out-of-date information; Intel now offers free drivers for Linux on the site posted above: https://software.intel.com/en-us/articles/opencl-drivers#philinux
The drivers themselves are only supported on 5th, 6th and 7th gen Core processors (and a bunch of other Celerons and Xeons, see link), with earlier processors such as 4th gen still needing the Media Server Studio.
However, they now offer a Linux Community version of Media Server Studio which is free to download.
They also have a Driver Support Matrix for Intel Media SDK and OpenCL which has some useful information about compatibility: https://software.intel.com/en-us/articles/driver-support-matrix-for-media-sdk-and-opencl
You may check intel open source Beignet OpenCL library: http://arrayfire.com/opencl-on-intel-hd-iris-graphics-on-linux/
For me (ubuntu 15.10 + Intel i5 4th generation GPU) it works quite well.
P.S.
Also I must say that I managed to download "media server" for linux a couple of months ago (but didn't used it yet). So you may check it also.