[beignet] 01/05: Ship and document testing tool in beignet-dev Drop Enable-test-debug.patch for compatibility with upstream Enable PIE (as it is an executable)
Rebecca Palmer
rnpalmer-guest at moszumanska.debian.org
Sat Oct 8 11:32:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
rnpalmer-guest pushed a commit to branch master
in repository beignet.
commit c70b50d46ce1910a149c60c226380402a51a66ee
Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
Date: Sat Oct 8 12:13:07 2016 +0100
Ship and document testing tool in beignet-dev
Drop Enable-test-debug.patch for compatibility with upstream
Enable PIE (as it is an executable)
Document that CL-GL sharing may be available upstream (but not here, yet)
---
debian/beignet-dev.install | 3 +
debian/beignet-opencl-icd.install | 7 +-
debian/changelog | 3 +
debian/control | 14 +-
.../Debian-compliant-compiler-flags-handling.patch | 26 +--
debian/patches/Enable-test-debug.patch | 260 ---------------------
debian/patches/series | 2 +-
debian/patches/ship-test-tool.patch | 118 ++++++++++
debian/patches/update-docs.patch | 57 ++++-
debian/rules | 3 +-
10 files changed, 205 insertions(+), 288 deletions(-)
diff --git a/debian/beignet-dev.install b/debian/beignet-dev.install
index 2d6b6d3..eb961ca 100644
--- a/debian/beignet-dev.install
+++ b/debian/beignet-dev.install
@@ -1 +1,4 @@
usr/include/CL/cl_intel.h /usr/include/CL
+kernels/* /usr/share/beignet/test_kernels
+usr/lib/*/beignet/utest_run
+usr/lib/*/beignet/libutests.so
diff --git a/debian/beignet-opencl-icd.install b/debian/beignet-opencl-icd.install
index 035690a..075600e 100644
--- a/debian/beignet-opencl-icd.install
+++ b/debian/beignet-opencl-icd.install
@@ -1,2 +1,7 @@
etc/OpenCL
-usr/lib/*/beignet
+usr/lib/*/beignet/libgbe.so
+usr/lib/*/beignet/libgbeinterp.so
+usr/lib/*/beignet/libcl.so
+usr/lib/*/beignet/include
+usr/lib/*/beignet/beignet.pch
+usr/lib/*/beignet/beignet.bc
diff --git a/debian/changelog b/debian/changelog
index 9dd42f8..d3b0b4d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,9 @@ beignet (1.2.0-2) UNRELEASED; urgency=medium
* Make tests work with Python 3 and switch back to it.
* Add pow-powr-tests.patch.
* Add LLVM 3.9 support.
+ * Ship and document testing tool. Remove Enable-tests-debug.patch
+ for upstream compatibility, and enable PIE.
+ * Update documentation.
-- Rebecca N. Palmer <rebecca_palmer at zoho.com> Sun, 25 Sep 2016 21:58:07 +0100
diff --git a/debian/control b/debian/control
index 9dfd827..25f0d3c 100644
--- a/debian/control
+++ b/debian/control
@@ -55,11 +55,12 @@ Description: OpenCL library for Intel GPUs
Package: beignet-dev
Section: libdevel
Architecture: i386 amd64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 x32
-Multi-Arch: foreign
-Depends:
- beignet-opencl-icd (= ${binary:Version}),
- ocl-icd-opencl-dev,
- ${misc:Depends}
+Multi-Arch: same
+Depends: ${shlibs:Depends}, ${misc:Depends}
+# the testing tool tests the first ICD it finds,
+# so allow removing beignet-opencl-icd to test something else
+Recommends: beignet-opencl-icd (= ${binary:Version}),
+ ocl-icd-opencl-dev
Suggests: opencl-1.2-html-doc
Description: OpenCL for Intel GPUs (development files and documentation)
OpenCL (Open Computing Language) is a multivendor open standard for
@@ -67,7 +68,8 @@ Description: OpenCL for Intel GPUs (development files and documentation)
CPUs, GPUs and other processors.
.
This package contains the documentation specific to the Intel
- implementation, and the development files for Intel OpenCL extensions.
+ implementation, the development files for Intel OpenCL extensions,
+ and an OpenCL testing tool.
Package: beignet
Section: oldlibs
diff --git a/debian/patches/Debian-compliant-compiler-flags-handling.patch b/debian/patches/Debian-compliant-compiler-flags-handling.patch
index 38ff960..dc85573 100644
--- a/debian/patches/Debian-compliant-compiler-flags-handling.patch
+++ b/debian/patches/Debian-compliant-compiler-flags-handling.patch
@@ -46,18 +46,16 @@ Author: Simon Richter <sjr at debian.org>,Rebecca Palmer <rebecca_palmer at zoho.com>
#if defined(_INCLUDED_IMM)
// #define __AVX__
---- beignet.orig/utests/CMakeLists.txt
-+++ beignet/utests/CMakeLists.txt
-@@ -340,6 +340,12 @@ add_custom_target(utest_generator
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- )
+--- a/utests/CMakeLists.txt
++++ b/utests/CMakeLists.txt
+@@ -26,8 +26,8 @@ if (NOT NOT_BUILD_STAND_ALONE_UTEST)
+ # Threads
+ Find_Package(Threads)
-+#the test suite doesn't go into the final package, and compiler_{degrees,radians,function_argument2} use equality comparison of floats
-+if (COMPILER STREQUAL "GCC")
-+ SET(CMAKE_CXX_FLAGS "-msse -mfpmath=sse ${CMAKE_CXX_FLAGS}")
-+ SET(CMAKE_C_FLAGS "-msse -mfpmath=sse ${CMAKE_C_FLAGS}")
-+endif ()
-+
- if (EGL_FOUND AND MESA_SOURCE_FOUND)
- SET(utests_sources ${utests_sources} compiler_fill_gl_image.cpp)
- SET(CMAKE_CXX_FLAGS "-DHAS_EGL ${CMAKE_CXX_FLAGS} ${DEF_OCL_PCH_PCM_PATH}")
+- set (CMAKE_CXX_FLAGS "${CMAKE_C_CXX_FLAGS} -std=c++0x -Wno-invalid-offsetof")
+- set (CMAKE_C_FLAGS "${CMAKE_C_CXX_FLAGS}")
++ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_CXX_FLAGS} -std=c++0x -Wno-invalid-offsetof -ffloat-store")
++ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_CXX_FLAGS} -ffloat-store") #compiler_{degrees,radians,function_argument2} use equality comparison of floats
+ set (CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DGBE_DEBUG=1")
+ set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DGBE_DEBUG=1")
+ set (CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG -DGBE_DEBUG=0")
diff --git a/debian/patches/Enable-test-debug.patch b/debian/patches/Enable-test-debug.patch
deleted file mode 100644
index ad66302..0000000
--- a/debian/patches/Enable-test-debug.patch
+++ /dev/null
@@ -1,260 +0,0 @@
-Description: Enable extra output from tests
-
-Turn on udebug so tests print their full output, and mark failures
-by "failed:" instead of invisible-in-logs colour.
-
-For convenience, turn the test setup script (utests/setenv.sh) into a
-test running script (it isn't included in the final package, so
-does not need to stay compatible).
-
-Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
-
---- beignet.orig/utests/builtin_acos_asin.cpp
-+++ beignet/utests/builtin_acos_asin.cpp
-@@ -2,12 +2,12 @@
- #include <cmath>
- #include <algorithm>
-
--#define udebug 0
-+#define udebug 1
- #define printf_c(...) \
- {\
-- printf("\033[1m\033[40;31m");\
-+ printf("failed:");\
- printf( __VA_ARGS__ );\
-- printf("\033[0m");\
-+ status = 1;\
- }
-
- namespace {
-@@ -31,6 +31,7 @@ static void builtin_acos_asin(void)
- {
- // Setup kernel and buffers
- int k, i, index_cur;
-+ int status = 0;
- float gpu_data[max_function * count_input] = {0}, cpu_data[max_function * count_input] = {0};
-
- OCL_CREATE_KERNEL("builtin_acos_asin");
-@@ -85,6 +86,7 @@ static void builtin_acos_asin(void)
- #endif
- }
- }
-+ OCL_ASSERT(status == 0);
- }
-
- MAKE_UTEST_FROM_FUNCTION(builtin_acos_asin)
---- beignet.orig/utests/builtin_exp.cpp
-+++ beignet/utests/builtin_exp.cpp
-@@ -2,7 +2,7 @@
- #include <cmath>
- #include <algorithm>
-
--#define udebug 0
-+#define udebug 1
-
- #define FLT_MAX 0x1.fffffep127f
- #define FLT_MIN ldexpf(1.0,-126)
-@@ -10,9 +10,9 @@
-
- #define printf_c(...) \
- {\
-- printf("\033[1m\033[40;31m");\
-+ printf("failed:");\
- printf( __VA_ARGS__ );\
-- printf("\033[0m");\
-+ status = 1;\
- }
-
- namespace{
-@@ -36,6 +36,7 @@ static void builtin_exp(void)
- {
- // Setup kernel and buffers
- int k, i, index_cur;
-+ int status = 0;
- float gpu_data[max_function * count_input] = {0}, cpu_data[max_function * count_input] = {0};
- float diff;
- char log[256] = {0};
-@@ -75,19 +76,19 @@ static void builtin_exp(void)
-
- #if udebug
- if (std::isinf(cpu_data[index_cur]) && std::isinf(gpu_data[index_cur])){
-- printf(log);
-+ printf("%s",log);
- }
- else if (std::isnan(cpu_data[index_cur]) && std::isnan(gpu_data[index_cur])){
-- printf(log);
-+ printf("%s",log);
- }
- else if( diff / cpu_data[index_cur] < 3 * FLT_ULP \
- && ( gpu_data[index_cur] > FLT_ULP || cpu_data[index_cur] > FLT_ULP )){
-- printf(log);
-+ printf("%s",log);
- }
- else if ( gpu_data[index_cur] < FLT_ULP && gpu_data[index_cur] < FLT_ULP)
-- printf(log);
-+ printf("%s",log);
- else
-- printf_c(log);
-+ printf_c("%s",log);
- #else
- if (std::isinf(cpu_data[index_cur]))
- OCL_ASSERTM(std::isinf(gpu_data[index_cur]), log);
-@@ -100,6 +101,7 @@ static void builtin_exp(void)
- #endif
- }
- }
-+ OCL_ASSERT(status == 0);
- }
-
- MAKE_UTEST_FROM_FUNCTION(builtin_exp)
---- beignet.orig/utests/builtin_global_id.cpp
-+++ beignet/utests/builtin_global_id.cpp
-@@ -22,7 +22,7 @@ dimension:3
- 9 10 11 21 22 23 33 34 35 45 46 47 57 58 59
- */
-
--#define udebug 0
-+#define udebug 1
- #include "utest_helper.hpp"
- static void builtin_global_id(void)
- {
---- beignet.orig/utests/builtin_local_id.cpp
-+++ beignet/utests/builtin_local_id.cpp
-@@ -26,7 +26,7 @@ dimension:3
- 429 430 431 432 433 434 ... 571 572 573 574 575
- */
-
--#define udebug 0
-+#define udebug 1
- #include "utest_helper.hpp"
- static void builtin_local_id(void)
- {
---- beignet.orig/utests/builtin_local_size.cpp
-+++ beignet/utests/builtin_local_size.cpp
-@@ -28,7 +28,7 @@ get_local_size(4) = 1 (dimension:3)
-
- */
- #include "utest_helper.hpp"
--#define udebug 0
-+#define udebug 1
-
- static void builtin_local_size(void)
- {
---- beignet.orig/utests/builtin_num_groups.cpp
-+++ beignet/utests/builtin_num_groups.cpp
-@@ -25,7 +25,7 @@ get_num_groups(2) = 3 (dimension:3)
- get_num_groups(3) = 1 (dimension:3)
- */
-
--#define udebug 0
-+#define udebug 1
- #include "utest_helper.hpp"
- static void builtin_num_groups(void)
- {
---- beignet.orig/utests/builtin_pow.cpp
-+++ beignet/utests/builtin_pow.cpp
-@@ -3,12 +3,12 @@
- #include <algorithm>
- #include <string.h>
-
--#define udebug 0
-+#define udebug 1
- #define printf_c(...) \
- {\
-- printf("\033[1m\033[40;31m");\
-+ printf("failed:");\
- printf( __VA_ARGS__ );\
-- printf("\033[0m");\
-+ status = 1;\
- }
-
- namespace {
-@@ -31,6 +31,7 @@ static void builtin_pow(void)
- {
- // Setup kernel and buffers
- int k, i, index_cur;
-+ int status = 0;
- float ULPSIZE_NO_FAST_MATH = 16.0;
- float gpu_data[max_function * count_input] = {0}, cpu_data[max_function * count_input] = {0};
-
-@@ -84,7 +85,7 @@ static void builtin_pow(void)
- && (denormals_supported || gpu_data[index_cur]!=0 || std::fpclassify(cpu_data[index_cur])!=FP_SUBNORMAL) ) )
-
- {
-- printf_c("%d/%d: x:%f, y:%f -> gpu:%f cpu:%f\n", k, i, input_data1[k], input_data2[k], gpu_data[index_cur], cpu_data[index_cur]);
-+ printf_c("%d/%d: x:%f, y:%f -> gpu:%e cpu:%e err: %e ULP: %e\n", k, i, input_data1[k], input_data2[k], gpu_data[index_cur], cpu_data[index_cur],gpu_data[index_cur]-cpu_data[index_cur],cl_FLT_ULP(cpu_data[index_cur]));
- }
- else
- printf("%d/%d: x:%f, y:%f -> gpu:%f cpu:%f\n", k, i, input_data1[k], input_data2[k], gpu_data[index_cur], cpu_data[index_cur]);
-@@ -101,6 +102,7 @@ static void builtin_pow(void)
- #endif
- }
- }
-+ OCL_ASSERT(status == 0);
- }
-
- MAKE_UTEST_FROM_FUNCTION(builtin_pow)
---- beignet.orig/utests/setenv.sh.in
-+++ beignet/utests/setenv.sh.in
-@@ -8,3 +8,6 @@ export OCL_GBE_PATH=@LOCAL_GBE_OBJECT_DI
- export OCL_INTERP_PATH=@LOCAL_INTERP_OBJECT_DIR@
- #disable self-test so we can get something more precise than "doesn't work"
- export OCL_IGNORE_SELF_TEST=1
-+obj-`dpkg-architecture -qDEB_HOST_GNU_TYPE`/utests/utest_run
-+export OCL_STRICT_CONFORMANCE=0
-+obj-`dpkg-architecture -qDEB_HOST_GNU_TYPE`/utests/utest_run
---- beignet.orig/utests/utest_generator.py
-+++ beignet/utests/utest_generator.py
-@@ -159,6 +159,7 @@ def udebug(ulpSize,returnType,function):
- }
- #endif
- }
-+ OCL_ASSERTM(status == 0, log);
- }\n'''%(returnType,Min_ulp(function),\
- ulpUnit(ulpSize),ulpNum(ulpSize),\
- ulpNum(ulpSize), ulpNum(ulpSize),\
-@@ -225,16 +226,16 @@ which can print more values and informat
- #include <algorithm>
- #include <string.h>
-
--#define udebug 0
-+#define udebug 1
- #define FLT_MAX 0x1.fffffep127f
- #define FLT_MIN 0x1.0p-126f
- #define INT_ULP 0
-
- #define printf_c(...) \\
- {\\
-- printf("\\033[1m\\033[40;31m");\\
-+ printf("failed:");\\
- printf( __VA_ARGS__ );\\
-- printf("\\033[0m");\\
-+ status = 1;\\
- }
- '''
- #########Execute class itself
-@@ -341,6 +342,7 @@ which can print more values and informat
- static void %s_%s(void)
- {
- int index;
-+ int status = 0;
- %s gpu_data[count_input] = {0}, cpu_data[count_input] = {0}, diff=0.0;
- char log[1024] = {0};
-
---- beignet.orig/utests/profiling_exec.cpp
-+++ beignet/utests/profiling_exec.cpp
-@@ -26,10 +26,10 @@ static void check_profiling_time(cl_ulon
- double submit_to_start = (double)(start - submit)*1e-9;
- double start_to_end = (double)(end - start)*1e-9;
-
-- //printf("Profiling info:\n");
-- //printf("Time from queue to submit : %fms\n", (double)(queue_to_submit) * 1000.f );
-- //printf( "Time from submit to start : %fms\n", (double)(submit_to_start) * 1000.f );
-- //printf( "Time from start to end: %fms\n", (double)(start_to_end) * 1000.f );
-+ printf("Profiling info:\n");
-+ printf("Time from queue to submit : %fms\n", (double)(queue_to_submit) * 1000.f );
-+ printf( "Time from submit to start : %fms\n", (double)(submit_to_start) * 1000.f );
-+ printf( "Time from start to end: %fms\n", (double)(start_to_end) * 1000.f );
-
- OCL_ASSERTM(queued <= submit, "Enqueue time is later than submit time, invalid\n");
- OCL_ASSERTM(submit <= start, "Submit time is later than start time, invalid\n");
diff --git a/debian/patches/series b/debian/patches/series
index 0fc23b2..7651ecc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,7 +4,7 @@ reduce-notfound-output.patch
shared-llvm.patch
update-docs.patch
allow-+-in-directory.patch
-Enable-test-debug.patch
+ship-test-tool.patch
find-python35.patch
docs-broken-links.patch
cl_accelerator_intel.patch
diff --git a/debian/patches/ship-test-tool.patch b/debian/patches/ship-test-tool.patch
new file mode 100644
index 0000000..5844949
--- /dev/null
+++ b/debian/patches/ship-test-tool.patch
@@ -0,0 +1,118 @@
+Description: Ship utest_run testing tool
+
+Use ICD mode (to allow testing any ICD, not just beignet), but
+include builtin_kernel_block_motion_estimate_intel when testing beignet.
+
+Allow testing CPU devices (the "only GPU device is supported right now"
+comment appears to refer to beignet-the-ICD, not this test tool).
+
+Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2bc2100..562a62f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,7 +33,6 @@ configure_file (
+ "src/OCLConfig.h"
+ )
+
+-set (NOT_BUILD_STAND_ALONE_UTEST 1)
+
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/include)
+@@ -277,7 +276,7 @@ ENDIF(BUILD_EXAMPLES)
+ ADD_SUBDIRECTORY(include)
+ ADD_SUBDIRECTORY(backend)
+ ADD_SUBDIRECTORY(src)
+-ADD_SUBDIRECTORY(utests EXCLUDE_FROM_ALL)
++ADD_SUBDIRECTORY(utests)
+
+ # compile benchmark only if standalone compiler is not provided
+ IF (NOT (USE_STANDALONE_GBE_COMPILER STREQUAL "true"))
+--- a/utests/utest_helper.cpp
++++ b/utests/utest_helper.cpp
+@@ -219,7 +219,7 @@ cl_do_kiss_path(const char *file, cl_device_id device)
+ sub_path = "";
+
+ if (kiss_path == NULL)
+- clpanic("set OCL_KERNEL_PATH. This is where the kiss kernels are", -1);
++ kiss_path="/usr/share/beignet/test_kernels";
+ sz += strlen(kiss_path) + strlen(sub_path) + 2; /* +1 for end of string, +1 for '/' */
+ if ((ker_path = (char*) malloc(sz)) == NULL)
+ clpanic("Allocation failed", -1);
+@@ -455,7 +455,7 @@ cl_ocl_init(void)
+
+ /* Get the device (only GPU device is supported right now) */
+ try {
+- OCL_CALL (clGetDeviceIDs, platform, CL_DEVICE_TYPE_GPU, 1, &device, NULL);
++ OCL_CALL (clGetDeviceIDs, platform, CL_DEVICE_TYPE_ALL, 1, &device, NULL);
+ {
+ size_t param_value_size;
+ GET_DEVICE_STR_INFO(profile, PROFILE);
+@@ -891,7 +891,11 @@ int cl_check_subgroups(void)
+ return 0;
+ }
+ if(utestclGetKernelSubGroupInfoKHR == NULL)
+- utestclGetKernelSubGroupInfoKHR = (clGetKernelSubGroupInfoKHR_cb*) clGetExtensionFunctionAddress("clGetKernelSubGroupInfoKHR");
++ utestclGetKernelSubGroupInfoKHR = (clGetKernelSubGroupInfoKHR_cb*) clGetExtensionFunctionAddressForPlatform(platform,"clGetKernelSubGroupInfoKHR");
++ if(utestclGetKernelSubGroupInfoKHR == NULL){
++ printf("Can't find clGetKernelSubGroupInfoKHR");
++ OCL_ASSERT(0);
++ }
+ return 1;
+ }
+
+--- a/utests/CMakeLists.txt
++++ b/utests/CMakeLists.txt
+@@ -324,10 +324,8 @@ else(GEN_PCI_ID)
+ DEPENDS ${GBE_BIN_FILE} ${kernel_bin}.cl)
+ endif(GEN_PCI_ID)
+
+-if (NOT_BUILD_STAND_ALONE_UTEST)
+ SET(utests_sources ${utests_sources} builtin_kernel_block_motion_estimate_intel.cpp)
+ ADD_CUSTOM_TARGET(kernel_bin.bin DEPENDS ${kernel_bin}.bin)
+-endif (NOT_BUILD_STAND_ALONE_UTEST)
+
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/generated
+ COMMAND mkdir ${CMAKE_CURRENT_SOURCE_DIR}/generated -p
+@@ -375,6 +373,9 @@ if (NOT_BUILD_STAND_ALONE_UTEST)
+ endif (NOT_BUILD_STAND_ALONE_UTEST)
+
+ ADD_DEPENDENCIES (utests utest_generator)
++set_target_properties(utest_run PROPERTIES INSTALL_RPATH ${BEIGNET_INSTALL_DIR})
++install (TARGETS utests LIBRARY DESTINATION ${BEIGNET_INSTALL_DIR})
++install (TARGETS utest_run RUNTIME DESTINATION ${BEIGNET_INSTALL_DIR})
+
+ ADD_EXECUTABLE(flat_address_space runtime_flat_address_space.cpp)
+ TARGET_LINK_LIBRARIES(flat_address_space utests)
+--- a/utests/builtin_kernel_block_motion_estimate_intel.cpp
++++ b/utests/builtin_kernel_block_motion_estimate_intel.cpp
+@@ -8,6 +8,10 @@ OCLRELEASEACCELERATORINTEL * oclReleaseAcceleratorIntel = NULL;
+
+ void builtin_kernel_block_motion_estimate_intel(void)
+ {
++ if (!cl_check_beignet()) {
++ printf("Not beignet device , Skip!");
++ return;
++ }
+ char* built_in_kernel_names;
+ size_t built_in_kernels_size;
+ cl_int err = CL_SUCCESS;
+@@ -41,7 +45,7 @@ void builtin_kernel_block_motion_estimate_intel(void)
+ #endif
+ if(!oclCreateAcceleratorIntel){
+ fprintf(stderr, "Failed to get extension clCreateImageFromLibvaIntel\n");
+- exit(1);
++ OCL_ASSERT(0);
+ }
+ cl_accelerator_intel accel = oclCreateAcceleratorIntel(ctx, CL_ACCELERATOR_TYPE_MOTION_ESTIMATION_INTEL,sizeof(cl_motion_estimation_desc_intel), &vmedesc, &err);
+ OCL_ASSERT(accel != NULL);
+@@ -123,7 +127,7 @@ void builtin_kernel_block_motion_estimate_intel(void)
+ #endif
+ if(!oclReleaseAcceleratorIntel){
+ fprintf(stderr, "Failed to get extension clCreateImageFromLibvaIntel\n");
+- exit(1);
++ OCL_ASSERT(0);
+ }
+ oclReleaseAcceleratorIntel(accel);
+ clReleaseProgram(built_in_prog);
diff --git a/debian/patches/update-docs.patch b/debian/patches/update-docs.patch
index 2dc2487..2969bf8 100644
--- a/debian/patches/update-docs.patch
+++ b/debian/patches/update-docs.patch
@@ -45,7 +45,47 @@ Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
The project depends on the following external libaries:
- libdrm libraries (libdrm and libdrm\_intel)
-@@ -144,14 +144,22 @@
+@@ -91,7 +93,7 @@ The cmake will build the backend firstly. Please refer to:
+ Once built, the run-time produces a shared object libcl.so which basically
+ directly implements the OpenCL API.
+
+-`> make`
++`> make utest`
+
+ A set of tests are also produced. They may be found in `utests/`.
+
+@@ -122,25 +124,17 @@ platform. Beignet also produces various tests to ensure the compiler and the run
+ consistency. This small test framework uses a simple c++ registration system to
+ register all the unit tests.
+
+-You need to call setenv.sh in the utests/ directory to set some environment variables
+-firstly as below:
+-
+-`> . setenv.sh`
+-
+-Then in `utests/`:
++In Debian beignet, the testing tool is in the _beignet-dev_ package, and is run with:
+
+-`> ./utest_run`
++`> /usr/lib/\`dpkg-architecture -qDEB_HOST_MULTIARCH\`/beignet/utest_run`
+
+-will run all the unit tests one after the others
++(this name and path may change in future releases - please do not rely on it). It will test the first OpenCL GPU device it finds (which does _not_ have to be a Beignet device). If you want to test a different device, uninstall all other ICDs. To see more options, pass `-h`.
+
+-`> ./utest_run some_unit_test`
++If you compiled Beignet yourself, you will find this tool in `utests`, and will need to set some environment variables to use it (see `setenv.sh`).
+
+-will only run `some_unit_test` test.
+
+ On all supported target platform, the pass rate should be 100%. If it is not, you may
+-need to refer the "Known Issues" section. Please be noted, the `. setenv.sh` is only
+-required to run unit test cases. For all other OpenCL applications, don't execute that
+-command.
++need to refer the "Known Issues" section.
+
+ Normally, beignet needs to run under X server environment as normal user. If there isn't X server,
+ beignet provides two alternative to run:
+@@ -150,14 +144,22 @@
Supported Targets
-----------------
@@ -92,9 +132,18 @@ Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
`export OCL_IGNORE_SELF_TEST=1`
-@@ -215,6 +224,16 @@ Known Issues
- extension. This feature used to work with a previous mesa git version. But now, it's
- simply broken.
+@@ -210,11 +219,21 @@ Known Issues
+ This would lost some precision but gain performance.
+
+ * cl\_khr\_gl\_sharing.
+- This extension highly depends on mesa support. It seems that mesa would not provide
+- such type of extensions, we may have to hack with mesa source code to support this
+- extension. This feature used to work with a previous mesa git version. But now, it's
+- simply broken.
++ This extension is not supported in this version of Beignet. It
++ [was recently re-added](https://cgit.freedesktop.org/beignet/commit/?id=a892148ee12cbaa021b680c4d770e53fab511366)
++ to upstream Beignet, but might not be fully working yet.
++
+* clCreateBuffer with CL_MEM_ALLOC_HOST_PTR doesn't work.
+
diff --git a/debian/rules b/debian/rules
index 92e7fff..2530d81 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,7 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CPPFLAGS_MAINT_APPEND = -DGBE_DEBUG=1
%:
@@ -27,7 +27,6 @@ override_dh_auto_configure:
#Include the test suite and the documentation
override_dh_auto_build:
dh_auto_build
- make -C obj-* utest
ikiwiki --verbose --no-usedirs --underlaydir docs --plugin map --rebuild docs docs_build
rm -rf docs_build/ikiwiki
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/beignet.git
More information about the Pkg-opencl-commits
mailing list