clinfo | known information about all available OpenCL platforms
kandi X-RAY | clinfo Summary
kandi X-RAY | clinfo Summary
clinfo is a simple command-line application that enumerates all possible (known) properties of the OpenCL platform and devices available on the system. Inspired by AMD's program of the same name, it is coded in pure C and it tries to output all possible information, including those provided by platform-specific extensions, trying not to crash on unsupported properties (e.g. 1.2 properties on 1.1 platforms).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of clinfo
clinfo Key Features
clinfo Examples and Code Snippets
Community Discussions
Trending Discussions on clinfo
QUESTION
Openvino inference crashes. I think the source of issue is the note at the end of clinfo
command:
ANSWER
Answered 2021-Nov-25 at 11:31Try installing the latest Intel Compute Engine 21.45.21574 and see if it resolves the issue.
QUESTION
I would like to make run an old N-body which uses OpenCL.
I have 2 cards NVIDIA A6000 with NVLink
, a component which binds from an hardware (and maybe software ?) point of view these 2 GPU cards.
But at the execution, I get the following result:
Here is the kernel code used (I have put pragma that I estimate useful for NVIDIA cards):
...ANSWER
Answered 2021-Aug-07 at 12:36Your kernel code looks good and the cache tiling implementation is correct. Only make sure that the number of bodies is a multiple of local size, or alternatively limit the inner for loop to the global size additionally.
OpenCL allows usage of multiple devices in parallel. You need to make a thread with a queue for each device separately. You also need to take care of device-device communications and synchronization manually. Data transfer happens over PCIe (you also can do remote direct memory access); but you can't use NVLink with OpenCL. This should not be an issue in your case though as you need only little data transfer compared to the amount of arithmetic.
A few more remarks:
- In many cases N-body requires FP64 to sum up the forces and resolve positions at very different length scales. However on the A6000, FP64 performance is very poor, just like on GeForce Ampere. FP32 would be significantly (~64x) faster, but is likely insufficient in terms of accuracy here. For efficient FP64 you would need an A100 or MI100.
- Instead of 1.0/sqrt, use rsqrt. This is hardware supported and almost as fast as a multiplication.
- Make sure to use either FP32 float (1.0f) or FP64 double (1.0) literals consistently. Using double literals with float triggers double arithmetic and casting of the result back to float which is much slower.
EDIT: To help you out with the error message: Most probably the error at clCreateKernel
(what value does status
have after calling clCreateKernel
?) hints that program
is invalid. This might be because you give clBuildProgram
a vector of 2 devices, but set the number of devices to only 1 and also have context
only for 1 device. Try
QUESTION
I am new to OpenCL and I have read in several places that if/else structures should be avoided, mainly because when the evaluation of threads is different (divergent branching) there is a significant slowdown.
Nonetheless, I used one if(cond) followed by some prints to guarantee that when a forbidden condition is met I can debug what caused it. The point is, whenever the if() is true for a single thread I will kill the process, therefore I am not worried about different threads evaluating the condition differently.
Yet, I found out that even when all threads evaluate false in this if(), there is a massive slowdown when compared to not using the if() -- I commented out the conditional and its body statements to verify.
An observation: I have a kernel (128 workgroups, each one with 128 workitems) that calls a function foo(), and the if/prints are inside foo(). The relevant part of foo() is as follows:
...ANSWER
Answered 2021-Aug-14 at 09:24it seems that you got a problem with the debug. Iknow that using ARM mali you need to add in you CCP
QUESTION
During compilation, I am compiling a large program. One compilation step gives me the following error:
clang++ -o selfdrive/camerad/camerad -Wl,--as-needed -Wl,-rpath=/home/ziyuan/openpilot/phonelibs/snpe/x86_64-linux-clang -Wl,-rpath=/home/ziyuan/openpilot/cereal -Wl,-rpath=/home/ziyuan/openpilot/selfdrive/common selfdrive/camerad/main.o selfdrive/camerad/cameras/camera_common.o selfdrive/camerad/transforms/rgb_to_yuv.o selfdrive/camerad/imgproc/utils.o selfdrive/camerad/cameras/camera_frame_stream.o -Lphonelibs/snpe/x86_64-linux-clang -Lphonelibs/libyuv/x64/lib -Lphonelibs/mapbox-gl-native-qt/x86_64 -Lcereal -Lselfdrive/common -L/usr/lib -L/usr/local/lib -Lcereal -Lphonelibs -Lopendbc/can -Lselfdrive/boardd -Lselfdrive/common -lm -lpthread selfdrive/common/libcommon.a -ljson11 -ljpeg -lOpenCL cereal/libcereal.a cereal/libmessaging.a -lzmq -lcapnp -lkj cereal/libvisionipc.a selfdrive/common/libgpucommon.a -lGL
/usr/bin/ld: selfdrive/camerad/cameras/camera_common.o: in function CameraBuf::init(_cl_device_id*, _cl_context*, CameraState*, VisionIpcServer*, int, VisionStreamType, VisionStreamType, void (*)(void*, int))': /home/ziyuan/openpilot/selfdrive/camerad/cameras/camera_common.cc:92: undefined reference to
clCreateCommandQueueWithProperties'
When I check the linker, I got the following:
...ANSWER
Answered 2021-Aug-13 at 05:25As also answered here, clCreateCommandQueueWithProperties
is an OpenCL 2.0 thing. Nvidia GPUs only support OpenCL 1.2. Nvidia recently "upgraded" to OpenCL version 3.0, but this is just a new name for version 1.2. OpenCL 2.0 features are still not supported.
QUESTION
I'm struggling with getting GL+CL to work together.
I've been following this tutorial. In my code I first call clGetPlatformIDs
and retrieve the first (and only) platform. I also get my gl_context
from SDL2. Then I want to query the device used by OpenGL with help of clGetGLContextInfoKHR
. I successfully obtain this function with clGetExtensionFunctionAddressForPlatform(platform_id, "clGetGLContextInfoKHR")
but unfortunately when I call it, I get a segmentation fault. My code is written in Rust but I use low level OpenCL binding, so it looks almost like its C counterpart.
ANSWER
Answered 2021-Jul-13 at 15:43I am not sure why clGetGLContextInfoKHR
is failing but I figured out that it's not really necesary to call it.
Instead you may just use this on Linux
QUESTION
NVIDIA has recently announced OpenCL 3.0 support for their graphics cards. I have NVIDIA Geforce MX150 card and I have updated my CUDA toolkit to version 11.3 with 465.19.01 driver. I have installed clinfo tool that displays all information regarding OpenCL platforms and devices. When I run it, it dislpays:
- Device Version = OpenCL 3.0 CUDA
- Driver Version = 465.19.01
- Device OpenCL C Version = OpenCL C 1.2
I am a bit confused here. What is the difference between Device version & Device OpenCL C version? Will I be able to run OpenCL 3.0 code on my card or it just still support OpenCL 1.2 specs?
...ANSWER
Answered 2021-May-03 at 16:20According to the clGetDeviceInfo
specification:
CL_DEVICE_OPENCL_C_VERSION
is the highest OpenCL C language version that the compiler supports for this device.
CL_DEVICE_VERSION
is the OpenCL version supported by the device.
So even though your MX150 supports OpenCL 3.0, you can only compile OpenCL 1.2 code. Note that OpenCL 3.0 basically is identical to OpenCL 1.2 but with better support for optional OpenCL 2.x features. With the lates driver Nvidia has added a few new OpenCL 2.x features, but still has no full 2.x support.
QUESTION
The implementation of emulated atomics in openCL following the STREAM blog works nicely for atomic add in 32bit, on CPU as well as NVIDIA and AMD GPUs.
The 64bit equivalent based on the cl_khr_int64_base_atomics
extension seems to run properly on (pocl and intel) CPU as well as NVIDIA openCL drivers.
I fail to make 64bit work on AMD GPU cards though -- both on amdgpu-pro and rocm (3.5.0) environments, running on a Radeon VII and a Radeon Instinct MI50, respectively.
The implementation goes as follows:
...ANSWER
Answered 2021-Apr-22 at 11:41For 64-bit, the function is called atom_cmpxchg
and not atomic_cmpxchg
.
QUESTION
Post-solution edit: The issue is with the code alone. There is no hardware issue here. Now to the original post:
I'm trying to get a basic OpenCL program to work.
The program simply creates a buffer, writes 42 to the buffer, reads it, and outputs.
Here's the code, written in C:
...ANSWER
Answered 2021-Feb-21 at 04:07I am a buffoon. The error was on the line I went to set the kernel argument:
QUESTION
I currently have a program running all the time using my Nvidia GPU. I would like to run another one aside, which would use OpenCV with OpenCL. I use Ubuntu 18.04 and my processor is an Intel i7-9750H (with UHD Graphics 630).
I run this C++ code to detect the available devices:
...ANSWER
Answered 2020-Oct-28 at 22:38This is a somewhat messy situation. There is a difference between using multiple OpenCL devices from a single platform and different platforms.
Question 2: Each OpenCL implementation/SDK/Runtime you install will show up as a platform. The context class of OpenCV is bound to a single platform and can only work with the corresponding devices. The constructor only allows to specify a device type, so it probably queries OpenCL and uses the first platform with that device type (or just the first). That's why OpenCV only shows the Nvidia device.
Question 1: Creating another context reflecting the Intel platform would be possible by using the OpenCL API directly and then calling OpenCV's fromHandle()
or fromDevice()
functions to create the OpenCV Context object (the clinfo source is an example for the required code). But, using different platforms means linking to different OpenCL libraries (indirectly at runtime through the compile-time linked libOpenCL). I.e. memory objects, etc. cannot be shared between the different contexts, so practical usability is rather limited unless you have independent problems that you'd like to compute in parallel on both devices.
Bonus:
Your clinfo
output shows 3 platforms (Nvidia OpenCL 1.2, Intel GPU OpenCL 3.0, Intel CPU OpenCL 2.1), and you see the warning:
QUESTION
I've been using java in IntelliJ as a hobby for quite some time and have decided to start using OpenCL for parallel computing. I'm pretty sure that I've made no mistake downloading and adding the LWJGL library to my project, since it does always compile. The problem is that when I run the program, it produces this output:
...ANSWER
Answered 2020-Oct-20 at 19:32While I did not find the exact problem, I solved it by reinstalling IntelliJ from their website. It seems that my previous installation done by the Linux Mint Software Manager was faulty. Everything is showing up fine now Thanks for reading and helping though
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install clinfo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page