Set up OpenCL with intel graphics 4400 on arch linux? - gpu

I would like to enable OpenCL for GPU Computing on my laptop.
Its specs are the following:
OS: Manjaro ( Archlinux )
CPU / GPU: Core-i7 4600U / Intel Graphics 4400
I'm really new to this. What I did so far is to install all required dependencies as described here including:
intel-opencl
ocl-icd
clinfo
Executing clinfo returns the following output:
Number of platforms 1
Platform Name Intel(R) OpenCL
Platform Vendor Intel(R) Corporation
Platform Version OpenCL 1.2
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_spir
Platform Extensions function suffix INTEL
Platform Name Intel(R) OpenCL
Number of devices 2
Device Name Intel(R) HD Graphics
Device Vendor Intel(R) Corporation
Device Vendor ID 0x8086
Device Version OpenCL 1.2
Driver Version r5.0.63503
Device OpenCL C Version OpenCL C 1.2
Device Type GPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 20
Max clock frequency 1100MHz
Device Partition (core)
Max number of sub-devices 0
Supported partition types by <unknown> (0x563e00000000)
Supported affinity domains (n/a)
Max work item dimensions 3
Max work item sizes 256x256x256
Max work group size 256
Speicherzugriffsfehler (Speicherabzug geschrieben)
Please notice the last line. I'm on a german working station so the last line stating a memory access error. I don't know how to fix it. Any advices would be really nice. Thanks in advance :-)
EDIT:
The exactly error message in english is:
segmentation error
Maybe that helps for further solutions...

It usually means some inconsistency between various pieces of hardware/software on your box. You have one platform (which is normal) with two devices - the first device has GPU type, but the clinfo couldn't request info about second device, which is probably your CPU.
I think you should develop a number of simple C/C++ programs to mimic what the clinfo does. It'll be very educational - anyway it's a first step any OpenCL program begin from. Use Khronos online manual:
clGetPlatformIds - to get list of platforms
clGetPlatformInfo - to request info about a platform
clDeviceIds - to get list of devices for a particular platform
clGetDeviceInfo - to request info about a device
and so on...
Hopefully, it will help you.

Related

Programming xillinx cpld xc9536xl

Iam trying to program xillinx cpld xc9536xl and I'm using quartus prime lite edition latest version and I don't know which device to select while downloading quartus to help me applying code on xillinx cpld
The devices are :
Arria || device support
Cyclone
Cyclone 10
Max ||
Max 10
xc9536xl is a Xilinx part, not Intel/Altera.
Use the ISE 14.7 suite (free WebPACK edition) to program this part.
And it's likely you will need the Xilinx Platform Cable. ISE won't be using Intel USB Blaster, and I'm not familiar with open-source tools that could use Intel USB Blaster to program Xilinx parts.

clinfo is not detecting intel GPU

clinfo detects CPU and one other device but it does not detect intel GPU.
(py36) root#933ec02aa577:/home/user# clinfo -l
Platform #0: Intel(R) OpenCL
`-- Device #0: Genuine Intel(R) CPU $0000%#
Platform #1: Intel(R) FPGA Emulation Platform for OpenCL(TM)
`-- Device #0: Intel(R) FPGA Emulation Device
(py36) root#933ec02aa577:/home/user#
I have added user to video group, installed drivers mentioned here but still not able to detect Intel GPU https://dgpu-docs.intel.com/installation-guides/ubuntu/ubuntu-focal.html
what am I missing?
[Edit - Thank to Peter Cordes for pointing out, correcting my answer]
Able to resolve the this. Apparently root cause was incorrect drivers were installed. Reinstalling drivers fixed this issues.
As Peter Cordes, pointing out in comments. I verified that root user do not need to be added in video or render group. It is required if you are running as a non root user.

Does Connext DDS Pro support Nvidia Jetson TX2?

I'm using Nvidia Jetson TX2 with Ubuntu 16.04 aarch64 in my project. I need to subscribe data from other system using Connext DDS Pro v5.2 running on Windows x86 or x64.
But RTI Connext DDS Pro didn't supply official pre-built package for ubuntu with ARMv8, and from "RTI_Connext...PlatformNotes.pdf" manual, there is also no support for ARMv8.
Is it possible to support ARMv8 CPU through building from source?
TX2's CPU info as below:
nvidia#tegra-ubuntu:~$ lscpu
Architecture: aarch64
Byte Order: Little Endian
CPU(s): 6
On-line CPU(s) list: 0,3-5
Off-line CPU(s) list: 1,2
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Model name: ARMv8 Processor rev 3 (v8l)
CPU max MHz: 2035.2000
CPU min MHz: 345.6000
L1d cache: 32K
L1i cache: 48K
L2 cache: 2048K
gcc info:
nvidia#tegra-ubuntu:~$ gcc --version
gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
RTI has a pre-built library for 64 bit ARMv8 with Ubuntu 16.04 (gcc 5.4.0) for the latest Connext DDS Pro version 5.3. This library was tested on NVIDIA Drive PX 2. Though it has not been tested specifically on NVIDIA Jetson TX2, from the spec you listed above it should also work on TX2.
You could contact sales#rti.com for access to this library.

OpenCL detection bug

I'm new to Adobe Premiere and GPU acceleration. I started to follow simple tutorial on editing video with Premiere Pro CC that I had "Stopped Working" error after seconds when I hovered on my video or dragged it. Found that problem is because of OpenCL. So I put my settings to "Software Only" to have just CPU rendering.
My hardware and software:
HP ProBook 450 G1
Microsoft Windows 8.1 X64
AMD Radeon 8600/8700M
14.12 AMD Catalyst Omega Software
Intel HD 4600
AMD APP SDK 2.9
Microsoft Visual Studio Ultimate 2013
(For web developing. I'm not a CPP programmer.)
Adobe Premiere Pro CC
I used GPU-Z to have details about my AMD GPU and I saw that OpenCL is disabled and other one (Intel) is enabled.
Image
So I used /program files/adobe/adobe premiere pro cc/gpusniffer.exe and this is the output:
Found 2 devices supporting GPU computation.
OpenCL Device 0 -
Name: Intel(R) HD Graphics 4600
Vendor: Intel
Capability: 1.2
Driver: 1.2
Total Video Memory: 1348MB
* Not enabled by default because it did not match the named list of cards.
OpenCL Device 1 -
Name: Oland
Vendor: AMD
Capability: 2
Driver: 1.2
Total Video Memory: 2048MB
I read all the docs of APP SDK but I didn't find anything except this one:
Output of /windows/system32/clinfo.exe
Compiler available: Yes
Execution capabilities:
Execute OpenCL kernels: Yes
Execute native function: No
Queue properties:
Out-of-Order: No
Profiling : Yes
Platform ID: 00007FFBA45D6B60
Name: Oland
Vendor: Advanced Micro Devices, Inc.
Device OpenCL C version: OpenCL C 1.2
Driver version: 1642.5 (VM)
Profile: FULL_PROFILE
Version: OpenCL 1.2 AMD-APP (1642.5)
What should I do in order to enable OpenCL in GPU-Z for my AMD Radeon GPU?
Thanks.
After two weeks Googling for my problem I found my answer in playing with regedit.
To have fun with OpenCL on Windows 8.1 and AMD Radeon we must do these:
Only use AMD Catalyst Control Center downloaded from AMD official website. (For me, installer downloaded from HP Support Center didn't work. I think because it didn't contains some packages.)
Download and install AMD APP SDK from AMD Developers official website.
Go to C:\Program Files (x86)\AMD APP SDK\2.9\bin. (It will be different based on your version.)
Copy and replace files from x86 folder (OpenCL.dll and amdocl.dll) to C:\Windows\SysWOW64.
Copy and replace files from x86_64 folder (OpenCL.dll and amdocl64.dll) to C:\Windows\System32.
Note: OpenCL.dll files are different with each other. Pay attention.
Open Start and type regedit in search or RUN.
Go to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors\.
Add amdocl64.dll as DWORD (32-bit) Value. (Do not edit it after creation!)
Navigate to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Khronos\OpenCL\Vendors\.
Add amdocl.dll as DWORD (32-bit) Value.
Restart windows (Because of Catalyst) and start Catalyst.
In Premiere go to File -> Project Settings -> General -> Video Rendering and Playback and set Renderer to Mercury Playback Engine GPU Acceleration (OpenCL).
Note: In Registry Editor, 0 means true (enabled) and 1 means false (disabled) for OpenCL.
Note: regedit must run as administrator.
Done! Adobe Premiere Pro CC works fast and fine. Note: GPU-Z will not show OpenCL enabled. I think because its old version.
Image

Using OpenCL in linux and IDEs

For using OpenCL in linux should I have NVIDIA GPU?
In my computer I have an Intel GPU and i3 Intel CPU supported SSE3 and SSE4, I want program whith OpenCL in windows can I use an other IDE than "Visual Studio" for example "Code Blocks"?
Thank you
You can use OpenCL with any GPU, as it can run on a CPU as well (that's one of the strong points of OpenCL vs CUDA and the like).
But if you want OpenCL to actually use your GPU and not (or not only) your CPU, you will have to have a driver for your GPU which supports OpenCL, e.g. AMD or NVIDIA. Intel also lists Intel HD and Intel Iris graphic chips as supported through their OpenCL SDK, but you should probably check what you're actually running on if you want to make sure (e.g. check at the start of your program - see Appendix A).
Also, OpenCL has NOTHING to do with CPU extensions like SSE (specific implementations may use SSE/AVX/whatever CPU extension for better performance, but OpenCL does not require any of those per se), or with the IDE you use, and only very little with operating system. So you're free to use whichever IDE you want to (at the end, the IDE is only the editor you write your code with). In the case of Visual Studio people often tend to mix IDE with compiler, as Visual Studio uses it's own compiler per default, but afaik even there you're free to change it to e.g. the mingw or cygwin provided compiler, or use the icc. (Feel free to correct me on the Visual Studio part as I've only tested it once before completely wiping it forever)
Appendix A: How to check which devices can be used by OpenCL on a given system http://dhruba.name/2012/08/14/opencl-cookbook-listing-all-devices-and-their-critical-attributes/