opencl

cpp rgb to yuv422 conversion

僤鯓⒐⒋嵵緔 提交于 2020-07-07 11:48:05
问题 I'm trying to convert an image (originally from QImage) in a RGB/RGBA format (can be changed) to a YUV422 format. My initial intention was to use OpenCV cvtColor to do the work but it does not enable the conversion of RGB/RGBA to 422 format. I searched for alternatives and even considered to write my own conversion according to this but it would not work fast enough. I searched for another library to use and found this post but it is relay old and not so relevant. So my question is what good

Getting “cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)” warning during runtime

做~自己de王妃 提交于 2020-06-29 03:40:37
问题 Following this and this posts, I'm compiling the main.c code on this GitHub Gist. Running CMake command find_package(OpenCL REQUIRED) I get this: -- Looking for CL_VERSION_2_2 - found -- Found OpenCL: C:/Program Files (x86)/IntelSWTools/system_studio_2020/OpenCL/sdk/lib/x86/OpenCL.lib (found version "2.2") indicating that an OpenCL SDK version 2.2 was found. This is in contradiction with what I get from clinfo tool, detecting a 1.2 OpenCL for Intel's SDK/platforms. Now when running the

How to run OpenCL + OpenGL inside a Docker container?

一笑奈何 提交于 2020-06-24 16:50:08
问题 The aim is to run an OpenCL/OpenGL (interop) app inside a docker container. But I have not been successful yet. Intro I have laptop with an NVidia graphics card so I thought leveraging on NVidia Dockerfiles [1,2] would be a good starting point. The following Dockerfile: # Dockerfile to run OpenGL app FROM nvidia/opengl:1.0-glvnd-runtime-ubuntu16.04 ENV NVIDIA_DRIVER_CAPABILITIES ${NVIDIA_DRIVER_CAPABILITIES},display RUN apt-get update && apt-get install -y --no-install-recommends \ mesa-utils

How to run OpenCL + OpenGL inside a Docker container?

∥☆過路亽.° 提交于 2020-06-24 16:49:29
问题 The aim is to run an OpenCL/OpenGL (interop) app inside a docker container. But I have not been successful yet. Intro I have laptop with an NVidia graphics card so I thought leveraging on NVidia Dockerfiles [1,2] would be a good starting point. The following Dockerfile: # Dockerfile to run OpenGL app FROM nvidia/opengl:1.0-glvnd-runtime-ubuntu16.04 ENV NVIDIA_DRIVER_CAPABILITIES ${NVIDIA_DRIVER_CAPABILITIES},display RUN apt-get update && apt-get install -y --no-install-recommends \ mesa-utils

CMake detects a wrong version of OpenCL

这一生的挚爱 提交于 2020-06-22 04:23:05
问题 Following this post, where I have used these instructions to install NVIDIA's OpenCL SDK. The clinfo tool detects a 1.2 OpenCL version correctly. However, The below CMakeLists.txt file: cmake_minimum_required(VERSION 3.1) project(OpenCL_Example) find_package(OpenCL REQUIRED) include_directories(${OpenCL_INCLUDE_DIRS}) link_directories(${OpenCL_LIBRARY}) add_executable(main main.c) target_include_directories(main PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(main ${OpenCL_LIBRARY})

Compiling clinfo with NVIDIA's OpenCL SDK leads to error C2061: syntax error: identifier 'cl_device_affinity_domain'

早过忘川 提交于 2020-06-17 09:45:29
问题 Following this issue, I'm trying to compile the clifo tool using the MSVC toolchain. I use this CMakeLists.txt file which successfully finds NVIDIA's OpenCL SDK: Found OpenCL: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v3.2/lib/Win32/OpenCL.lib (found version "1.1") However when compiling with cmake --build . I get many errors, from which the first one is: c:\path\to\clinfo\src\info_ret.h(43): error C2061: syntax error: identifier 'cl_device_affinity_domain' [C:\path\to\clinfo\build

Installing PyOpenCL on Windows using Intel's SDK and pip

允我心安 提交于 2020-06-17 09:07:09
问题 Following these instructions, I have downloaded and installed Intel's OpenCL™ SDK (Intel® System Studio) from here. The cl.h file is in the folder C:\Program Files (x86)\IntelSWTools\system_studio_2020\OpenCL\sdk\include\CL however when running pip install pyopencl I get the long error message of Building wheel for pyopencl (PEP 517) ... error ERROR: Command errored out with exit status 1: command: 'c:\python38\python.exe' 'c:\python38\lib\site-packages\pip\_vendor\pep517\_in_process.py'

Can not find cl::Error class in OpenCL library

五迷三道 提交于 2020-05-30 07:55:30
问题 I saw in some code that in OpenCL library, there is a class named cl::Error by which the error and type of error in OpenCL code can be catched. But when I added in my code, like this #include <CL/cl.hpp> #include <fstream> #include <iostream> #include <cassert> #include <exception> #define __CL_ENABLE_EXCEPTIONS int main() { std::vector<cl::Platform> platforms; cl::Platform::get(&platforms); assert(platforms.size() > 0); auto myPlatform = platforms.front(); std::cout << "Using platform: " <<

Cannot set OpenCL kernel argument with buffer memory object

可紊 提交于 2020-05-16 07:43:08
问题 I have the following simple OpenCL kernel, that simply copies all entries pointed at a to b __kernel void mmcopy(__global float* a, __global float* b) { unsigned pos = get_global_id(0); b[pos] = a[pos]; } The following code snippet shows the opencl function calls for creating a buffer memory object out of four floats, and setting the first argument on the kernel with the buffer object. let mut v = [1f32, 1f32, 1f32, 1f32]; let size = mem::size_of_val(&v) as size_t; let mut error_buffer = 0 as

Cannot set OpenCL kernel argument with buffer memory object

天大地大妈咪最大 提交于 2020-05-16 07:42:31
问题 I have the following simple OpenCL kernel, that simply copies all entries pointed at a to b __kernel void mmcopy(__global float* a, __global float* b) { unsigned pos = get_global_id(0); b[pos] = a[pos]; } The following code snippet shows the opencl function calls for creating a buffer memory object out of four floats, and setting the first argument on the kernel with the buffer object. let mut v = [1f32, 1f32, 1f32, 1f32]; let size = mem::size_of_val(&v) as size_t; let mut error_buffer = 0 as