Intel Is Hooking OpenCL Beignet In With Their C Media Runtime (CMRT)
Intel is hooking their Beignet open-source OpenCL Linux implementation into the CMRT, the 01.org C for Media Runtime.
This commit appeared today in Beignet for Intel OpenCL. Intel's Guo Yejun wrote:
This code shows a small CMRT kernel that can then be executed via the OpenCL APIs with Beignet.
This commit appeared today in Beignet for Intel OpenCL. Intel's Guo Yejun wrote:
CMRT is C for Media Runtime on Intel GPU. 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.CMRT is hosted on GitHub as the C for Media Runtime that serves as a "media GPU kernel manager" for Intel graphics hardware to expose the GPU capabilities via a high-level language.
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.
This code shows a small CMRT kernel that can then be executed via the OpenCL APIs with Beignet.
2 Comments