I have created some benchmark program to test some characteristics of OpenCL. This has run on several platforms: core i7-920/nvidia 1060 and a double Xeon-2660/Radeon 480. This all worked fine. When I run it on a surface 3 pro I get the following output:
Platform Intel(R) OpenCL contains 2 devices
Device does not support double precision, skipped: CLDevice [id: 3642688 name: Intel(R) HD Graphics 5000 type: GPU profile: FULL_PROFILE]
CLDevice [id: 3632160 name: Intel(R) Core(TM) i7-4650U CPU # 1.70GHz type: CPU profile: FULL_PROFILE]
Platform: plIntel, processor: ptIntel, double fp: true, AMD fp: false
Devices used:
CLDevice [id: 3632160 name: Intel(R) Core(TM) i7-4650U CPU # 1.70GHz type: CPU profile: FULL_PROFILE]
Running benchmark for 1 devices.
Benchmarking Intel(R) Core(TM) i7: 0 1 2 3 4 4409 ms
Queue pool, tasks per queue = 16: 0 Exception in thread "main" com.jogamp.opencl.CLException$CLBuildProgramFailureException:
CLDevice [id: 3642688 name: Intel(R) HD Graphics 5000 type: GPU profile: FULL_PROFILE] build log:
:2:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:3:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:4:34: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:22:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:23:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:24:34: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:42:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:43:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:44:34: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:63:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:64:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:65:34: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
error: front end compiler failed build. [error: CL_BUILD_PROGRAM_FAILURE]
at com.jogamp.opencl.CLException.newException(CLException.java:84)
As you can see both the graphics and the processor are recognized, but the graphics does not support double precision and is skipped by the software. The processor however should support double precision. But is does not compile. Is there something specific about the surface 3 pro that it does not run? It runs on Java and jocl.
Edit
The software builds a list of devices and only selects devices that possess the cl_khr_fp64 property. The CPU of the Surface 3 pro (an i7-4950U) does have this property. In the .CL code the first line is: #pragma OPENCL EXTENSION cl_khr_fp64 : enable.
Related
The QT basic application is getting crashed when i run on the emulator by giving the below error messages.
and also giving an error at "import QtQuick.VirtualKeyboard 2.4" as QML module not found.
Emulator is with API 28.
QT version name: Qt 5.12.4 for Android x86
Compiler: Android Clang (C, x86_64)
Request you to please help in resolving these errors.
I zygote : Not late-enabling -Xcheck:jni (already on)
W zygote : Unexpected CPU variant for X86 using defaults: x86
W System : ClassLoader referenced unknown path:
I zygote : Do partial code cache collection, code=28KB, data=20KB
I zygote : After code cache collection, code=28KB, data=20KB
I zygote : Increasing code cache capacity to 128KB
I QtCore : Start
W linker : "/data/app/org.qtproject.example.TestOneMore-diXhlrUpcg6WGCwBjHyxcA==/lib/x86/libQt5Gui.so" has unsupported flags DT_FLAGS_1=0x80
W linker : "/data/app/org.qtproject.example.TestOneMore-diXhlrUpcg6WGCwBjHyxcA==/lib/x86/libQt5Network.so" has unsupported flags DT_FLAGS_1=0x80
W linker : "/data/app/org.qtproject.example.TestOneMore-diXhlrUpcg6WGCwBjHyxcA==/lib/x86/libQt5Qml.so" has unsupported flags DT_FLAGS_1=0x80
W linker : "/data/app/org.qtproject.example.TestOneMore-diXhlrUpcg6WGCwBjHyxcA==/lib/x86/libQt5Quick.so" has unsupported flags DT_FLAGS_1=0x80
W linker : "/data/app/org.qtproject.example.TestOneMore-diXhlrUpcg6WGCwBjHyxcA==/lib/x86/libQt5QuickParticles.so" has unsupported flags DT_FLAGS_1=0x80
W linker : "/data/app/org.qtproject.example.TestOneMore-diXhlrUpcg6WGCwBjHyxcA==/lib/x86/libQt5QuickTemplates2.so" has unsupported flags DT_FLAGS_1=0x80
W linker : "/data/app/org.qtproject.example.TestOneMore-diXhlrUpcg6WGCwBjHyxcA==/lib/x86/libQt5QuickControls2.so" has unsupported flags DT_FLAGS_1=0x80
W linker : "/data/data/org.qtproject.example.TestOneMore/qt-reserved-files/plugins/platforms/android/libqtforandroid.so" has unsupported flags DT_FLAGS_1=0x80
I Qt : qt started
W linker : "/data/data/org.qtproject.example.TestOneMore/qt-reserved-files/plugins/bearer/libqandroidbearer.so" has unsupported flags DT_FLAGS_1=0x80
I Qt JAVA : Can't find '/data/data/org.qtproject.example.TestOneMore/qt-reserved-files/lib/libQt5QuickParticles.so'
I zygote : Do partial code cache collection, code=60KB, data=50KB
I zygote : After code cache collection, code=59KB, data=49KB
I zygote : Increasing code cache capacity to 256KB
I zygote : Do full code cache collection, code=121KB, data=85KB
I zygote : After code cache collection, code=107KB, data=65KB
**E linker : normalize_path - invalid input: "C", the input path should be absolute**
W linker : Warning: unable to normalize "C"
**E linker : normalize_path - invalid input: "C", the input path should be absolute**
W linker : Warning: unable to normalize "C"
D OpenGLRenderer: HWUI GL Pipeline
D : HostConnection::get() New Host Connection established 0xa05d4600, tid 9158
I OpenGLRenderer: Initialized EGL, version 1.4
D OpenGLRenderer: Swap behavior 1
W OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D OpenGLRenderer: Swap behavior 0
D EGL_emulation: eglCreateContext: 0x9e1060a0: maj 3 min 1 rcv 4
D EGL_emulation: eglMakeCurrent: 0x9e1060a0: ver 3 1 (tinfo 0x9dc94880)
**E eglCodecCommon: glUtilsParamSize: unknow param 0x000082da
E eglCodecCommon: glUtilsParamSize: unknow param 0x000082da**
I zygote : Do partial code cache collection, code=112KB, data=100KB
I zygote : After code cache collection, code=112KB, data=100KB
I zygote : Increasing code cache capacity to 512KB
I zygote : JIT allocated 71KB for compiled code of void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int)
I zygote : Compiler allocated 4MB to compile void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int)
D EGL_emulation: eglMakeCurrent: 0x9e1060a0: ver 3 1 (tinfo 0x9dc94880)
W linker : "/data/data/org.qtproject.example.TestOneMore/qt-reserved-files/qml/QtQuick.2/libqtquick2plugin.so" has unsupported flags DT_FLAGS_1=0x80
W linker : "/data/data/org.qtproject.example.TestOneMore/qt-reserved-files/qml/QtQuick/Controls.2/libqtquickcontrols2plugin.so" has unsupported flags DT_FLAGS_1=0x80
W libTestOneMore.so: QQmlApplicationEngine failed to load component
W libTestOneMore.so: qrc:/main.qml:3 module "QtQuick.VirtualKeyboard" is not installed
08-20 11:14:36.167 9133 9151 W libTestOneMore.so:
W libTestOneMore.so: exit app 0
D EGL_emulation: eglMakeCurrent: 0x9e1060a0: ver 3 1 (tinfo 0x9dc94880)
**"org.qtproject.example.TestOneMore" died.**
I am running Ubuntu 18.04 in a VirtualBox. As soon as I want to build my project I get this error message
error: ‘class QOpenGLExtraFunctions’ has no member named ‘glTexBuffer’; did you mean ‘glReadBuffer’?
MBGL.glTexBuffer(GL_TEXTURE_BUFFER, GL_RGBA32F, m_buildingColorBuffer);
So I assumed that the OpenGL Version isn't correct. I updated everything and
"glxInfo" gives me this information
OpenGL renderer string: llvmpipe (LLVM 6.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.1.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 18.1.5
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 18.1.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
Which seems fine because glTexBuffer is supported with 3.x
Is there anything else what I could do or is there an alternative for glTexBuffer()
Whenever I launch simulators on Xcode 9.2, the simualtors are crashing with multiple popups.
Xcode version: 9.2 (9C40b)
Mac OS version: 10.12.6 (16G1212)
Some of the error messages are as follows:
backboardd cannot be opened because of a problem.
SimultorBridge cannot be opened because of a problem.
SpringBoard cannot be opened because of a problem.
Crash report for SimultorBridge is as follows:
Process: SimulatorBridge [4361]
Path: /Users/USER/Downloads/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/Resources/Platforms/iphoneos/usr/libexec/SimulatorBridge
Identifier: SimulatorBridge
Version: 835.5 (835.5)
Code Type: X86-64 (Native)
Parent Process: launchd_sim [4313]
Responsible: SimulatorBridge [4361]
User ID: 501
Date/Time: 2018-02-21 12:36:15.729 +0530
OS Version: Mac OS X 10.12.6 (16G1212)
Report Version: 12
Anonymous UUID: 6844F1F8-F647-09F6-8FB0-A7B9C14F843B
Time Awake Since Boot: 10000 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: DYLD, [0x1] Library missing
Application Specific Information:
dyld: launch, loading dependent libraries
DYLD_FALLBACK_LIBRARY_PATH=/Users/Octane_Nimesh/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib
DYLD_ROOT_PATH=/Users/Octane_Nimesh/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot
DYLD_FALLBACK_FRAMEWORK_PATH=/Users/Octane_Nimesh/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks
Dyld Error Message:
Library not loaded: /System/Library/PrivateFrameworks/CoreAnalytics.framework/CoreAnalytics
Referenced from: /Users/USER/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/WirelessDiagnostics.framework/WirelessDiagnostics
Reason: image not found
How to resolve this issue?
Reinstall Xcode as this issues might occur because of the corrupted simulator files.
I have read this link - https://wiki.debian.org/ru/AtiHowTo
and decide to setup OpenCL.
the r600g driver still have to load proprietary microcode into the GPU
to enable hardware acceleration. This firmware is usually included in
the kernel, but is packaged separately in Debian.
So, I installed firmware:
# apt-show-versions firmware-linux-nonfree firmware-linux
firmware-linux-nonfree:all/sid 0.40 uptodate
firmware-linux:all/sid 0.40 uptodate
Then I upgrade kernel version:
uname -v
#1 SMP PREEMPT RT Debian 3.12.8-1 (2014-01-19)
and checked kernel flags:
grep DRM_RADEON /boot/config-$(uname -r)
CONFIG_DRM_RADEON=m
# CONFIG_DRM_RADEON_UMS is not set
grep AGP /boot/config-$(uname -r)
CONFIG_AGP=y
CONFIG_AGP_AMD64=y
CONFIG_AGP_INTEL=y
CONFIG_AGP_SIS=y
CONFIG_AGP_VIA=y
Also I setup xserver version recent enough:
# apt-show-versions xorg
xorg:amd64/sid 1:7.7+5 uptodate
I choose radeon as driver:
You most certainly are using wheezy's xserver-xorg-core which does not
provide xorg-video-abi-6.0 any more, and radeonhd is not available for
the newer xorg-video-abi because it has been removed from Debian
# apt-show-versions xserver-xorg-video-radeon
xserver-xorg-video-radeon:amd64/sid 1:7.3.0-1 uptodate
This gives me OpenGL working:
$ glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV770
OpenGL core profile version string: 3.1 (Core Profile) Mesa 10.1.0-devel (git-81144c0 saucy-oibaf-ppa+curaga)
OpenGL core profile shading language version string: 1.40
OpenGL core profile context flags: (none)
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 10.1.0-devel (git-81144c0 saucy-oibaf-ppa+curaga)
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
I am trying to use application which works with OpenCL.
This programs works ok on CPU:
$ mono scallion/bin/Debug/scallion.exe parallax
Cooking up some delicions scallions...
Putting 1 patterns into 1 buckets.
Using kernel optimized from file kernel.cl (Optimized4)
Using work group size 1
Compiling kernel... done.
LoopIteration:10 HashCount:167.77MH Speed:7.8MH/s Runtime:00:00:21
Predicted:19:38:20
Stopping and shutting down...
LoopIteration:11 HashCount:184.55MH Speed:7.8MH/s Runtime:00:00:23
Predicted:19:36:58 init: 2687ms / 1 (2687ms, 0.37/s)
generate key: 153ms / 6 (25.5ms, 39.22/s)
cpu precompute: 7ms / 6 (1.17ms, 857.14/s)
total without init: 23706ms / 1 (23706ms, 0.04/s)
set buffers: 0ms / 11 (0ms, 0/s)
write buffers: 0ms / 11 (0ms, 0/s)
read results: 23699ms / 11 (2154.45ms, 0.46/s)
check results: 0ms / 11 (0ms, 0/s)
7.78 million hashes per second
Stopping and shutting down...
But I am unable to detect GPU:
$ mono scallion/bin/Debug/scallion.exe
Usage: scallion [OPTIONS]+ regex [regex]+
Options:
-l, --listdevices Lists the devices that can be used.
-d, --device=VALUE Specifies the opencl device that should be used.
There is no GPU in the list of devices:
$ mono scallion/bin/Debug/scallion.exe -l
Id:0 Name:Intel(R) Core(TM)2 Quad CPU Q9650 # 3.00GHz
PreferredGroupSizeMultiple:1 ComputeUnits:4 ClockFrequency:2000
MaxConstantBufferSize:65536 MaxConstantArgs:8 MaxMemAllocSize:2147483648
I am unable to find instructions on how to setup OpenCL:
apt-get install libclc-r600
apt-show-versions libclc-r600 ocl-icd-libopencl1
libclc-r600:all/saucy 0~git20140101-1~gd~s uptodate
ocl-icd-libopencl1:amd64/sid 2.1.3-2 uptodate
and after starting application I receive an error:
~/github.com/lachesis/scallion$ mono ./scallion/bin/Debug/scallion.exe -l
Unhandled Exception:
System.InvalidOperationException: ErrorCode:'-1001'
at scallion.CLDeviceInfo.CheckError (Int32 err) [0x00000] in :0
at scallion.CLDeviceInfo.GetPlatformIds () [0x00000] in :0
at scallion.CLDeviceInfo.GetDeviceIds () [0x00000] in :0
at scallion.CLRuntime.GetDevices () [0x00000] in :0
at scallion.Program.ListDevices () [0x00000] in :0
at scallion.Program.Main (System.String[] args) [0x00000] in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException:
ErrorCode:'-1001'
at scallion.CLDeviceInfo.CheckError (Int32 err) [0x00000] in :0
at scallion.CLDeviceInfo.GetPlatformIds () [0x00000] in :0
at scallion.CLDeviceInfo.GetDeviceIds () [0x00000] in :0
at scallion.CLRuntime.GetDevices () [0x00000] in :0
at scallion.Program.ListDevices () [0x00000] in :0
at scallion.Program.Main (System.String[] args) [0x00000] in :0
The error code values are defined in opencl.h
It look like your platform is not configured properly.
CL_PLATFORM_NOT_FOUND_KHR (-1001) error from clGetPlatformIDs.
That's because you do have the dispatcher, but no actual OpenCL drivers."
After
sudo apt-get install libopencl1-mesa
$ find / -iname «libMesaOpenCL.so*» 2>/dev/null
/usr/lib/x86_64-linux-gnu/libMesaOpenCL.so
/usr/lib/x86_64-linux-gnu/libMesaOpenCL.so.1.0.0
/usr/lib/x86_64-linux-gnu/libMesaOpenCL.so.1
In configuration file there should be
cat /etc/OpenCL/vendors/mesa.icd
libMesaOpenCL.so
The error is
fatal error: cannot open file '/usr/lib/clc/rv770-r600--.bc': No such file or directory
How to make this work?
I eventually enabled the free OpenCL stack, and ran into very similar problems. I'll provide an abridged overview, of some of the relevant packages.
That libopencl1-mesa is just the ICD runtime, which is loaded into the generic ocl-icd-libopencl1. Then libclc is used by libopencl1-mesa to deal with the OpenCL Kernels. Using an LLVM chipset specific backend, libclc generates instructions. You're missing the GPU chipset specific glue, which is provided by the missing .bc. This is greatly simplified, but for this problem it should suffice, still a good diagram would help immensely.
In your particular example, the .bc's would be provided by libclc-r600 However I'm not seeing anything for your chipset 'DONE', on this Freedesktop.org GalliumCompute page. It appears the lowest supported chipset is the Evergreen (HD5000 Series).
* please recheck GalliumCompute if you read this after 02-04-2014.
Not sure if 'nonfree' drivers are opensource.
Then, if you look at:
OpenGL renderer string: Gallium 0.4 on AMD RV770
Looks like Gallium LLVM is used to render (not native GPU), so no guarantee, that OpenGL is accelerated by GPU. Anyway, if you use nonfree drivers, my advice is to download most recent drivers from AMD site & use them instead of currently installed.
Also, recent AMD APP SDK (from 2.8 on, if memory serves me right) is shipped apart from GPU driver, so you may try to use it instead of open package. It works at least on Ubuntu 12.04 (AMD drivers from repository + AMD APP SDK from AMD's site)
I am trying to implement matrix multiplication usign OpenCL. I have an ATI Radeon HD Radeon 5000 series graphics card.
This is one of the programs i found on the net, but linking errors are coming which i am not able to solve.
I tried running the code mentioned in this site
http://gpgpu-computing4.blogspot.in/2009/10/matrix-multiplication-3-opencl.html
I followed setting up my visual studio project from this site http://www.guineacode.com/2010/linking-and-compiling-opencl/
but the following errors come
error LNK2019: unresolved external symbol _oclLoadProgSource referenced in function _main
error LNK2019: unresolved external symbol _shrLogEx referenced in function "void __cdecl __shrCheckErrorEX(int,int,void (__cdecl*)(int),char const *,int)" (?__shrCheckErrorEX##YAXHHP6AXH#ZPBDH#Z)
Any help would be appreciated
Can you try this ?
Make sure you have the latest Catalyst driver from AMD.
Try downloading AMD APP SDK 2.6 from here : http://developer.amd.com/sdks/AMDAPPSDK/downloads/Pages/default.aspx
After the install, do the following
Make sure to include $(AMDAPPSDKROOT)\include for header files
Library Directory : $(AMDAPPSDKROOT)\lib\x86 or x86_64 depending on your bitness
4.Now you can build and run the program
Here is an older post which talks about linking 2.4... with slight modification you can use the instruction
http://blog.cuvilib.com/2011/07/01/how-to-run-opencl-in-microsoft-vs-2008-using-amd-app-sdk/
If you are looking only MatrixMultiplication sample, AMD APP SDK bundles some samples along with pack you can find them in (Windows)
C:\USERS\%USER%\My Documents\AMD APP\ Samples
and in Linux under
/opt/AMD APP SDK/Samples
HTH