Coder Social home page Coder Social logo

intel / compute-samples Goto Github PK

View Code? Open in Web Editor NEW
92.0 24.0 18.0 14.77 MB

Intel® GPU Compute Samples

Home Page: https://01.org/intel-gpu-compute-samples

License: MIT License

CMake 6.05% C++ 74.21% C 17.68% Dockerfile 0.16% Python 0.70% PowerShell 0.67% Shell 0.53%
intel gpu opencl

compute-samples's Introduction

Intel® GPU Compute Samples

Build Status Build status

Sample GPU Compute applications for Intel® Processor Graphics that demonstrate:

  • notable new features in Compute APIs in released Graphics drivers
  • features specific to Intel® Processor Graphics
  • efficient way of using Intel® GPUs for general computing

Compute samples currently support OpenCL™ and oneApi Level Zero compute APIs.

Samples Overview

List of all available samples and their description can be found in the Samples Overview.

Getting Started

Prerequisites

Clone repository

git clone https://github.com/intel/compute-samples
cd compute-samples

Install dependencies

Dependencies can be installed manually or by using installation scripts like the one below:

scripts/install/install_ubuntu_18_04.sh

More details can be found in the BUILD file.

Build

mkdir build
cd build
cmake ..
cmake --build .

More details can be found in the BUILD file.

Testing

In order to run tests please read this section.

Versioning

We use Semantic Versioning. Current version is 0.y.z which means that API may change without maintaining backward compatibility.

Contributing

Please read CONTRIBUTING file for details about the contribution process.

License

Intel® GPU Compute Samples are licensed under the MIT License.

compute-samples's People

Contributors

aziolkow avatar bkoscielak avatar darmroz avatar gwawiork avatar kapix avatar ldyrga avatar ltowarek avatar mwitke avatar nrspruit avatar pjreger avatar skochubeev avatar slawomirmakowski avatar vsemenov368 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compute-samples's Issues

libva detection in non standard location

If libva is not installed in the standard location build fails. I would suggest adding a mechanism for better detection of this library. I could get around this issue by the following patch,

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6b677c5..1bc1f66 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,6 +35,9 @@ include(import_gtest)
 include(import_libpng)
 include(import_mediadata)

+include_directories(${VALIB_ROOT}/include)
+link_directories(${VALIB_ROOT}/lib)
+
 option(WITH_OCL "Build OCL Samples" ON)
 if(WITH_OCL)
     include(import_opencl)
@@ -60,4 +63,5 @@ list(APPEND IGNORE_SAMPLE_SOURCE ".gitignore")
 list(APPEND IGNORE_SAMPLE_SOURCE "/docker/")
 list(APPEND IGNORE_SAMPLE_SOURCE "/build/")

+
 generate_packages(${PROJECT_NAME} IGNORE_FILES ${IGNORE_SAMPLE_SOURCE})

After that I specify the root directory of libva to cmake build.

failed to download when run cmake ../

In ubuntu 16.04, when run cmake ../, I encountered following downloading problem:

-- Downloading...
dst='/home/share/worksapce/opencl_compiling/new/compute-samples/third_party/downloads/opencl-external/opencl-headers-prefix/src/de26592167b9fdea503885e40e8755393c56523d.zip'
timeout='none'
-- Using src='https://github.com/KhronosGroup/OpenCL-Headers/archive/de26592167b9fdea503885e40e8755393c56523d.zip'
-- Retrying...

I can use curl or wget command to download the zip package successfully. It seems the proxy problem, but I tried to add proxy setting in CMakeLists.txt, still failed:
set(ENV{http_proxy} "http://proxy.cd.intel.com:911")
set(ENV{https_proxy} "https://proxy.cd.intel.com:911")

Additionally I tried to download de26592167b9fdea503885e40e8755393c56523d.zip manually, and placed in under compute-samples/third_party/downloads/opencl-external/opencl-headers-prefix/src, but still failed with following log:

-- File already exists but no hash specified (use URL_HASH):
file='/home/share/worksapce/opencl_compiling/new/compute-samples/third_party/downloads/opencl-external/opencl-headers-prefix/src/de26592167b9fdea503885e40e8755393c56523d.zip'
Old file will be removed and new file downloaded from URL.

The solution don't build successfully.

First , When I download the dependency , I find that the install file is wrong , the boost download address is wrong.

When I install all the dependency, i use cmake to generate the solutions . the error occurs as follow:

_CMake Warning (dev) at cmake/import_libpng.cmake:33 (find_package):
Policy CMP0074 is not set: find_package uses _ROOT variables.
Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

CMake variable PNG_ROOT is set to:

C:/Users/YitaoChang/Desktop/compute-samples-master/scripts/install/third_party/libpng

For compatibility, CMake is ignoring the variable.
Call Stack (most recent call first):
CMakeLists.txt:35 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.15/Modules/FindPNG.cmake:52 (find_package):
Policy CMP0074 is not set: find_package uses _ROOT variables.
Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

CMake variable ZLIB_ROOT is set to:

C:/Users/YitaoChang/Desktop/compute-samples-master/scripts/install/third_party/zlib

For compatibility, CMake is ignoring the variable.
Call Stack (most recent call first):
cmake/import_libpng.cmake:33 (find_package)
CMakeLists.txt:35 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at cmake/import_mediadata.cmake:23 (file):
file COPY cannot find
"C:/Users/YitaoChang/Desktop/compute-samples-master/scripts/install/mediadata/yuv".
Call Stack (most recent call first):
CMakeLists.txt:36 (include)

CMake Error at cmake/custom_functions.cmake:105 (file):
file COPY cannot find
"C:/Users/YitaoChang/Desktop/compute-samples-master/mediadata/merged/yuv/goal_1280x720.yuv".
Call Stack (most recent call first):
compute_samples/applications/vme_search/CMakeLists.txt:52 (install_resources)

CMake Error at cmake/custom_functions.cmake:105 (file):
file COPY cannot find
"C:/Users/YitaoChang/Desktop/compute-samples-master/mediadata/merged/yuv/goal_1280x720.yuv".
Call Stack (most recent call first):
compute_samples/applications/vme_hme/CMakeLists.txt:56 (install_resources)

CMake Error at cmake/custom_functions.cmake:105 (file):
file COPY cannot find
"C:/Users/YitaoChang/Desktop/compute-samples-master/mediadata/merged/yuv/goal_1280x720.yuv".
Call Stack (most recent call first):
compute_samples/applications/vme_hme/CMakeLists.txt:71 (install_resources)

CMake Error at cmake/custom_functions.cmake:105 (file):
file COPY cannot find
"C:/Users/YitaoChang/Desktop/compute-samples-master/mediadata/merged/yuv/goal_1280x720.yuv".
Call Stack (most recent call first):
compute_samples/applications/vme_intra/CMakeLists.txt:53 (install_resources)

CMake Error at cmake/custom_functions.cmake:105 (file):
file COPY cannot find
"C:/Users/YitaoChang/Desktop/compute-samples-master/mediadata/merged/yuv/goal_1280x720.yuv".
Call Stack (most recent call first):
compute_samples/applications/vme_wpp/CMakeLists.txt:56 (install_resources)

CMake Error at cmake/custom_functions.cmake:105 (file):
file COPY cannot find
"C:/Users/YitaoChang/Desktop/compute-samples-master/mediadata/merged/yuv/football_interlaced_720x480.yuv".
Call Stack (most recent call first):
compute_samples/applications/vme_interlaced/CMakeLists.txt:44 (install_resources)

CMake Error at cmake/custom_functions.cmake:105 (file):
file COPY cannot find
"C:/Users/YitaoChang/Desktop/compute-samples-master/mediadata/merged/yuv/football_interlaced_720x480.yuv".
Call Stack (most recent call first):
compute_samples/applications/vme_interlaced/CMakeLists.txt:53 (install_resources)

CMake Error at cmake/custom_functions.cmake:105 (file):
file COPY cannot find
"C:/Users/YitaoChang/Desktop/compute-samples-master/mediadata/merged/yuv/goal_1280x720.yuv".
Call Stack (most recent call first):
compute_samples/applications/vme_interop/CMakeLists.txt:56 (install_resources)_

Unknown CMake command "add_application_library"

MINGW32 ~/Desktop/compute-samples-master/compute_samples/build
$ cmake ..
-- Building for: Visual Studio 15 2017
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.17134.
-- The C compiler identification is MSVC 19.16.27030.1
-- The CXX compiler identification is MSVC 19.16.27030.1
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at applications/commands_aggregation/CMakeLists.txt:26 (add_application_library):
Unknown CMake command "add_application_library".

CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.14)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "C:/Users/Администратор/Desktop/compute-samples-master/compute_samples/build/CMakeFiles/CMakeOutput.log".

GPU generation question

Could you please explain why Intel® Graphics 5XX (Skylake) or newer is required for running the samples ? What about the 8th generation ?

Thanks

Build failures from USM header

Hello, I was building this project to try the USM tests and countered the following couple of issues with the USM header file cl_intel_unified_shared_memory.h to successfully compile.

  • Needed to add extern "C" linkage around new entry points

  • clMemFreeINTEL has const void *ptr as the second parameter when the spec defines void* ptr without the const.

DEBUG opencl code

Hello, how can I debug the kernel code of Intel OpenCL with vs2019 on Windows 10? I've tried the Intel OpenCL SDK on the official website, but I can't debug it. I'm looking forward to your reply, thank you!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.