Age | Commit message (Collapse) | Author | Files | Lines |
|
AppStream is a standard for software metadata,
including what hardware a driver supports:
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html
Signed-off-by: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
|
|
This allows a single beignet binary to both offer 2.0 where
available, and still work on older hardware.
V2: Default to 1.2 when -cl-std is not set (required by the OpenCL spec,
and also likely to be faster).
V3: Only enable OpenCL 2.0 when llvm version is 39.
V4: Only enable OpenCL 2.0 on x64 host.
V5: Always return 32 as address bits.
Contributor: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Signed-off-by: Pan Xiuli <xiuli.pan@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
|
|
Also update readme aoubt ocl-icd section.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
|
|
Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
|
|
The new option allows anyone wishing to do so to explicitly disable
OCL ICD Loader support in Beignet, regardless of the presence or absence
of OCL ICD header files. This is particularly useful for people building
Beignet packages for distributions, as it avoids creating an implicit
dependency on the state of the build host. The new option defaults to ON
so the default behaviour of CMake configuration remains unchanged.
See also: https://bugs.freedesktop.org/show_bug.cgi?id=98885
Signed-off-by: Marek Szuba <Marek.Szuba@cern.ch>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
|
|
|
|
The OpenCL 2.0 is disable default, to enable it, using option
-DENABLE_OPENCL_20 to enable it.
Now skylake and newer devices support OpenCL 2.0, if enable OpenCL 2.0,
LLVM 3.9 and libdrm 2.4.66 is required.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
|
|
and this feature also sometimes introduces build issue.
v2: add option INVOKE_CMRT to enable CMRT if necessary
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
|
|
Also set the LIBCL_C_VERSION to 2.0
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
|
|
Enable CL_DEVICE_SVM_COARSE_GRAIN_BUFFER svm support, use userptr and softpin
to implement it. Use userptr to share the page between cpu and gpu, and softpin
to unify the cpu and gpu's address. Now it works on i386 system. x86_64 depends on
backend support.
This patch base on DRM library and DRM kernel driver's softpin patch:
http://lists.freedesktop.org/archives/intel-gfx/2015-September/075446.html.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
|
|
In order to query low level layout of GL buffer object/texture/render
buffer, previous implementation introduced an egl extension and
implemented in Beignet side. This way is broken once mesa change its
related internal code. In this patch, we use an new egl extension
(EGL_MESA_image_dma_buf_export) to query related layout infomations
of gl texture. Since this egl extension is already accepted by Khronos,
so it's a stable method. This patch just implement GL texture 2d buffer
sharing, and we will implement other target type if necessary.
v2:
Add CMake build option to enable cl_khr_gl_sharing(default off).
Clean up related CMake code.
Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
|
|
|
|
Now make will only make beignet library, if you want beignet utest or
benchmark you can use make utest and make benchmark to build them.
This will make build time for beignet shorter when utests are not
needed.
Signed-off-by: Pan Xiuli <xiuli.pan@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
|
|
If BXT pooled EU enable, the 3*6 EUs is split into 2 pooled, so change
the sub slice to 2.
For min no. of eu in pool, only affact fused down 2*6 BXT devices,
because beignet don't support these devices now, add assert only.
assert.
This patch is based on kernel patch: https://patchwork.freedesktop.org/series/8200/
Thanks Arun.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
|
|
We check libdrm-intel with pkg-config, but CHECK_LIBRARY_EXISTS may
search lib in different path, so add the path we will use for it.
Signed-off-by: Pan Xiuli <xiuli.pan@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@intel.com>
|
|
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Ruiling Song <ruiling.song@intel.com>
|
|
Instead of replacing the existing CMAKE_C_FLAGS and CMAKE_CXX_FLAGS, extend
them so that existing assignments (from e.g. toolchain files) are preserved.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
|
|
use the variable NOT_BUILD_STAND_ALONE_UTEST to control the build type:
for beignet build, set it to 1; for stand alone build, do NOT need set
it.
remove all clXXXIntel extension call and such kind of tests since we
intend to provide the unit test independently for viariant OpenCL
implementation; replace the clMapBufferIntel/clMapBufferGTTIntel
with clEnqueueMapBuffer/clEnqueueMapImage; link the utest binary to
libOpenCL to follow the icd standard; remove the useless env in
setenv.sh since we need make install the package after build.
v2:
fix the indent error;
use function pointer for extesion case like vme and libva since we link to libOpenCL;
v3: builtin_kernel_block_motion_estimate_intel released kernel twice;
v4:
find OpenCL library for standalone utest and link to libcl for not
standalone utest;
check default variables in setenv.sh whether empty before use.
Signed-off-by: Luo Xionghu <xionghu.luo@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
|
|
it by default.
Add a cmake option for it, cmake with option -DEXPERIMENTAL_DOUBLE=true to enable it.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@intel.com>
|
|
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>
|
|
This is to fix build error when new intel extension is added
into beignet. As current cmake rule will use old system installed
CL headers instead of beignet ones, which leads to compile failure
as new extension definition won't be found. So this trys to simply
always prefer to use beignet's CL header in build/install.
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
|
|
1.1.x series will be maintained on Release_v1.1 branch.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
|
|
This example captures yuy2 frame directly to cl buffer object by the way
of dma, processed by OpenCL kernel, then convert to nv12 format and
shown by libva.
v2:
Close cl buffer's fd by clCloseMemObjectFdIntel instead of close
function.
v3:
Just use close function, no need of clCloseMemObjectFdIntel.
v4:
Some modifcation of examples/CMakeLists.txt after code rebase.
Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com>
Reviewed-by: Yuan, Feng <feng.yuan@intel.com>
|
|
As presently written, a 'make package' will attempt to INSTALL the
Beignet ICD loader to /etc/OpenCL/vendors whereas it should just
do a local install and then package the file. The proposed change instructs
CPack to include the `DESTDIR` variable when it calls `make install`, thus
directing the desination for the ICD loader to a local directory instead
of a system path.
Signed-off-by: Brian Kloppenborg <brian@arrayfire.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
Values of device max compute units and max subslice obtained
directly from the driver should be more accurate than our own
ID-based lookup values. This is particularly important when a
single device ID may encompass more than one configuration. If
the driver cannot provide a valid value for the given device,
we fallback on the ID-based lookup value.
This query requires libdrm 2.4.60. For now we will consider
the use of this query to be optional and exclude it from
compilation when building against older libdrm. Later we may
want to consider requiring the query or at least warning
more strongly when it is not supported.
v2: Make feature use conditional on libdrm version (Zhigang).
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
On some distributions, the CMAKE_INSTALL_FULL_LIBDIR or CMAKE_LIBRARY_ARCHITECTURE
may be undefined. To avoid generate intel-beignet-.icd file name, we need to get
rid of the extra "-" for such case.
Reported by Igor Gnatenko.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
|
|
This is the dev branch for next major release 1.1.0.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
|
|
As there may be some other LLVM users such as mesa, and they
may link to different LLVM library. To avoid such type of
conflicts, we use -Bsymbolic to disable the symbol preemption.
This patch should fix the build bug at:
https://bugs.freedesktop.org/show_bug.cgi?id=89325
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
|
|
It is currently not possible to have 32- and 64-bit builds of beignet
installed on the same system, as the path in intel-beignet.icd
can only be one of the two installations. This fixes this by giving
this file a different name when beignet is installed in a multiarch
directory:
intel-beignet-i386-linux-gnu.icd -> /usr/lib/i386-linux-gnu/beignet/libCL.so
intel-beignet-x86_64-linux-gnu.icd -> /usr/lib/x86_64-linux-gnu/beignet/libCL.so
Discussion and possible alternative approaches:
http://lists.alioth.debian.org/pipermail/pkg-opencl-devel/Week-of-Mon-20150223/date.html
While preparing this patch I noticed that intel-beignet.icd.in
uses @LIB_INSTALL_DIR@/beignet/ rather than @BEIGNET_INSTALL_DIR@,
which will obviously break if the latter is set directly. Is
that a bug or is this intended to be an internal-only variable?
Signed-off-by: Rebecca Palmer <rebecca_palmer@zoho.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
funny things may happen with usernames like
'asm', 'attribute', 'x86_64', 'i386', and so on
this breaks on usernames with non-alnum chars ('-', '.')
Signed-off-by: Andreas Beckmann <anbe@debian.org>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
clCreateImageFromLibvaIntel.
This example reads a source nv12 file to a VASurface, and creates a
target
VASurface. Then creates corresponding cl image objects from them. After
using ocl to do mirror effect post-processing on source VASurface,
target
VASurface is shown on screen by default.
Code of loading nv12 file to VASurface are referenced from
libva/test/encode/avcenc.c.
v2:
Delete 1920x1080.nv12 and 640x480.nv12 because of large size, add
256_128.nv12 as default test image.
v3:
1. Re-org files: add libva as a submodule then use display related
files.
2. Show result on screen by default instead of saving as a file.
3. Fix warnings.
v4: Fix whitespace format warnings.
v5:
1. Modify upload_nv12_to_surface to read a nv12 file and then upload
it to an NV12 VASurface. Also modify store_surface_to_nv12.
2. Change the cl post-processing kernel from gray effect to mirror
effect, which make demo cooler.
3. Minor fix of other problems.
v6: Remove unnecessary OUTPUT_NV12_DEFAULT related code.
Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: "Guo, Yejun" <yejun.guo@intel.com>
|
|
the built test case is load_program_from_bin_file, it demos how to
generate from source kernel compiler_ceil.cl to binary kernel
compiler_ceil.bin with the standalone compiler for a specific gen
pci id, and also demos how to load and execute the binary kernel
when the compiler is not available in the running system.
btw, please make sure compiler_ceil.bin is really updated if there is
already one there, the safe way is to delete it first.
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
At some platforms with old c/c++ environment, C++11 features are not
supported, it results in the failure to build the gbe compiler part
which depends on LLVM/clang using C++11 features.
The way to resolve is to build a standalone gbe compiler within another
feasible system, and build beignet with the already built standalone
gbe compiler by setting USE_STANDALONE_GBE_COMPILER=true. The path of
the standalone compiler is /usr/local/lib/beignet as default or could
be specified by STANDALONE_GBE_COMPILER_DIR.
Once USE_STANDALONE_GBE_COMPILER is given, all the gbe compiler relative
code will not be built any longer, only libcl.so and libgebinterp.so are
built. And libcl.so is special for GEN_PCI_ID, which is queried from the
building machie or could be specified as CMake option.
v2: separate the CMake option name.
update the commit comments.
add back the script for gen pci id, and build driver with it.
v3: add file FindStandaloneGbeCompiler.cmake to make the main cmakefile clean.
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
Remove pretty old fulsim code which seems having no users
also used interfaces not in open source libdrm, and call
windows fulsim binary instead of linux.
We will use current libdrm interface instead.
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
As build with mesa has been broken for a long time, we
disable it to avoid potential build problem.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
|
|
If no compiler macro is defined and the system only has clang
or icc, the previous implementation will treat clang as gcc and
will set some incorrect parameters. Now fix it.
Signed-off-by: Lv Meng <meng.lv@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
1. the wait logic is integrated into function cl_mem_map/unmap_auto
2. use cl_mem_map/unmap_auto for userptr inside clEnqueueRead/WriteBuffer
3. do not use cl_buffer_subdata for userptr, use cl_mem_map/memcpy instead
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
Master branch is for the next major release. 1.0.x series will be
maintained on Release_v1.0 branch.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
|
|
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
|
|
We get a random fail when enable userptr.
Disable it before we root cause and fix it.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Guo, Yejun" <yejun.guo@intel.com>
|
|
userptr is used to wrap a memory pointer (page aligned) supplied
by user space into a buffer object accessed by GPU, and so no extra
copy is needed. It is supported starting from linux kernel 3.16
and libdrm 2.4.58.
This patch is originally finished by Zhenyu Wang <zhenyuw@linux.intel.com>,
I did a little change and some code clean.
No regression issue found on IVB+Ubuntu14.10 with libdrm upgraded with tests:
beignet/utests, piglit, OpenCV/test&perf, conformance/basic&mem_host_flags&buffers
V2: add page align limit for data size, add comments for kernel without MMU_NOTIFIER
V3: add runtime check with host_unified_memory, return CL_MEM_OBJECT_ALLOCATION_FAILURE if failed
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
|
|
Signed-off-by: Junyan He <junyan.he@linux.intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
Signed-off-by: Junyan He <junyan.he@linux.intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
The LLVM_LFLAGS is used before finding the LLVM package,
which causes the CMake fails to set correct -L flags and
cause linkage error.
Signed-off-by: Junyan He <junyan.he@linux.intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
the 'COMPILER' is to choose the detail compiler,the default is GCC.
Signed-off-by: Lv Meng <meng.lv@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
|
|
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
|
|
Don't set patch version number on master branch.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
|
|
Bump to development version after 0.9.0.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
|
|
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
|