summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGuo Yejun <yejun.guo@intel.com>2015-11-19 02:03:25 +0800
committerYang Rong <rong.r.yang@intel.com>2015-12-09 11:27:48 +0800
commite2c46c88bd5bbd9f5762ba7ad3eaf00257ad114f (patch)
tree54a9ae522998cfd8161be0b27e0cdaed4c1cf526 /CMakeLists.txt
parentd10f16e746f0c3cdc90ac25a0c4ed5869e90ddca (diff)
downloadbeignet-e2c46c88bd5bbd9f5762ba7ad3eaf00257ad114f.tar.gz
make Beignet as intermedia layer of CMRT
CMRT is C for Media Runtime on Intel GPU, see https://github.com/01org/cmrt. There is a request to make Beignet as intermedia layer of CMRT, in other words, application programer write OpenCL APIs to execute the CM kernel on GPU, the following shows the key code, and please refer to the next patch of unit test for detail. prog = clCreateProgramWithBinary("cm kernel"); clBuildProgram(prog); kernel = clCreateKernel(prog, "kernel name"); image = clCreateImage(); clSetKernelArg(kernel, image); clEnqueueNDRangeKernel(kernel); Inside Beignet, once cm kernel is invoked, the following relative APIs will be directly passed to CMRT library (libcmrt.so) which is loaded via dlopen only when necessary. Since we use this simple method to keep the code clean, OpenCL spec is not strictly followed, and cl_event is not supported for this case. v2: add comments about the cm queue in fuction cmrt_enqueue Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 147bb258..8762f7ce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -152,6 +152,12 @@ ELSE(DRM_INTEL_FOUND)
MESSAGE(FATAL_ERROR "Looking for DRM Intel (>= 2.4.52) - not found")
ENDIF(DRM_INTEL_FOUND)
+# CMRT
+pkg_check_modules(CMRT libcmrt)
+IF(CMRT_FOUND)
+INCLUDE_DIRECTORIES(${CMRT_INCLUDE_DIRS})
+ENDIF(CMRT_FOUND)
+
# Threads
Find_Package(Threads)